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

Attributes inherited from DefArrayChain

#belong_to_module, #chain

Instance Method Summary collapse

Methods inherited from DefArrayChain

#[], #check_name, #check_topmodule_method, #initialize, #method_missing, #to_inp

Constructor Details

This class inherits a constructor from TdlSpace::DefArrayChain

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TdlSpace::DefArrayChain

Instance Method Details

#-(name) ⇒ Object



84
85
86
87
88
89
90
91
92
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 84

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

#integerObject



109
110
111
112
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 109

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

#stringObject



114
115
116
117
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 114

def string 
    @type = "string"
    return self 
end

#tri0Object



99
100
101
102
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 99

def tri0 
    @type = 'tri0'
    return self 
end

#tri1Object



104
105
106
107
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 104

def tri1 
    @type = 'tri1'
    return self 
end

#wireObject



94
95
96
97
# File 'lib/tdl/sdlmodule/sdlmodule_arraychain.rb', line 94

def wire 
    @type = 'wire'
    return self 
end