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.



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

#clockObject

Returns the value of attribute clock.



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

def clock
  @clock
end

#dsizeObject

Returns the value of attribute dsize.



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

def dsize
  @dsize
end

#freqMObject

Returns the value of attribute freqM.



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

def freqM
  @freqM
end

#resetObject

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