Class: TdlSpace::DefDataInf_C_ArrayChain
- Inherits:
-
DefArrayChain
- Object
- DefArrayChain
- TdlSpace::DefDataInf_C_ArrayChain
- Defined in:
- lib/tdl/sdlmodule/sdlmodule_arraychain.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#clock ⇒ Object
Returns the value of attribute clock.
-
#dsize ⇒ Object
Returns the value of attribute dsize.
-
#freqM ⇒ Object
Returns the value of attribute freqM.
-
#reset ⇒ Object
Returns the value of attribute reset.
Attributes inherited from DefArrayChain
Instance Method Summary collapse
- #-(name, clock: nil, reset: nil, freqM: nil, dsize: nil) ⇒ Object
- #[](*a) ⇒ Object
-
#initialize(belong_to_module: nil, dsize: nil, freqM: nil, clock: nil, reset: nil) ⇒ DefDataInf_C_ArrayChain
constructor
A new instance of DefDataInf_C_ArrayChain.
Methods inherited from DefArrayChain
#check_name, #check_topmodule_method, #method_missing, #to_inp
Constructor Details
#initialize(belong_to_module: nil, dsize: nil, freqM: nil, clock: nil, reset: nil) ⇒ DefDataInf_C_ArrayChain
Returns a new instance of DefDataInf_C_ArrayChain.
176 177 178 179 180 181 182 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 176 def initialize(belong_to_module: nil,dsize: nil,freqM: nil,clock: nil,reset: nil) super(belong_to_module) @dsize = dsize @freqM = freqM @clock = clock @reset = reset end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class TdlSpace::DefArrayChain
Instance Attribute Details
#clock ⇒ Object
Returns the value of attribute clock.
175 176 177 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 175 def clock @clock end |
#dsize ⇒ Object
Returns the value of attribute dsize.
175 176 177 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 175 def dsize @dsize end |
#freqM ⇒ Object
Returns the value of attribute freqM.
175 176 177 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 175 def freqM @freqM end |
#reset ⇒ Object
Returns the value of attribute reset.
175 176 177 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 175 def reset @reset end |
Instance Method Details
#-(name, clock: nil, reset: nil, freqM: nil, dsize: nil) ⇒ Object
193 194 195 196 197 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 193 def -(name,clock: nil,reset: nil,freqM: nil,dsize: nil ) name = to_inp(name) belong_to_module.Def.datainf_c(name: name ,clock: clock||@clock,reset: reset||@reset ,dsize: dsize||@dsize ,dimension: @chain,freqM:freqM||@freqM) end |
#[](*a) ⇒ Object
184 185 186 187 188 189 190 191 |
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 184 def [](*a) if a.empty? raise TdlError.new("参数不能为空") end new_dla = self.class.new(belong_to_module: @belong_to_module,clock: @clock,reset:@reset,freqM: @freqM,dsize: @dsize) new_dla.chain = @chain + a new_dla end |