Class: ResetITest

Inherits:
IntegralTest show all
Defined in:
lib/tdl/exlib/integral_test/reset_itest.rb

Overview

require_relative ‘integral_test’

Instance Method Summary collapse

Constructor Details

#initialize(pin_key: "", active: "low", latency: "10ns") ⇒ ResetITest

Returns a new instance of ResetITest.



4
5
6
7
8
9
10
# File 'lib/tdl/exlib/integral_test/reset_itest.rb', line 4

def initialize(pin_key:"",active:"low",latency:"10ns")
    @pin_key = pin_key.to_s.downcase
    @active = active.to_s.downcase
    @latency = latency
    @pin_name = GlobalParam.CurrTdlModule.create_port_reset(name:@pin_key,port: "output logic",active:@active)
    inst
end

Instance Method Details

#instObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/tdl/exlib/integral_test/reset_itest.rb', line 12

def inst
    Tdl.after_dynamict_inst_stack << lambda {
"
initial begin:#{@pin_key}_BLOCK
#{@pin_name.signal} = #{(@active == "low") ? "0" : "1"};
#(#{@latency});
#{@pin_name.signal} = #{(@active == "low") ? "1" : "0"};
end
"
    }
end

#tb_top_connect_elementObject



24
25
26
27
28
29
# File 'lib/tdl/exlib/integral_test/reset_itest.rb', line 24

def tb_top_connect_element
    tbc = TBConnnectEle.new(type:Reset)
    tbc.baseelm_argv = {name:@pin_key,active:@active}
    tbc.port_key = @pin_key.to_sym
    tbc
end