Class: TdlSpace::DefLogicArrayChain
- Inherits:
-
DefArrayChain
show all
- Defined in:
- lib/tdl/class_hdl/hdl_ex_defarraychain.rb,
lib/tdl/sdlmodule/sdlmodule_arraychain.rb
Instance Attribute Summary
#belong_to_module, #chain
Instance Method Summary
collapse
#[], #check_name, #check_topmodule_method, #initialize, #method_missing, #to_inp
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class TdlSpace::DefArrayChain
Instance Method Details
#-(name) ⇒ Object
85
86
87
88
89
90
91
92
93
|
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 85
def -(name)
if @chain.length > 1
dimension = @chain[0,@chain.length-1]
else
dimension = []
end
name = to_inp(name)
rel = belong_to_module.Def.logic(name: name,dsize: @chain.last || 1,dimension: dimension,type: @type || 'logic')
end
|
#clock(*args) ⇒ Object
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
# File 'lib/tdl/class_hdl/hdl_ex_defarraychain.rb', line 185
def clock(*args)
if args.any?
if args[0].is_a? Hash
freqM = args[0][:freqM]
else
freqM = args[0]
end
else
freqM = nil
end
a = ClockDefLogicArrayChain.new(@belong_to_module)
a.freqM = freqM
return a
end
|
#integer ⇒ Object
110
111
112
113
|
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 110
def integer
@type = 'integer'
return self
end
|
#reset(*args) ⇒ Object
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
# File 'lib/tdl/class_hdl/hdl_ex_defarraychain.rb', line 202
def reset(*args)
if args.any?
if args[0].is_a? Hash
active = args[0][:active]
else
active = args[0]
end
else
active = nil
end
a = ResetDefLogicArrayChain.new(@belong_to_module)
a.active = active
return a
end
|
#string ⇒ Object
115
116
117
118
|
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 115
def string
@type = "string"
return self
end
|
#tri0 ⇒ Object
100
101
102
103
|
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 100
def tri0
@type = 'tri0'
return self
end
|
#tri1 ⇒ Object
105
106
107
108
|
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 105
def tri1
@type = 'tri1'
return self
end
|
#wire ⇒ Object
95
96
97
98
|
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 95
def wire
@type = 'wire'
return self
end
|