Sha256: 0e8d04d7633eeddea516ba9b5ba3e6200bc9e3790490d8f14123f5f487c2b03d
Contents?: true
Size: 1.16 KB
Versions: 4
Compression:
Stored size: 1.16 KB
Contents
<% # Returns a comma-separated string of parameter declarations in Verilog module instantiation format. def make_inst_param_decl aParams aParams.map do |param| ".#{param.name}(#{param.name})" end.join(', ') end clockSignal = aModuleInfo.ports.first.name %> /* This file is the Verilog side of the bench. */ module <%= aOutputInfo.verilogBenchName %>; // instantiate the design under test <% aModuleInfo.parameters.each do |param| %> parameter <%= param.decl %>; <% end %> <% aModuleInfo.ports.each do |port| %> <%= port.input? ? 'reg' : 'wire' %> <%= port.size %> <%= port.name %>; <% end %> <%= aModuleInfo.name %> <% instConfigDecl = make_inst_param_decl(aModuleInfo.parameters) unless instConfigDecl.empty? %>#(<%= instConfigDecl %>)<% end %> <%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>); // connect to the Ruby side of this bench initial begin $ruby_init("ruby", "-rubygems", <%= aOutputInfo.rubyBenchPath.inspect %>); end always begin #1 <%= clockSignal %> = 0; #1 $ruby_relay; #1 <%= clockSignal %> = 1; end endmodule
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby-vpi-12.0.1 | bin/generate_test_tpl/bench.v |
ruby-vpi-12.0.0 | bin/generate_test_tpl/bench.v |
ruby-vpi-12.0.2 | bin/generate_test_tpl/bench.v |
ruby-vpi-12.1.0 | bin/generate_test_tpl/bench.v |