ruby-vpi 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +6 -1
- data/bin/generate_test_tpl/bench.rb +84 -1
- data/bin/generate_test_tpl/bench.v +8 -17
- data/bin/generate_test_tpl/proto.rb +1 -1
- data/doc/common.css +14 -41
- data/doc/common.tpl +1 -1
- data/doc/figures/figures.dia +274 -753
- data/doc/figures/organization_detailed.png +0 -0
- data/doc/figures/ruby_relay.png +0 -0
- data/doc/history.html +363 -276
- data/doc/history.yml +40 -0
- data/doc/intro.inc +37 -15
- data/doc/lib/doc_proxy.rb +24 -4
- data/doc/manual.doc +345 -196
- data/doc/manual.html +741 -497
- data/doc/memo.doc +15 -15
- data/doc/memo.html +28 -27
- data/doc/readme.doc +2 -2
- data/doc/readme.html +51 -15
- data/doc/rss.erb +1 -1
- data/doc/rss.xml +1624 -31
- data/ext/Rakefile +1 -6
- data/ext/main.c +8 -3
- data/ext/main.h +5 -0
- data/ext/relay.c +12 -12
- data/ext/relay.h +1 -6
- data/ext/swig_vpi.i +2 -2
- data/ext/swig_wrap.cin +37 -20
- data/ext/verilog.h +2 -2
- data/ext/vlog.c +10 -3
- data/ext/vlog.h +4 -4
- data/lib/ruby-vpi/vpi.rb +114 -0
- data/lib/ruby-vpi.rb +21 -59
- data/ref/c/annotated.html +1 -1
- data/ref/c/common_8h.html +1 -1
- data/ref/c/files.html +1 -1
- data/ref/c/functions.html +1 -1
- data/ref/c/functions_vars.html +1 -1
- data/ref/c/globals.html +1 -1
- data/ref/c/globals_0x63.html +1 -1
- data/ref/c/globals_0x65.html +1 -1
- data/ref/c/globals_0x66.html +1 -1
- data/ref/c/globals_0x6d.html +3 -2
- data/ref/c/globals_0x70.html +1 -1
- data/ref/c/globals_0x72.html +4 -5
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +4 -2
- data/ref/c/globals_0x78.html +1 -1
- data/ref/c/globals_defs.html +1 -1
- data/ref/c/globals_defs_0x65.html +1 -1
- data/ref/c/globals_defs_0x70.html +1 -1
- data/ref/c/globals_defs_0x76.html +1 -1
- data/ref/c/globals_defs_0x78.html +1 -1
- data/ref/c/globals_enum.html +1 -1
- data/ref/c/globals_eval.html +1 -1
- data/ref/c/globals_func.html +8 -7
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +3 -2
- data/ref/c/index.html +1 -1
- data/ref/c/main_8c.html +26 -1
- data/ref/c/main_8h.html +26 -1
- data/ref/c/relay_8c.html +11 -35
- data/ref/c/relay_8h.html +3 -27
- data/ref/c/structt__cb__data.html +1 -1
- data/ref/c/structt__vpi__delay.html +1 -1
- data/ref/c/structt__vpi__error__info.html +1 -1
- data/ref/c/structt__vpi__strengthval.html +1 -1
- data/ref/c/structt__vpi__systf__data.html +1 -1
- data/ref/c/structt__vpi__time.html +1 -1
- data/ref/c/structt__vpi__value.html +1 -1
- data/ref/c/structt__vpi__vecval.html +1 -1
- data/ref/c/structt__vpi__vlog__info.html +1 -1
- data/ref/c/verilog_8h.html +5 -5
- data/ref/c/vlog_8c.html +44 -6
- data/ref/c/vlog_8h.html +7 -8
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000041.html → M000045.html} +0 -0
- data/ref/ruby/classes/RubyVpi.html +10 -28
- data/ref/ruby/classes/RubyVpi.src/M000029.html +101 -124
- data/ref/ruby/classes/Vpi/Handle.html +56 -56
- data/ref/ruby/classes/Vpi/Handle.src/M000034.html +5 -9
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +5 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +9 -11
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +44 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +74 -55
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +30 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +24 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +68 -0
- data/ref/ruby/classes/Vpi.html +149 -0
- data/ref/ruby/classes/Vpi.src/M000030.html +28 -0
- data/ref/ruby/classes/Vpi.src/M000031.html +18 -0
- data/ref/ruby/classes/Vpi.src/M000032.html +39 -0
- data/ref/ruby/classes/Vpi.src/M000033.html +22 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -2
- data/ref/ruby/fr_method_index.html +18 -14
- data/samp/counter/counter_rspec_bench.rb +81 -1
- data/samp/counter/counter_rspec_bench.v +5 -12
- data/samp/counter/counter_rspec_design.rb +1 -2
- data/samp/counter/counter_rspec_proto.rb +1 -1
- data/samp/counter/counter_rspec_spec.rb +3 -3
- data/samp/counter/counter_xunit_bench.rb +81 -1
- data/samp/counter/counter_xunit_bench.v +5 -12
- data/samp/counter/counter_xunit_design.rb +1 -2
- data/samp/counter/counter_xunit_proto.rb +1 -1
- data/samp/counter/counter_xunit_spec.rb +3 -3
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +81 -1
- data/samp/pipelined_alu/hw5_unit_test_bench.v +11 -18
- data/samp/pipelined_alu/hw5_unit_test_design.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +1 -1
- metadata +12 -9
- data/doc/figures/ruby_init.png +0 -0
- data/ext/swig_vpi.h +0 -924
- data/ref/ruby/classes/Vpi/Handle.src/M000030.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000031.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000032.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000033.html +0 -18
|
@@ -10,133 +10,110 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi.rb, line 31</span>
|
|
14
|
+
31: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">init_bench</span> <span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">aSpecFormat</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aSimulationCycle</span>
|
|
15
|
+
32: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"block must be given"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
|
|
16
|
+
33:
|
|
17
|
+
34: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(.*?)_bench.rb:/</span>}
|
|
18
|
+
35: <span class="ruby-identifier">testName</span> = <span class="ruby-identifier">$1</span>
|
|
19
|
+
36: <span class="ruby-keyword kw">else</span>
|
|
20
|
+
37: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Unable to determine name of test.'</span>
|
|
21
|
+
38: <span class="ruby-keyword kw">end</span>
|
|
22
|
+
39:
|
|
23
|
+
40: <span class="ruby-identifier">useDebugger</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'DEBUG'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
|
|
24
|
+
41: <span class="ruby-identifier">useCoverage</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'COVERAGE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
|
|
25
|
+
42: <span class="ruby-identifier">usePrototype</span> = <span class="ruby-operator">!</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PROTOTYPE'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
|
|
26
|
+
43:
|
|
27
|
+
44: <span class="ruby-comment cmt"># set up code coverage analysis</span>
|
|
28
|
+
45: <span class="ruby-comment cmt"># XXX: this is loaded *before* RCov to prevent coverage statistics about it</span>
|
|
29
|
+
46: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/vpi'</span>
|
|
30
|
+
47:
|
|
31
|
+
48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useCoverage</span>
|
|
32
|
+
49: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/rcov'</span>
|
|
33
|
+
50:
|
|
34
|
+
51: <span class="ruby-constant">RubyVpi</span>.<span class="ruby-identifier">with_coverage_analysis</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
|
35
|
+
52: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">dump_coverage_info</span> [
|
|
36
|
+
53: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">TextReport</span>.<span class="ruby-identifier">new</span>,
|
|
37
|
+
54: <span class="ruby-constant">Rcov</span><span class="ruby-operator">::</span><span class="ruby-constant">HTMLCoverage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:destdir</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{testName}_coverage"</span>)
|
|
38
|
+
55: ]
|
|
39
|
+
56: <span class="ruby-keyword kw">end</span>
|
|
40
|
+
57:
|
|
41
|
+
58: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">"#{Config::PROJECT_NAME}: coverage analysis is enabled for test #{testName.inspect}\n"</span>
|
|
42
|
+
59: <span class="ruby-keyword kw">end</span>
|
|
43
|
+
60:
|
|
44
|
+
61: <span class="ruby-comment cmt"># set up the specification library</span>
|
|
45
|
+
62: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">aSpecFormat</span>
|
|
46
|
+
63: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:xUnit</span>
|
|
47
|
+
64: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/unit'</span>
|
|
48
|
+
65:
|
|
49
|
+
66: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:rSpec</span>
|
|
50
|
+
67: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">concat</span> <span class="ruby-node">%w[-f s]</span>
|
|
51
|
+
68: <span class="ruby-identifier">require</span> <span class="ruby-value str">'spec'</span>
|
|
37
52
|
69:
|
|
38
|
-
70: <span class="ruby-
|
|
39
|
-
71:
|
|
40
|
-
72:
|
|
41
|
-
73:
|
|
42
|
-
74:
|
|
43
|
-
75:
|
|
44
|
-
76:
|
|
45
|
-
77:
|
|
46
|
-
78:
|
|
47
|
-
79:
|
|
48
|
-
80:
|
|
53
|
+
70: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:tSpec</span>
|
|
54
|
+
71: <span class="ruby-constant">ARGV</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-rs'</span>
|
|
55
|
+
72: <span class="ruby-identifier">require</span> <span class="ruby-value str">'test/spec'</span>
|
|
56
|
+
73: <span class="ruby-keyword kw">end</span>
|
|
57
|
+
74:
|
|
58
|
+
75: <span class="ruby-comment cmt"># set up the interactive debugger</span>
|
|
59
|
+
76: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">useDebugger</span>
|
|
60
|
+
77: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-debug'</span>
|
|
61
|
+
78:
|
|
62
|
+
79: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">start</span>
|
|
63
|
+
80: <span class="ruby-constant">Debugger</span>.<span class="ruby-identifier">post_mortem</span>
|
|
49
64
|
81:
|
|
50
|
-
82: <span class="ruby-
|
|
51
|
-
83:
|
|
52
|
-
84:
|
|
53
|
-
85: <span class="ruby-
|
|
54
|
-
86:
|
|
55
|
-
87:
|
|
56
|
-
88:
|
|
57
|
-
89:
|
|
58
|
-
90:
|
|
59
|
-
91:
|
|
60
|
-
92: <span class="ruby-
|
|
65
|
+
82: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">"#{Config::PROJECT_NAME}: debugger is enabled for test #{testName.inspect}\n"</span>
|
|
66
|
+
83: <span class="ruby-keyword kw">end</span>
|
|
67
|
+
84:
|
|
68
|
+
85: <span class="ruby-comment cmt"># suppress undefined method errors when debugger is not enabled</span>
|
|
69
|
+
86: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:debugger</span>
|
|
70
|
+
87: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
|
71
|
+
88: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:debugger</span> <span class="ruby-keyword kw">do</span>
|
|
72
|
+
89: <span class="ruby-comment cmt"># this is a dummy method!</span>
|
|
73
|
+
90: <span class="ruby-keyword kw">end</span>
|
|
74
|
+
91: <span class="ruby-keyword kw">end</span>
|
|
75
|
+
92: <span class="ruby-keyword kw">end</span>
|
|
61
76
|
93:
|
|
62
|
-
94:
|
|
63
|
-
95: <span class="ruby-keyword kw">
|
|
64
|
-
96:
|
|
65
|
-
97: <span class="ruby-
|
|
66
|
-
98:
|
|
67
|
-
99:
|
|
68
|
-
100:
|
|
69
|
-
101:
|
|
70
|
-
102:
|
|
71
|
-
103:
|
|
72
|
-
104:
|
|
73
|
-
105:
|
|
74
|
-
106:
|
|
75
|
-
107:
|
|
76
|
-
108:
|
|
77
|
-
109:
|
|
78
|
-
110:
|
|
79
|
-
111:
|
|
80
|
-
112:
|
|
81
|
-
113:
|
|
82
|
-
114:
|
|
83
|
-
115:
|
|
84
|
-
116:
|
|
85
|
-
117:
|
|
86
|
-
118:
|
|
87
|
-
119:
|
|
77
|
+
94: <span class="ruby-comment cmt"># set up the VPI utility layer</span>
|
|
78
|
+
95: <span class="ruby-constant">Object</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
|
79
|
+
96: <span class="ruby-identifier">include</span> <span class="ruby-constant">Vpi</span>
|
|
80
|
+
97: <span class="ruby-keyword kw">end</span>
|
|
81
|
+
98:
|
|
82
|
+
99: <span class="ruby-comment cmt"># load the design under test</span>
|
|
83
|
+
100: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">design</span> = <span class="ruby-identifier">vpi_handle_by_name</span>(<span class="ruby-node">"#{testName}_bench"</span>, <span class="ruby-keyword kw">nil</span>)
|
|
84
|
+
101: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Verilog bench for test #{testName.inspect} is inaccessible."</span>
|
|
85
|
+
102: <span class="ruby-keyword kw">end</span>
|
|
86
|
+
103:
|
|
87
|
+
104: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">aDesignId</span>, <span class="ruby-identifier">design</span>)
|
|
88
|
+
105: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{testName}_design.rb"</span>
|
|
89
|
+
106:
|
|
90
|
+
107: <span class="ruby-comment cmt"># load the design's prototype</span>
|
|
91
|
+
108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">usePrototype</span>
|
|
92
|
+
109: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{testName}_proto.rb"</span>
|
|
93
|
+
110:
|
|
94
|
+
111: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
|
|
95
|
+
112: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:simulate</span> <span class="ruby-keyword kw">do</span>
|
|
96
|
+
113: <span class="ruby-identifier">design</span>.<span class="ruby-identifier">simulate!</span>
|
|
97
|
+
114: <span class="ruby-keyword kw">end</span>
|
|
98
|
+
115:
|
|
99
|
+
116: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:vpi_register_cb</span> <span class="ruby-keyword kw">do</span>
|
|
100
|
+
117: <span class="ruby-identifier">warn</span> <span class="ruby-value str">"vpi_register_cb: callbacks not allowed when prototyping"</span>
|
|
101
|
+
118: <span class="ruby-keyword kw">end</span>
|
|
102
|
+
119: <span class="ruby-keyword kw">end</span>
|
|
88
103
|
120:
|
|
89
|
-
121:
|
|
90
|
-
122:
|
|
91
|
-
123:
|
|
92
|
-
124:
|
|
93
|
-
125:
|
|
94
|
-
126:
|
|
95
|
-
127:
|
|
96
|
-
128:
|
|
97
|
-
129: <span class="ruby-
|
|
98
|
-
130:
|
|
99
|
-
131:
|
|
100
|
-
132:
|
|
101
|
-
133:
|
|
102
|
-
134:
|
|
103
|
-
135: <span class="ruby-identifier">regs</span> = <span class="ruby-identifier">design</span>[<span class="ruby-constant">VpiReg</span>].<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">lineNo</span>}
|
|
104
|
-
136: <span class="ruby-identifier">clock</span> = <span class="ruby-identifier">regs</span>.<span class="ruby-identifier">first</span>
|
|
105
|
-
137:
|
|
106
|
-
138: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
|
|
107
|
-
139: <span class="ruby-comment cmt"># register callback for relay_verilog</span>
|
|
108
|
-
140: <span class="ruby-identifier">time</span> = <span class="ruby-constant">S_vpi_time</span>.<span class="ruby-identifier">new</span>
|
|
109
|
-
141: <span class="ruby-identifier">time</span>.<span class="ruby-identifier">type</span> = <span class="ruby-constant">VpiSuppressTime</span>
|
|
110
|
-
142:
|
|
111
|
-
143: <span class="ruby-identifier">value</span> = <span class="ruby-constant">S_vpi_value</span>.<span class="ruby-identifier">new</span>
|
|
112
|
-
144: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">format</span> = <span class="ruby-constant">VpiSuppressVal</span>
|
|
113
|
-
145:
|
|
114
|
-
146: <span class="ruby-identifier">alarm</span> = <span class="ruby-constant">S_cb_data</span>.<span class="ruby-identifier">new</span>
|
|
115
|
-
147: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">reason</span> = <span class="ruby-constant">CbValueChange</span>
|
|
116
|
-
148: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">cb_rtn</span> = <span class="ruby-constant">Vlog_relay_ruby</span>
|
|
117
|
-
149: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">clock</span>
|
|
118
|
-
150: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">time</span>
|
|
119
|
-
151: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">value</span>
|
|
120
|
-
152: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">index</span> = <span class="ruby-value">0</span>
|
|
121
|
-
153: <span class="ruby-identifier">alarm</span>.<span class="ruby-identifier">user_data</span> = <span class="ruby-keyword kw">nil</span>
|
|
122
|
-
154:
|
|
123
|
-
155: <span class="ruby-identifier">vpi_free_object</span>(<span class="ruby-identifier">vpi_register_cb</span>(<span class="ruby-identifier">alarm</span>))
|
|
124
|
-
156:
|
|
125
|
-
157: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:relay_verilog_old</span>, <span class="ruby-identifier">:relay_verilog</span>
|
|
126
|
-
158:
|
|
127
|
-
159: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:relay_verilog</span> <span class="ruby-keyword kw">do</span>
|
|
128
|
-
160: <span class="ruby-keyword kw">begin</span>
|
|
129
|
-
161: <span class="ruby-identifier">relay_verilog_old</span>
|
|
130
|
-
162: <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">aClockTrigger</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">clock</span>)
|
|
131
|
-
163: <span class="ruby-keyword kw">end</span>
|
|
132
|
-
164: <span class="ruby-keyword kw">end</span>
|
|
133
|
-
165:
|
|
134
|
-
166: <span class="ruby-comment cmt"># XXX: this completes the handshake with pthread_mutex_lock() in relay_main() in the C extension</span>
|
|
135
|
-
167: <span class="ruby-identifier">relay_verilog_old</span>
|
|
136
|
-
168: <span class="ruby-keyword kw">end</span>
|
|
137
|
-
169:
|
|
138
|
-
170: <span class="ruby-comment cmt"># load the design's specification</span>
|
|
139
|
-
171: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{testName}_spec.rb"</span>
|
|
140
|
-
172: <span class="ruby-keyword kw">end</span></pre>
|
|
104
|
+
121: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">vpi_printf</span> <span class="ruby-node">"#{Config::PROJECT_NAME}: prototype is enabled for test #{testName.inspect}\n"</span>
|
|
105
|
+
122:
|
|
106
|
+
123: <span class="ruby-keyword kw">else</span>
|
|
107
|
+
124: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
|
|
108
|
+
125: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:simulate</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">aSimulationCycle</span>
|
|
109
|
+
126: <span class="ruby-keyword kw">end</span>
|
|
110
|
+
127:
|
|
111
|
+
128: <span class="ruby-comment cmt"># XXX: this completes the handshake, by calling relay_verilog, with pthread_mutex_lock() in relay_main() in the C extension</span>
|
|
112
|
+
129: <span class="ruby-identifier">advance_time</span>
|
|
113
|
+
130: <span class="ruby-keyword kw">end</span>
|
|
114
|
+
131:
|
|
115
|
+
132: <span class="ruby-comment cmt"># load the design's specification</span>
|
|
116
|
+
133: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{testName}_spec.rb"</span>
|
|
117
|
+
134: <span class="ruby-keyword kw">end</span></pre>
|
|
141
118
|
</body>
|
|
142
119
|
</html>
|
|
@@ -138,17 +138,17 @@ names (strings or symbols) or integer constants.
|
|
|
138
138
|
<h3 class="section-bar">Methods</h3>
|
|
139
139
|
|
|
140
140
|
<div class="name-list">
|
|
141
|
-
<a href="#
|
|
142
|
-
<a href="#
|
|
143
|
-
<a href="#
|
|
144
|
-
<a href="#
|
|
145
|
-
<a href="#
|
|
146
|
-
<a href="#
|
|
147
|
-
<a href="#
|
|
148
|
-
<a href="#
|
|
149
|
-
<a href="#
|
|
150
|
-
<a href="#
|
|
151
|
-
<a href="#
|
|
141
|
+
<a href="#M000041">[]</a>
|
|
142
|
+
<a href="#M000039">get_value</a>
|
|
143
|
+
<a href="#M000038">get_value_wrapper</a>
|
|
144
|
+
<a href="#M000042">inspect</a>
|
|
145
|
+
<a href="#M000044">method_missing</a>
|
|
146
|
+
<a href="#M000040">put_value</a>
|
|
147
|
+
<a href="#M000043">to_s</a>
|
|
148
|
+
<a href="#M000035">x!</a>
|
|
149
|
+
<a href="#M000034">x?</a>
|
|
150
|
+
<a href="#M000037">z!</a>
|
|
151
|
+
<a href="#M000036">z?</a>
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
154
154
|
|
|
@@ -190,12 +190,12 @@ names (strings or symbols) or integer constants.
|
|
|
190
190
|
<div id="methods">
|
|
191
191
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
192
192
|
|
|
193
|
-
<div id="method-
|
|
194
|
-
<a name="
|
|
193
|
+
<div id="method-M000041" class="method-detail">
|
|
194
|
+
<a name="M000041"></a>
|
|
195
195
|
|
|
196
196
|
<div class="method-heading">
|
|
197
|
-
<a href="Handle.src/
|
|
198
|
-
onclick="popupCode('Handle.src/
|
|
197
|
+
<a href="Handle.src/M000041.html" target="Code" class="method-signature"
|
|
198
|
+
onclick="popupCode('Handle.src/M000041.html');return false;">
|
|
199
199
|
<span class="method-name">[]</span><span class="method-args">(*aTypes)</span>
|
|
200
200
|
</a>
|
|
201
201
|
</div>
|
|
@@ -208,12 +208,12 @@ constant).
|
|
|
208
208
|
</div>
|
|
209
209
|
</div>
|
|
210
210
|
|
|
211
|
-
<div id="method-
|
|
212
|
-
<a name="
|
|
211
|
+
<div id="method-M000039" class="method-detail">
|
|
212
|
+
<a name="M000039"></a>
|
|
213
213
|
|
|
214
214
|
<div class="method-heading">
|
|
215
|
-
<a href="Handle.src/
|
|
216
|
-
onclick="popupCode('Handle.src/
|
|
215
|
+
<a href="Handle.src/M000039.html" target="Code" class="method-signature"
|
|
216
|
+
onclick="popupCode('Handle.src/M000039.html');return false;">
|
|
217
217
|
<span class="method-name">get_value</span><span class="method-args">(aFormat = VpiObjTypeVal)</span>
|
|
218
218
|
</a>
|
|
219
219
|
</div>
|
|
@@ -227,12 +227,12 @@ attempt to determine the correct format.
|
|
|
227
227
|
</div>
|
|
228
228
|
</div>
|
|
229
229
|
|
|
230
|
-
<div id="method-
|
|
231
|
-
<a name="
|
|
230
|
+
<div id="method-M000038" class="method-detail">
|
|
231
|
+
<a name="M000038"></a>
|
|
232
232
|
|
|
233
233
|
<div class="method-heading">
|
|
234
|
-
<a href="Handle.src/
|
|
235
|
-
onclick="popupCode('Handle.src/
|
|
234
|
+
<a href="Handle.src/M000038.html" target="Code" class="method-signature"
|
|
235
|
+
onclick="popupCode('Handle.src/M000038.html');return false;">
|
|
236
236
|
<span class="method-name">get_value_wrapper</span><span class="method-args">(aFormat)</span>
|
|
237
237
|
</a>
|
|
238
238
|
</div>
|
|
@@ -245,12 +245,12 @@ Reads the value using the given format (integer constant) and returns a
|
|
|
245
245
|
</div>
|
|
246
246
|
</div>
|
|
247
247
|
|
|
248
|
-
<div id="method-
|
|
249
|
-
<a name="
|
|
248
|
+
<div id="method-M000042" class="method-detail">
|
|
249
|
+
<a name="M000042"></a>
|
|
250
250
|
|
|
251
251
|
<div class="method-heading">
|
|
252
|
-
<a href="Handle.src/
|
|
253
|
-
onclick="popupCode('Handle.src/
|
|
252
|
+
<a href="Handle.src/M000042.html" target="Code" class="method-signature"
|
|
253
|
+
onclick="popupCode('Handle.src/M000042.html');return false;">
|
|
254
254
|
<span class="method-name">inspect</span><span class="method-args">(*aPropNames)</span>
|
|
255
255
|
</a>
|
|
256
256
|
</div>
|
|
@@ -263,12 +263,12 @@ handles.
|
|
|
263
263
|
</div>
|
|
264
264
|
</div>
|
|
265
265
|
|
|
266
|
-
<div id="method-
|
|
267
|
-
<a name="
|
|
266
|
+
<div id="method-M000044" class="method-detail">
|
|
267
|
+
<a name="M000044"></a>
|
|
268
268
|
|
|
269
269
|
<div class="method-heading">
|
|
270
|
-
<a href="Handle.src/
|
|
271
|
-
onclick="popupCode('Handle.src/
|
|
270
|
+
<a href="Handle.src/M000044.html" target="Code" class="method-signature"
|
|
271
|
+
onclick="popupCode('Handle.src/M000044.html');return false;">
|
|
272
272
|
<span class="method-name">method_missing</span><span class="method-args">(aMeth, *aArgs, &aBlockArg)</span>
|
|
273
273
|
</a>
|
|
274
274
|
</div>
|
|
@@ -289,18 +289,18 @@ Provides access to this handle’s
|
|
|
289
289
|
through method calls. In the case that a child handle has the same name as
|
|
290
290
|
a VPI property, the child handle will be accessed instead of the VPI
|
|
291
291
|
property. However, you can still access the VPI property via <a
|
|
292
|
-
href="Handle.html#
|
|
293
|
-
href="Handle.html#
|
|
292
|
+
href="Handle.html#M000039">get_value</a> and <a
|
|
293
|
+
href="Handle.html#M000040">put_value</a>.
|
|
294
294
|
</p>
|
|
295
295
|
</div>
|
|
296
296
|
</div>
|
|
297
297
|
|
|
298
|
-
<div id="method-
|
|
299
|
-
<a name="
|
|
298
|
+
<div id="method-M000040" class="method-detail">
|
|
299
|
+
<a name="M000040"></a>
|
|
300
300
|
|
|
301
301
|
<div class="method-heading">
|
|
302
|
-
<a href="Handle.src/
|
|
303
|
-
onclick="popupCode('Handle.src/
|
|
302
|
+
<a href="Handle.src/M000040.html" target="Code" class="method-signature"
|
|
303
|
+
onclick="popupCode('Handle.src/M000040.html');return false;">
|
|
304
304
|
<span class="method-name">put_value</span><span class="method-args">(aValue, aFormat = nil, aTime = nil, aDelay = VpiNoDelay)</span>
|
|
305
305
|
</a>
|
|
306
306
|
</div>
|
|
@@ -315,8 +315,8 @@ format.
|
|
|
315
315
|
</div>
|
|
316
316
|
</div>
|
|
317
317
|
|
|
318
|
-
<div id="method-
|
|
319
|
-
<a name="
|
|
318
|
+
<div id="method-M000043" class="method-detail">
|
|
319
|
+
<a name="M000043"></a>
|
|
320
320
|
|
|
321
321
|
<div class="method-heading">
|
|
322
322
|
<span class="method-name">to_s</span><span class="method-args">(*aPropNames)</span>
|
|
@@ -324,17 +324,17 @@ format.
|
|
|
324
324
|
|
|
325
325
|
<div class="method-description">
|
|
326
326
|
<p>
|
|
327
|
-
Alias for <a href="Handle.html#
|
|
327
|
+
Alias for <a href="Handle.html#M000042">inspect</a>
|
|
328
328
|
</p>
|
|
329
329
|
</div>
|
|
330
330
|
</div>
|
|
331
331
|
|
|
332
|
-
<div id="method-
|
|
333
|
-
<a name="
|
|
332
|
+
<div id="method-M000035" class="method-detail">
|
|
333
|
+
<a name="M000035"></a>
|
|
334
334
|
|
|
335
335
|
<div class="method-heading">
|
|
336
|
-
<a href="Handle.src/
|
|
337
|
-
onclick="popupCode('Handle.src/
|
|
336
|
+
<a href="Handle.src/M000035.html" target="Code" class="method-signature"
|
|
337
|
+
onclick="popupCode('Handle.src/M000035.html');return false;">
|
|
338
338
|
<span class="method-name">x!</span><span class="method-args">()</span>
|
|
339
339
|
</a>
|
|
340
340
|
</div>
|
|
@@ -346,12 +346,12 @@ Sets the logic value of this handle to unknown (x).
|
|
|
346
346
|
</div>
|
|
347
347
|
</div>
|
|
348
348
|
|
|
349
|
-
<div id="method-
|
|
350
|
-
<a name="
|
|
349
|
+
<div id="method-M000034" class="method-detail">
|
|
350
|
+
<a name="M000034"></a>
|
|
351
351
|
|
|
352
352
|
<div class="method-heading">
|
|
353
|
-
<a href="Handle.src/
|
|
354
|
-
onclick="popupCode('Handle.src/
|
|
353
|
+
<a href="Handle.src/M000034.html" target="Code" class="method-signature"
|
|
354
|
+
onclick="popupCode('Handle.src/M000034.html');return false;">
|
|
355
355
|
<span class="method-name">x?</span><span class="method-args">()</span>
|
|
356
356
|
</a>
|
|
357
357
|
</div>
|
|
@@ -363,12 +363,12 @@ Tests if the logic value of this handle is unknown (x).
|
|
|
363
363
|
</div>
|
|
364
364
|
</div>
|
|
365
365
|
|
|
366
|
-
<div id="method-
|
|
367
|
-
<a name="
|
|
366
|
+
<div id="method-M000037" class="method-detail">
|
|
367
|
+
<a name="M000037"></a>
|
|
368
368
|
|
|
369
369
|
<div class="method-heading">
|
|
370
|
-
<a href="Handle.src/
|
|
371
|
-
onclick="popupCode('Handle.src/
|
|
370
|
+
<a href="Handle.src/M000037.html" target="Code" class="method-signature"
|
|
371
|
+
onclick="popupCode('Handle.src/M000037.html');return false;">
|
|
372
372
|
<span class="method-name">z!</span><span class="method-args">()</span>
|
|
373
373
|
</a>
|
|
374
374
|
</div>
|
|
@@ -380,12 +380,12 @@ Sets the logic value of this handle to high impedance (z).
|
|
|
380
380
|
</div>
|
|
381
381
|
</div>
|
|
382
382
|
|
|
383
|
-
<div id="method-
|
|
384
|
-
<a name="
|
|
383
|
+
<div id="method-M000036" class="method-detail">
|
|
384
|
+
<a name="M000036"></a>
|
|
385
385
|
|
|
386
386
|
<div class="method-heading">
|
|
387
|
-
<a href="Handle.src/
|
|
388
|
-
onclick="popupCode('Handle.src/
|
|
387
|
+
<a href="Handle.src/M000036.html" target="Code" class="method-signature"
|
|
388
|
+
onclick="popupCode('Handle.src/M000036.html');return false;">
|
|
389
389
|
<span class="method-name">z?</span><span class="method-args">()</span>
|
|
390
390
|
</a>
|
|
391
391
|
</div>
|
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>x? (Vpi::Handle)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
76:
|
|
18
|
-
77: <span class="ruby-identifier">vpi_get_value</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">val</span>
|
|
19
|
-
78: <span class="ruby-identifier">val</span>
|
|
20
|
-
79: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 65</span>
|
|
14
|
+
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x?</span>
|
|
15
|
+
66: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x/i</span>
|
|
16
|
+
67: <span class="ruby-keyword kw">end</span></pre>
|
|
21
17
|
</body>
|
|
22
18
|
</html>
|
|
@@ -5,40 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>x! (Vpi::Handle)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
85: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
|
|
18
|
-
86: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>, <span class="ruby-constant">VpiStringVal</span>
|
|
19
|
-
87: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
|
|
20
|
-
88:
|
|
21
|
-
89: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
|
|
22
|
-
90: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
|
|
23
|
-
91:
|
|
24
|
-
92: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
|
|
25
|
-
93: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiHexStrVal</span>).<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_i</span>(<span class="ruby-value">16</span>)
|
|
26
|
-
94:
|
|
27
|
-
95: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
|
|
28
|
-
96: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
|
|
29
|
-
97:
|
|
30
|
-
98: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
|
|
31
|
-
99: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
|
|
32
|
-
100:
|
|
33
|
-
101: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
|
|
34
|
-
102: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
|
|
35
|
-
103:
|
|
36
|
-
104: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
|
|
37
|
-
105: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
|
|
38
|
-
106:
|
|
39
|
-
107: <span class="ruby-keyword kw">else</span>
|
|
40
|
-
108: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{val.format}"</span>
|
|
41
|
-
109: <span class="ruby-keyword kw">end</span>
|
|
42
|
-
110: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 70</span>
|
|
14
|
+
70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x!</span>
|
|
15
|
+
71: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">hexStrVal</span> = <span class="ruby-value str">'x'</span>
|
|
16
|
+
72: <span class="ruby-keyword kw">end</span></pre>
|
|
43
17
|
</body>
|
|
44
18
|
</html>
|