ruby-vpi 7.0.0 → 7.1.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/HISTORY +19 -0
- data/README +3 -3
- data/Rakefile +147 -112
- data/bin/generate_test.rb +0 -2
- data/doc/src/manual.xml +11 -9
- data/doc/txt/manual.txt +14 -9
- data/doc/xhtml/background.organization.html +1 -1
- data/doc/xhtml/index.html +2 -2
- data/doc/xhtml/introduction.manifest.html +1 -1
- data/doc/xhtml/usage.installation.html +7 -1
- data/doc/xhtml/usage.tutorial.html +1 -1
- data/gem_extconf.rb +1 -1
- data/history.html +37 -0
- data/lib/ruby-vpi/runner.rb +77 -2
- data/lib/ruby-vpi.rb +0 -10
- data/readme.html +5 -3
- 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_0x70.html +1 -1
- data/ref/c/globals_0x72.html +1 -1
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +1 -1
- 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 +1 -1
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +1 -1
- data/ref/c/hierarchy.html +1 -1
- data/ref/c/index.html +1 -1
- data/ref/c/relay_8cin.html +1 -1
- data/ref/c/relay_8hin.html +1 -1
- data/ref/c/ruby-vpi_8c.html +1 -1
- data/ref/c/structrelay____RubyOptions____def.html +1 -1
- 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/swig_8cin.html +1 -1
- data/ref/c/swig_8hin.html +1 -1
- data/ref/c/verilog_8h.html +1 -1
- data/ref/c/vlog_8cin.html +1 -1
- data/ref/c/vlog_8hin.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/Counter.html +20 -20
- data/ref/ruby/classes/Counter.src/M000038.html +7 -9
- data/ref/ruby/classes/Counter.src/M000039.html +9 -7
- data/ref/ruby/classes/Counter.src/M000040.html +7 -9
- data/ref/ruby/classes/Counter.src/M000041.html +22 -0
- data/ref/ruby/classes/CounterProto.html +9 -9
- data/ref/ruby/classes/CounterProto.src/M000005.html +1 -1
- data/ref/ruby/classes/CounterProto.src/{M000004.html → M000006.html} +1 -1
- data/ref/ruby/classes/ERB.html +5 -5
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/M000048.html +5 -5
- data/ref/ruby/classes/{InputGenerator.src/M000027.html → FileUtils.src/M000049.html} +4 -4
- data/ref/ruby/classes/Hw5UnitModel/Operation.html +15 -15
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000012.html +12 -20
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000013.html +20 -5
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000014.html +18 -0
- data/ref/ruby/classes/Hw5UnitModel.html +24 -24
- data/ref/ruby/classes/Hw5UnitModel.src/M000009.html +7 -25
- data/ref/ruby/classes/Hw5UnitModel.src/M000010.html +25 -9
- data/ref/ruby/classes/Hw5UnitModel.src/M000011.html +22 -0
- data/ref/ruby/classes/Hw5_unit.html +5 -5
- data/ref/ruby/classes/Hw5_unit_spec.html +15 -15
- data/ref/ruby/classes/Hw5_unit_spec.src/M000024.html +8 -8
- data/ref/ruby/classes/Hw5_unit_spec.src/M000025.html +8 -54
- data/ref/ruby/classes/Hw5_unit_spec.src/M000026.html +67 -0
- data/ref/ruby/classes/InputGenerator.html +30 -30
- data/ref/ruby/classes/InputGenerator.src/M000028.html +5 -5
- data/ref/ruby/classes/InputGenerator.src/M000029.html +5 -6
- data/ref/ruby/classes/InputGenerator.src/M000030.html +6 -25
- data/ref/ruby/classes/InputGenerator.src/M000031.html +25 -6
- data/ref/ruby/classes/InputGenerator.src/M000032.html +6 -6
- data/ref/ruby/classes/InputGenerator.src/M000033.html +19 -0
- data/ref/ruby/classes/MaximumCounterValue.html +10 -10
- data/ref/ruby/classes/MaximumCounterValue.src/M000036.html +10 -8
- data/ref/ruby/classes/MaximumCounterValue.src/M000037.html +21 -0
- data/ref/ruby/classes/ModuleInfo.html +10 -10
- data/ref/ruby/classes/ModuleInfo.src/M000019.html +31 -13
- data/ref/ruby/classes/ModuleInfo.src/M000020.html +26 -0
- data/ref/ruby/classes/OutputInfo.html +5 -10
- data/ref/ruby/classes/OutputInfo.src/{M000017.html → M000018.html} +36 -36
- data/ref/ruby/classes/ResettedCounterValue.html +15 -15
- data/ref/ruby/classes/ResettedCounterValue.src/M000015.html +6 -5
- data/ref/ruby/classes/ResettedCounterValue.src/M000016.html +5 -10
- data/ref/ruby/classes/ResettedCounterValue.src/M000017.html +23 -0
- data/ref/ruby/classes/RubyVPI.html +0 -46
- data/ref/ruby/classes/RubyVPI.src/M000050.html +24 -24
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +35 -35
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000042.html +9 -31
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000043.html +31 -69
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000044.html +69 -114
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000045.html +114 -13
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000046.html +13 -5
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000047.html +18 -0
- data/ref/ruby/classes/String.html +5 -5
- data/ref/ruby/classes/Template.html +5 -5
- data/ref/ruby/classes/TestHw5UnitModel.html +15 -15
- data/ref/ruby/classes/TestHw5UnitModel.src/M000021.html +6 -6
- data/ref/ruby/classes/TestHw5UnitModel.src/M000022.html +6 -51
- data/ref/ruby/classes/TestHw5UnitModel.src/M000023.html +64 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +6 -6
- data/ref/ruby/files/bin/generate_test_tpl/bench_rb.html +1 -1
- data/ref/ruby/files/bin/generate_test_tpl/design_rb.html +1 -1
- data/ref/ruby/files/bin/generate_test_tpl/proto_rb.html +1 -1
- data/ref/ruby/files/bin/generate_test_tpl/spec_rb.html +6 -6
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/ext/extconf_rb.html +1 -1
- data/ref/ruby/files/gem_extconf_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +108 -0
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +78 -2
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000001.html +20 -0
- data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_bench_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_design_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_proto_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_rspecTest_spec_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_bench_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_design_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_proto_rb.html +1 -1
- data/ref/ruby/files/samp/counter/counter_unitTest_spec_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/Hw5UnitModel_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/InputGenerator_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/TestHw5UnitModel_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_bench_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_design_rb.html +1 -1
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_spec_rb.html +1 -1
- data/ref/ruby/fr_file_index.html +1 -0
- data/ref/ruby/fr_method_index.html +48 -48
- data/samp/counter/Rakefile +1 -1
- data/samp/pipelined_alu/Rakefile +1 -1
- metadata +41 -41
- data/ref/ruby/classes/Counter.src/M000037.html +0 -20
- data/ref/ruby/classes/FileUtils.src/M000047.html +0 -18
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000011.html +0 -25
- data/ref/ruby/classes/Hw5UnitModel.src/M000008.html +0 -20
- data/ref/ruby/classes/Hw5_unit_spec.src/M000023.html +0 -21
- data/ref/ruby/classes/MaximumCounterValue.src/M000035.html +0 -23
- data/ref/ruby/classes/ModuleInfo.src/M000018.html +0 -44
- data/ref/ruby/classes/ResettedCounterValue.src/M000014.html +0 -19
- data/ref/ruby/classes/RubyVPI.src/M000049.html +0 -18
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000041.html +0 -22
- data/ref/ruby/classes/TestHw5UnitModel.src/M000020.html +0 -19
- data/tpl/runner.rake +0 -96
- /data/{tpl/launcher.rake → lib/ruby-vpi/runner_proxy.rb} +0 -0
- /data/{tpl → lib/ruby-vpi}/synopsys_vcs.tab +0 -0
- /data/ref/ruby/classes/ERB.src/{M000034.html → M000035.html} +0 -0
- /data/ref/ruby/classes/Hw5UnitModel.src/{M000006.html → M000007.html} +0 -0
- /data/ref/ruby/classes/Hw5_unit.src/{M000003.html → M000004.html} +0 -0
- /data/ref/ruby/classes/String.src/{M000033.html → M000034.html} +0 -0
- /data/ref/ruby/classes/Template.src/{M000026.html → M000027.html} +0 -0
- /data/ref/ruby/files/bin/generate_test_rb.src/{M000001.html → M000002.html} +0 -0
- /data/ref/ruby/files/bin/generate_test_tpl/spec_rb.src/{M000002.html → M000003.html} +0 -0
|
@@ -92,9 +92,9 @@ Represents an ALU operation.
|
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
|
93
93
|
|
|
94
94
|
<div class="name-list">
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
95
|
+
<a href="#M000013">compute</a>
|
|
96
|
+
<a href="#M000014">compute!</a>
|
|
97
|
+
<a href="#M000012">new</a>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
|
|
@@ -154,12 +154,12 @@ Represents an ALU operation.
|
|
|
154
154
|
<div id="methods">
|
|
155
155
|
<h3 class="section-bar">Public Class methods</h3>
|
|
156
156
|
|
|
157
|
-
<div id="method-
|
|
158
|
-
<a name="
|
|
157
|
+
<div id="method-M000012" class="method-detail">
|
|
158
|
+
<a name="M000012"></a>
|
|
159
159
|
|
|
160
160
|
<div class="method-heading">
|
|
161
|
-
<a href="Operation.src/
|
|
162
|
-
onclick="popupCode('Operation.src/
|
|
161
|
+
<a href="Operation.src/M000012.html" target="Code" class="method-signature"
|
|
162
|
+
onclick="popupCode('Operation.src/M000012.html');return false;">
|
|
163
163
|
<span class="method-name">new</span><span class="method-args">(type, tag, arg1 = 0, arg2 = 0)</span>
|
|
164
164
|
</a>
|
|
165
165
|
</div>
|
|
@@ -170,12 +170,12 @@ Represents an ALU operation.
|
|
|
170
170
|
|
|
171
171
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
172
172
|
|
|
173
|
-
<div id="method-
|
|
174
|
-
<a name="
|
|
173
|
+
<div id="method-M000013" class="method-detail">
|
|
174
|
+
<a name="M000013"></a>
|
|
175
175
|
|
|
176
176
|
<div class="method-heading">
|
|
177
|
-
<a href="Operation.src/
|
|
178
|
-
onclick="popupCode('Operation.src/
|
|
177
|
+
<a href="Operation.src/M000013.html" target="Code" class="method-signature"
|
|
178
|
+
onclick="popupCode('Operation.src/M000013.html');return false;">
|
|
179
179
|
<span class="method-name">compute</span><span class="method-args">()</span>
|
|
180
180
|
</a>
|
|
181
181
|
</div>
|
|
@@ -187,12 +187,12 @@ Computes the result of this operation.
|
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
|
|
190
|
-
<div id="method-
|
|
191
|
-
<a name="
|
|
190
|
+
<div id="method-M000014" class="method-detail">
|
|
191
|
+
<a name="M000014"></a>
|
|
192
192
|
|
|
193
193
|
<div class="method-heading">
|
|
194
|
-
<a href="Operation.src/
|
|
195
|
-
onclick="popupCode('Operation.src/
|
|
194
|
+
<a href="Operation.src/M000014.html" target="Code" class="method-signature"
|
|
195
|
+
onclick="popupCode('Operation.src/M000014.html');return false;">
|
|
196
196
|
<span class="method-name">compute!</span><span class="method-args">()</span>
|
|
197
197
|
</a>
|
|
198
198
|
</div>
|
|
@@ -5,29 +5,21 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>new (Hw5UnitModel::Operation)</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 samp/pipelined_alu/Hw5UnitModel.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
50:
|
|
25
|
-
51: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:nop</span>
|
|
26
|
-
52: <span class="ruby-keyword kw">nil</span>
|
|
27
|
-
53:
|
|
28
|
-
54: <span class="ruby-keyword kw">else</span>
|
|
29
|
-
55: <span class="ruby-identifier">raise</span>
|
|
30
|
-
56: <span class="ruby-keyword kw">end</span>
|
|
31
|
-
57: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/Hw5UnitModel.rb, line 28</span>
|
|
14
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">tag</span>, <span class="ruby-identifier">arg1</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">arg2</span> = <span class="ruby-value">0</span>)
|
|
15
|
+
29: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">OPERATIONS</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span>
|
|
16
|
+
30:
|
|
17
|
+
31: <span class="ruby-ivar">@type</span> = <span class="ruby-identifier">type</span>
|
|
18
|
+
32: <span class="ruby-ivar">@tag</span> = <span class="ruby-identifier">tag</span>
|
|
19
|
+
33: <span class="ruby-ivar">@arg1</span> = <span class="ruby-identifier">arg1</span>
|
|
20
|
+
34: <span class="ruby-ivar">@arg2</span> = <span class="ruby-identifier">arg2</span>
|
|
21
|
+
35:
|
|
22
|
+
36: <span class="ruby-ivar">@stage</span> = <span class="ruby-value">0</span>
|
|
23
|
+
37: <span class="ruby-keyword kw">end</span></pre>
|
|
32
24
|
</body>
|
|
33
25
|
</html>
|
|
@@ -5,14 +5,29 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>compute
|
|
8
|
+
<title>compute (Hw5UnitModel::Operation)</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 samp/pipelined_alu/Hw5UnitModel.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/Hw5UnitModel.rb, line 40</span>
|
|
14
|
+
40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compute</span>
|
|
15
|
+
41: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@type</span>
|
|
16
|
+
42: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:add</span>
|
|
17
|
+
43: <span class="ruby-ivar">@arg1</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@arg2</span>
|
|
18
|
+
44:
|
|
19
|
+
45: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:sub</span>
|
|
20
|
+
46: <span class="ruby-ivar">@arg1</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@arg2</span>
|
|
21
|
+
47:
|
|
22
|
+
48: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:mul</span>
|
|
23
|
+
49: <span class="ruby-ivar">@arg1</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@arg2</span>
|
|
24
|
+
50:
|
|
25
|
+
51: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:nop</span>
|
|
26
|
+
52: <span class="ruby-keyword kw">nil</span>
|
|
27
|
+
53:
|
|
28
|
+
54: <span class="ruby-keyword kw">else</span>
|
|
29
|
+
55: <span class="ruby-identifier">raise</span>
|
|
30
|
+
56: <span class="ruby-keyword kw">end</span>
|
|
31
|
+
57: <span class="ruby-keyword kw">end</span></pre>
|
|
17
32
|
</body>
|
|
18
33
|
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>compute! (Hw5UnitModel::Operation)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/Hw5UnitModel.rb, line 59</span>
|
|
14
|
+
59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compute!</span>
|
|
15
|
+
60: <span class="ruby-ivar">@result</span> = <span class="ruby-identifier">compute</span>
|
|
16
|
+
61: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -92,11 +92,11 @@ Behavioral model of the hw5_unit Verilog module.
|
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
|
93
93
|
|
|
94
94
|
<div class="name-list">
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
95
|
+
<a href="#M000010">cycle</a>
|
|
96
|
+
<a href="#M000008">initialize</a>
|
|
97
|
+
<a href="#M000011">output</a>
|
|
98
|
+
<a href="#M000007">reset</a>
|
|
99
|
+
<a href="#M000009">startOperation</a>
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
@@ -162,12 +162,12 @@ The famous no-operation.
|
|
|
162
162
|
<div id="methods">
|
|
163
163
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
164
164
|
|
|
165
|
-
<div id="method-
|
|
166
|
-
<a name="
|
|
165
|
+
<div id="method-M000010" class="method-detail">
|
|
166
|
+
<a name="M000010"></a>
|
|
167
167
|
|
|
168
168
|
<div class="method-heading">
|
|
169
|
-
<a href="Hw5UnitModel.src/
|
|
170
|
-
onclick="popupCode('Hw5UnitModel.src/
|
|
169
|
+
<a href="Hw5UnitModel.src/M000010.html" target="Code" class="method-signature"
|
|
170
|
+
onclick="popupCode('Hw5UnitModel.src/M000010.html');return false;">
|
|
171
171
|
<span class="method-name">cycle</span><span class="method-args">()</span>
|
|
172
172
|
</a>
|
|
173
173
|
</div>
|
|
@@ -179,8 +179,8 @@ Performs the behavior for the present cycle.
|
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
181
181
|
|
|
182
|
-
<div id="method-
|
|
183
|
-
<a name="
|
|
182
|
+
<div id="method-M000008" class="method-detail">
|
|
183
|
+
<a name="M000008"></a>
|
|
184
184
|
|
|
185
185
|
<div class="method-heading">
|
|
186
186
|
<span class="method-name">initialize</span><span class="method-args">()</span>
|
|
@@ -188,17 +188,17 @@ Performs the behavior for the present cycle.
|
|
|
188
188
|
|
|
189
189
|
<div class="method-description">
|
|
190
190
|
<p>
|
|
191
|
-
Alias for <a href="Hw5UnitModel.html#
|
|
191
|
+
Alias for <a href="Hw5UnitModel.html#M000007">reset</a>
|
|
192
192
|
</p>
|
|
193
193
|
</div>
|
|
194
194
|
</div>
|
|
195
195
|
|
|
196
|
-
<div id="method-
|
|
197
|
-
<a name="
|
|
196
|
+
<div id="method-M000011" class="method-detail">
|
|
197
|
+
<a name="M000011"></a>
|
|
198
198
|
|
|
199
199
|
<div class="method-heading">
|
|
200
|
-
<a href="Hw5UnitModel.src/
|
|
201
|
-
onclick="popupCode('Hw5UnitModel.src/
|
|
200
|
+
<a href="Hw5UnitModel.src/M000011.html" target="Code" class="method-signature"
|
|
201
|
+
onclick="popupCode('Hw5UnitModel.src/M000011.html');return false;">
|
|
202
202
|
<span class="method-name">output</span><span class="method-args">()</span>
|
|
203
203
|
</a>
|
|
204
204
|
</div>
|
|
@@ -210,12 +210,12 @@ Returns the output for the present cycle.
|
|
|
210
210
|
</div>
|
|
211
211
|
</div>
|
|
212
212
|
|
|
213
|
-
<div id="method-
|
|
214
|
-
<a name="
|
|
213
|
+
<div id="method-M000007" class="method-detail">
|
|
214
|
+
<a name="M000007"></a>
|
|
215
215
|
|
|
216
216
|
<div class="method-heading">
|
|
217
|
-
<a href="Hw5UnitModel.src/
|
|
218
|
-
onclick="popupCode('Hw5UnitModel.src/
|
|
217
|
+
<a href="Hw5UnitModel.src/M000007.html" target="Code" class="method-signature"
|
|
218
|
+
onclick="popupCode('Hw5UnitModel.src/M000007.html');return false;">
|
|
219
219
|
<span class="method-name">reset</span><span class="method-args">()</span>
|
|
220
220
|
</a>
|
|
221
221
|
</div>
|
|
@@ -224,12 +224,12 @@ Returns the output for the present cycle.
|
|
|
224
224
|
</div>
|
|
225
225
|
</div>
|
|
226
226
|
|
|
227
|
-
<div id="method-
|
|
228
|
-
<a name="
|
|
227
|
+
<div id="method-M000009" class="method-detail">
|
|
228
|
+
<a name="M000009"></a>
|
|
229
229
|
|
|
230
230
|
<div class="method-heading">
|
|
231
|
-
<a href="Hw5UnitModel.src/
|
|
232
|
-
onclick="popupCode('Hw5UnitModel.src/
|
|
231
|
+
<a href="Hw5UnitModel.src/M000009.html" target="Code" class="method-signature"
|
|
232
|
+
onclick="popupCode('Hw5UnitModel.src/M000009.html');return false;">
|
|
233
233
|
<span class="method-name">startOperation</span><span class="method-args">(op)</span>
|
|
234
234
|
</a>
|
|
235
235
|
</div>
|
|
@@ -5,34 +5,16 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>startOperation (Hw5UnitModel)</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
|
-
|
|
18
|
-
|
|
19
|
-
106: <span class="ruby-identifier">pipeline</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span><span class="ruby-operator">|</span>
|
|
20
|
-
107: <span class="ruby-comment cmt"># when the operation has finished all pipeline stages, compute the result and output it</span>
|
|
21
|
-
108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">op</span>.<span class="ruby-identifier">stage</span> <span class="ruby-operator">>=</span> <span class="ruby-constant">OPERATION_LATENCIES</span>[<span class="ruby-identifier">op</span>.<span class="ruby-identifier">type</span>]
|
|
22
|
-
109: <span class="ruby-identifier">op</span>.<span class="ruby-identifier">compute!</span>
|
|
23
|
-
110: <span class="ruby-identifier">finished</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">op</span>
|
|
24
|
-
111: <span class="ruby-ivar">@outputQueue</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">op</span>
|
|
25
|
-
112: <span class="ruby-keyword kw">end</span>
|
|
26
|
-
113:
|
|
27
|
-
114:
|
|
28
|
-
115: <span class="ruby-comment cmt"># perform the next stage of the operation</span>
|
|
29
|
-
116: <span class="ruby-identifier">op</span>.<span class="ruby-identifier">stage</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
30
|
-
117: <span class="ruby-keyword kw">end</span>
|
|
31
|
-
118:
|
|
32
|
-
119:
|
|
33
|
-
120: <span class="ruby-comment cmt"># remove finished operations from pipeline</span>
|
|
34
|
-
121: <span class="ruby-ivar">@aluQueues</span>[<span class="ruby-identifier">alu</span>] = <span class="ruby-identifier">pipeline</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">finished</span>
|
|
35
|
-
122: <span class="ruby-keyword kw">end</span>
|
|
36
|
-
123: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/Hw5UnitModel.rb, line 94</span>
|
|
14
|
+
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">startOperation</span>(<span class="ruby-identifier">op</span>)
|
|
15
|
+
95: <span class="ruby-ivar">@aluQueues</span>[<span class="ruby-identifier">op</span>.<span class="ruby-identifier">type</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">op</span>
|
|
16
|
+
96:
|
|
17
|
+
97: <span class="ruby-identifier">p</span> <span class="ruby-value str">"started operation:"</span>, <span class="ruby-identifier">op</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
|
18
|
+
98: <span class="ruby-keyword kw">end</span></pre>
|
|
37
19
|
</body>
|
|
38
20
|
</html>
|
|
@@ -5,18 +5,34 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>cycle (Hw5UnitModel)</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 samp/pipelined_alu/Hw5UnitModel.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/Hw5UnitModel.rb, line 101</span>
|
|
14
|
+
101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cycle</span>
|
|
15
|
+
102: <span class="ruby-comment cmt"># perform ALU operations</span>
|
|
16
|
+
103: <span class="ruby-ivar">@aluQueues</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">alu</span>, <span class="ruby-identifier">pipeline</span><span class="ruby-operator">|</span>
|
|
17
|
+
104: <span class="ruby-identifier">finished</span> = []
|
|
18
|
+
105:
|
|
19
|
+
106: <span class="ruby-identifier">pipeline</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span><span class="ruby-operator">|</span>
|
|
20
|
+
107: <span class="ruby-comment cmt"># when the operation has finished all pipeline stages, compute the result and output it</span>
|
|
21
|
+
108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">op</span>.<span class="ruby-identifier">stage</span> <span class="ruby-operator">>=</span> <span class="ruby-constant">OPERATION_LATENCIES</span>[<span class="ruby-identifier">op</span>.<span class="ruby-identifier">type</span>]
|
|
22
|
+
109: <span class="ruby-identifier">op</span>.<span class="ruby-identifier">compute!</span>
|
|
23
|
+
110: <span class="ruby-identifier">finished</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">op</span>
|
|
24
|
+
111: <span class="ruby-ivar">@outputQueue</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">op</span>
|
|
25
|
+
112: <span class="ruby-keyword kw">end</span>
|
|
26
|
+
113:
|
|
27
|
+
114:
|
|
28
|
+
115: <span class="ruby-comment cmt"># perform the next stage of the operation</span>
|
|
29
|
+
116: <span class="ruby-identifier">op</span>.<span class="ruby-identifier">stage</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
30
|
+
117: <span class="ruby-keyword kw">end</span>
|
|
31
|
+
118:
|
|
32
|
+
119:
|
|
33
|
+
120: <span class="ruby-comment cmt"># remove finished operations from pipeline</span>
|
|
34
|
+
121: <span class="ruby-ivar">@aluQueues</span>[<span class="ruby-identifier">alu</span>] = <span class="ruby-identifier">pipeline</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">finished</span>
|
|
35
|
+
122: <span class="ruby-keyword kw">end</span>
|
|
36
|
+
123: <span class="ruby-keyword kw">end</span></pre>
|
|
21
37
|
</body>
|
|
22
38
|
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>output (Hw5UnitModel)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/Hw5UnitModel.rb, line 126</span>
|
|
14
|
+
126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>
|
|
15
|
+
127: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@outputQueue</span>.<span class="ruby-identifier">empty?</span>
|
|
16
|
+
128: <span class="ruby-ivar">@outputQueue</span>.<span class="ruby-identifier">shift</span>
|
|
17
|
+
129: <span class="ruby-keyword kw">else</span>
|
|
18
|
+
130: <span class="ruby-constant">NOP</span>
|
|
19
|
+
131: <span class="ruby-keyword kw">end</span>
|
|
20
|
+
132: <span class="ruby-keyword kw">end</span></pre>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -92,7 +92,7 @@ An interface to the design under test.
|
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
|
93
93
|
|
|
94
94
|
<div class="name-list">
|
|
95
|
-
<a href="#
|
|
95
|
+
<a href="#M000004">new</a>
|
|
96
96
|
</div>
|
|
97
97
|
</div>
|
|
98
98
|
|
|
@@ -167,12 +167,12 @@ An interface to the design under test.
|
|
|
167
167
|
<div id="methods">
|
|
168
168
|
<h3 class="section-bar">Public Class methods</h3>
|
|
169
169
|
|
|
170
|
-
<div id="method-
|
|
171
|
-
<a name="
|
|
170
|
+
<div id="method-M000004" class="method-detail">
|
|
171
|
+
<a name="M000004"></a>
|
|
172
172
|
|
|
173
173
|
<div class="method-heading">
|
|
174
|
-
<a href="Hw5_unit.src/
|
|
175
|
-
onclick="popupCode('Hw5_unit.src/
|
|
174
|
+
<a href="Hw5_unit.src/M000004.html" target="Code" class="method-signature"
|
|
175
|
+
onclick="popupCode('Hw5_unit.src/M000004.html');return false;">
|
|
176
176
|
<span class="method-name">new</span><span class="method-args">()</span>
|
|
177
177
|
</a>
|
|
178
178
|
</div>
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
|
87
87
|
|
|
88
88
|
<div class="name-list">
|
|
89
|
-
<a href="#
|
|
90
|
-
<a href="#
|
|
91
|
-
<a href="#
|
|
89
|
+
<a href="#M000025">reset</a>
|
|
90
|
+
<a href="#M000024">setup</a>
|
|
91
|
+
<a href="#M000026">test_pipeline</a>
|
|
92
92
|
</div>
|
|
93
93
|
</div>
|
|
94
94
|
|
|
@@ -180,12 +180,12 @@ Number of cycles needed to reset the DUT
|
|
|
180
180
|
<div id="methods">
|
|
181
181
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
182
182
|
|
|
183
|
-
<div id="method-
|
|
184
|
-
<a name="
|
|
183
|
+
<div id="method-M000025" class="method-detail">
|
|
184
|
+
<a name="M000025"></a>
|
|
185
185
|
|
|
186
186
|
<div class="method-heading">
|
|
187
|
-
<a href="Hw5_unit_spec.src/
|
|
188
|
-
onclick="popupCode('Hw5_unit_spec.src/
|
|
187
|
+
<a href="Hw5_unit_spec.src/M000025.html" target="Code" class="method-signature"
|
|
188
|
+
onclick="popupCode('Hw5_unit_spec.src/M000025.html');return false;">
|
|
189
189
|
<span class="method-name">reset</span><span class="method-args">()</span>
|
|
190
190
|
</a>
|
|
191
191
|
</div>
|
|
@@ -194,12 +194,12 @@ Number of cycles needed to reset the DUT
|
|
|
194
194
|
</div>
|
|
195
195
|
</div>
|
|
196
196
|
|
|
197
|
-
<div id="method-
|
|
198
|
-
<a name="
|
|
197
|
+
<div id="method-M000024" class="method-detail">
|
|
198
|
+
<a name="M000024"></a>
|
|
199
199
|
|
|
200
200
|
<div class="method-heading">
|
|
201
|
-
<a href="Hw5_unit_spec.src/
|
|
202
|
-
onclick="popupCode('Hw5_unit_spec.src/
|
|
201
|
+
<a href="Hw5_unit_spec.src/M000024.html" target="Code" class="method-signature"
|
|
202
|
+
onclick="popupCode('Hw5_unit_spec.src/M000024.html');return false;">
|
|
203
203
|
<span class="method-name">setup</span><span class="method-args">()</span>
|
|
204
204
|
</a>
|
|
205
205
|
</div>
|
|
@@ -208,12 +208,12 @@ Number of cycles needed to reset the DUT
|
|
|
208
208
|
</div>
|
|
209
209
|
</div>
|
|
210
210
|
|
|
211
|
-
<div id="method-
|
|
212
|
-
<a name="
|
|
211
|
+
<div id="method-M000026" class="method-detail">
|
|
212
|
+
<a name="M000026"></a>
|
|
213
213
|
|
|
214
214
|
<div class="method-heading">
|
|
215
|
-
<a href="Hw5_unit_spec.src/
|
|
216
|
-
onclick="popupCode('Hw5_unit_spec.src/
|
|
215
|
+
<a href="Hw5_unit_spec.src/M000026.html" target="Code" class="method-signature"
|
|
216
|
+
onclick="popupCode('Hw5_unit_spec.src/M000026.html');return false;">
|
|
217
217
|
<span class="method-name">test_pipeline</span><span class="method-args">()</span>
|
|
218
218
|
</a>
|
|
219
219
|
</div>
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>setup (Hw5_unit_spec)</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 samp/pipelined_alu/hw5_unit_spec.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/hw5_unit_spec.rb, line 57</span>
|
|
14
|
+
57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
|
15
|
+
58: <span class="ruby-ivar">@ig</span> = <span class="ruby-constant">InputGenerator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">RUBY_INTEGER_BITS</span>)
|
|
16
|
+
59: <span class="ruby-ivar">@design</span> = <span class="ruby-constant">Hw5_unit</span>.<span class="ruby-identifier">new</span>
|
|
17
|
+
60:
|
|
18
|
+
61: <span class="ruby-identifier">reset</span>
|
|
19
|
+
62: <span class="ruby-keyword kw">end</span></pre>
|
|
20
20
|
</body>
|
|
21
21
|
</html>
|
|
@@ -5,63 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>reset (Hw5_unit_spec)</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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
77: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">numOperations</span> <span class="ruby-operator"><</span> <span class="ruby-constant">NUM_TESTS</span>
|
|
21
|
-
78: <span class="ruby-identifier">op</span> = <span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">Operation</span>.<span class="ruby-identifier">new</span>(
|
|
22
|
-
79: <span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">OPERATIONS</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">OPERATIONS</span>.<span class="ruby-identifier">size</span>)],
|
|
23
|
-
80: <span class="ruby-identifier">numOperations</span> <span class="ruby-operator">%</span> <span class="ruby-constant">OPERATION_TAG_LIMIT</span>,
|
|
24
|
-
81: <span class="ruby-ivar">@ig</span>.<span class="ruby-identifier">gen</span>.<span class="ruby-identifier">abs</span>,
|
|
25
|
-
82: <span class="ruby-ivar">@ig</span>.<span class="ruby-identifier">gen</span>.<span class="ruby-identifier">abs</span>
|
|
26
|
-
83: )
|
|
27
|
-
84:
|
|
28
|
-
85:
|
|
29
|
-
86: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">intVal</span> = <span class="ruby-identifier">op</span>.<span class="ruby-identifier">arg1</span>
|
|
30
|
-
87: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">b</span>.<span class="ruby-identifier">intVal</span> = <span class="ruby-identifier">op</span>.<span class="ruby-identifier">arg2</span>
|
|
31
|
-
88: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">in_op</span>.<span class="ruby-identifier">intVal</span> = <span class="ruby-constant">OPERATION_ENCODINGS</span>[<span class="ruby-identifier">op</span>.<span class="ruby-identifier">type</span>]
|
|
32
|
-
89: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">in_databits</span>.<span class="ruby-identifier">intVal</span> = <span class="ruby-identifier">op</span>.<span class="ruby-identifier">tag</span>
|
|
33
|
-
90:
|
|
34
|
-
91:
|
|
35
|
-
92: <span class="ruby-identifier">operationQueue</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">op</span>
|
|
36
|
-
93: <span class="ruby-identifier">numOperations</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
37
|
-
94: <span class="ruby-keyword kw">end</span>
|
|
38
|
-
95:
|
|
39
|
-
96:
|
|
40
|
-
97: <span class="ruby-comment cmt"># simulate a clock cycle</span>
|
|
41
|
-
98: <span class="ruby-identifier">relay_verilog</span>
|
|
42
|
-
99:
|
|
43
|
-
100:
|
|
44
|
-
101: <span class="ruby-comment cmt"># verify the output when present</span>
|
|
45
|
-
102: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">out_databits</span>.<span class="ruby-identifier">hexStrVal</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/x/</span>
|
|
46
|
-
103: <span class="ruby-identifier">finishedOp</span> = <span class="ruby-constant">Hw5UnitModel</span><span class="ruby-operator">::</span><span class="ruby-constant">Operation</span>.<span class="ruby-identifier">new</span>(
|
|
47
|
-
104: <span class="ruby-constant">OPERATION_ENCODINGS</span>.<span class="ruby-identifier">index</span>(<span class="ruby-ivar">@design</span>.<span class="ruby-identifier">out_op</span>.<span class="ruby-identifier">intVal</span>),
|
|
48
|
-
105: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">out_databits</span>.<span class="ruby-identifier">intVal</span>
|
|
49
|
-
106: )
|
|
50
|
-
107: <span class="ruby-identifier">finishedOp</span>.<span class="ruby-identifier">result</span> = <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">res</span>.<span class="ruby-identifier">intVal</span> <span class="ruby-operator">&</span> <span class="ruby-constant">VPI_INTEGER_MASK</span>
|
|
51
|
-
108:
|
|
52
|
-
109: <span class="ruby-identifier">expectedOp</span> = <span class="ruby-identifier">operationQueue</span>.<span class="ruby-identifier">shift</span>
|
|
53
|
-
110:
|
|
54
|
-
111:
|
|
55
|
-
112: <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">expectedOp</span>.<span class="ruby-identifier">type</span>, <span class="ruby-identifier">finishedOp</span>.<span class="ruby-identifier">type</span>, <span class="ruby-value str">"incorrect operation"</span>
|
|
56
|
-
113: <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">expectedOp</span>.<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">finishedOp</span>.<span class="ruby-identifier">tag</span>, <span class="ruby-value str">"incorrect tag"</span>
|
|
57
|
-
114:
|
|
58
|
-
115:
|
|
59
|
-
116: <span class="ruby-comment cmt"># ignore the result of a NOP operation</span>
|
|
60
|
-
117: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">finishedOp</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:nop</span>
|
|
61
|
-
118: <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">expectedOp</span>.<span class="ruby-identifier">compute</span> <span class="ruby-operator">&</span> <span class="ruby-constant">VPI_INTEGER_MASK</span>, <span class="ruby-identifier">finishedOp</span>.<span class="ruby-identifier">result</span>, <span class="ruby-value str">"incorrect result"</span>
|
|
62
|
-
119: <span class="ruby-keyword kw">end</span>
|
|
63
|
-
120: <span class="ruby-keyword kw">end</span>
|
|
64
|
-
121: <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">operationQueue</span>.<span class="ruby-identifier">empty?</span>
|
|
65
|
-
122: <span class="ruby-keyword kw">end</span></pre>
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File samp/pipelined_alu/hw5_unit_spec.rb, line 64</span>
|
|
14
|
+
64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
|
|
15
|
+
65: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">reset</span>.<span class="ruby-identifier">intVal</span> = <span class="ruby-value">1</span>
|
|
16
|
+
66: <span class="ruby-constant">DUT_RESET_DELAY</span>.<span class="ruby-identifier">times</span> {<span class="ruby-identifier">relay_verilog</span>}
|
|
17
|
+
67:
|
|
18
|
+
68: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">reset</span>.<span class="ruby-identifier">intVal</span> = <span class="ruby-value">0</span>
|
|
19
|
+
69: <span class="ruby-keyword kw">end</span></pre>
|
|
66
20
|
</body>
|
|
67
21
|
</html>
|