Class: TdlSpace::DefDataInf_C_ArrayChain

Inherits:
DefArrayChain show all
Defined in:
lib/tdl/sdlmodule/sdlmodule_arraychain.rb

Direct Known Subclasses

DefAxiStream_ArrayChain

Instance Attribute Summary collapse

Attributes inherited from DefArrayChain

#belong_to_module, #chain

Instance Method Summary collapse

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.



175
176
177
178
179
180
181
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 175

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

#clockObject

Returns the value of attribute clock.



174
175
176
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 174

def clock
  @clock
end

#dsizeObject

Returns the value of attribute dsize.



174
175
176
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 174

def dsize
  @dsize
end

#freqMObject

Returns the value of attribute freqM.



174
175
176
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 174

def freqM
  @freqM
end

#resetObject

Returns the value of attribute reset.



174
175
176
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 174

def reset
  @reset
end

Instance Method Details

#-(name, clock: nil, reset: nil, freqM: nil, dsize: nil) ⇒ Object



192
193
194
195
196
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 192

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



183
184
185
186
187
188
189
190
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 183

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