Method: Reset#initialize

Defined in:
lib/tdl/elements/Reset.rb

#initialize(name: "system_rst", active: "LOW", port: false, dsize: 1) ⇒ Reset

Returns a new instance of Reset.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/tdl/elements/Reset.rb', line 8

def initialize(name:"system_rst",active:"LOW",port:false,dsize:1)
    name_legal?(name)
    # @id = GlobalParam.CurrTdlModule.BindEleClassVars.Reset.id
    @dsize = dsize
    @name = name
    @port = port
    @active = active.to_s.downcase
    if @active.eql?("low") && @active.eql?("high")
        raise TdlError.new("RESET ACTIVE PARA #{@active} ERROR")
    end
    # if @port
    #     GlobalParam.CurrTdlModule.BindEleClassVars.Reset.ports << self if @id != 0
    # else
    #     GlobalParam.CurrTdlModule.BindEleClassVars.Reset.inst_stack << method(:inst).to_proc
    # end
    # if @id == 2
    #     raise TdlError.new("____________")
    # end
end