Class: IOITest
- Inherits:
-
IntegralTest
- Object
- IntegralTest
- IOITest
- Defined in:
- lib/tdl/exlib/integral_test/io_itest.rb
Overview
require_relative ‘integral_test’
Instance Method Summary collapse
- #assign(value) ⇒ Object
- #exec(str) ⇒ Object
-
#initialize(pin_key: "", dimension: [], dsize: 1) {|_self| ... } ⇒ IOITest
constructor
A new instance of IOITest.
- #inst ⇒ Object
- #tb_top_connect_element ⇒ Object
Constructor Details
#initialize(pin_key: "", dimension: [], dsize: 1) {|_self| ... } ⇒ IOITest
Returns a new instance of IOITest.
4 5 6 7 8 9 10 11 12 |
# File 'lib/tdl/exlib/integral_test/io_itest.rb', line 4 def initialize(pin_key:"",dimension:[],dsize:1,&block) @pin_key = pin_key.to_s.downcase @dsize = dsize @dimension = dimension @pin_name = GlobalParam.CurrTdlModule.create_logic_port(name:@pin_key,dsize:@dsize,port:"output logic",dimension:@dimension) @str_stack = [] yield(self) inst end |
Instance Method Details
#assign(value) ⇒ Object
37 38 39 |
# File 'lib/tdl/exlib/integral_test/io_itest.rb', line 37 def assign(value) @str_stack << "#{@pin_name.signal} = #{value.to_s}" end |
#exec(str) ⇒ Object
33 34 35 |
# File 'lib/tdl/exlib/integral_test/io_itest.rb', line 33 def exec(str) @str_stack << str.to_s end |
#inst ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tdl/exlib/integral_test/io_itest.rb', line 14 def inst Tdl.after_dynamict_inst_stack << lambda { " initial begin:#{@pin_key}_BLOCK #{ @str_stack.join(";\n ") }; end " } end |
#tb_top_connect_element ⇒ Object
26 27 28 29 30 31 |
# File 'lib/tdl/exlib/integral_test/io_itest.rb', line 26 def tb_top_connect_element tbc = TBConnnectEle.new(type:Logic) tbc.baseelm_argv = {name:@pin_key,dsize:@dsize,dimension:@dimension} tbc.port_key = @pin_key.to_sym tbc end |