ruby-vpi 7.1.0 → 7.2.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/HEADER +101 -0
- data/HISTORY +57 -37
- data/README +1 -1
- data/Rakefile +21 -13
- data/doc/src/manual.xml +5 -5
- data/doc/txt/manual.txt +10 -6
- data/doc/xhtml/background.organization.html +1 -1
- data/doc/xhtml/index.html +2 -2
- data/doc/xhtml/usage.tutorial.html +4 -4
- data/header.html +114 -0
- data/header.part.html +114 -0
- data/history.html +217 -68
- data/history.part.html +880 -0
- data/lib/ruby-vpi/rcov.rb +62 -0
- data/lib/ruby-vpi/rspec.rb +1 -1
- data/lib/ruby-vpi/xx.rb +761 -0
- data/lib/ruby-vpi.rb +13 -2
- data/memo.html +116 -1
- data/memo.part.html +86 -0
- data/readme.html +116 -1
- data/readme.part.html +21 -0
- 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/ERB.html +5 -5
- data/ref/ruby/classes/ERB.src/{M000035.html → M000011.html} +0 -0
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/{M000048.html → M000065.html} +0 -0
- data/ref/ruby/classes/FileUtils.src/{M000049.html → M000066.html} +0 -0
- data/ref/ruby/classes/ModuleInfo.html +10 -10
- data/ref/ruby/classes/ModuleInfo.src/{M000019.html → M000008.html} +0 -0
- data/ref/ruby/classes/ModuleInfo.src/{M000020.html → M000009.html} +0 -0
- data/ref/ruby/classes/OutputInfo.html +5 -5
- data/ref/ruby/classes/OutputInfo.src/{M000018.html → M000007.html} +0 -0
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000051.html → M000069.html} +0 -0
- data/ref/ruby/classes/RubyVPI.html +45 -5
- data/ref/ruby/classes/RubyVPI.src/M000067.html +50 -0
- data/ref/ruby/classes/RubyVPI.src/M000068.html +20 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +35 -35
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000042.html → M000059.html} +0 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000043.html → M000060.html} +0 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000044.html → M000061.html} +0 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000045.html → M000062.html} +1 -1
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000046.html → M000063.html} +0 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000047.html → M000064.html} +1 -1
- data/ref/ruby/classes/String.html +5 -5
- data/ref/ruby/classes/String.src/{M000034.html → M000012.html} +0 -0
- data/ref/ruby/classes/{ResettedCounterValue.html → Table.html} +41 -24
- data/ref/ruby/classes/Table.src/M000003.html +38 -0
- data/ref/ruby/classes/Table.src/M000004.html +18 -0
- data/ref/ruby/classes/Table.src/M000005.html +18 -0
- data/ref/ruby/classes/{InputGenerator.src/M000029.html → Table.src/M000006.html} +5 -5
- data/ref/ruby/classes/Template.html +5 -5
- data/ref/ruby/classes/Template.src/{M000027.html → M000010.html} +0 -0
- data/ref/ruby/classes/XX/Document.html +295 -0
- data/ref/ruby/classes/XX/Document.src/M000050.html +22 -0
- data/ref/ruby/classes/XX/Document.src/M000051.html +20 -0
- data/ref/ruby/classes/XX/Document.src/M000052.html +20 -0
- data/ref/ruby/classes/XX/Document.src/M000053.html +20 -0
- data/ref/ruby/classes/XX/Document.src/M000054.html +22 -0
- data/ref/ruby/classes/XX/Document.src/M000055.html +21 -0
- data/ref/ruby/classes/XX/Document.src/M000056.html +21 -0
- data/ref/ruby/classes/XX/Document.src/M000057.html +34 -0
- data/ref/ruby/classes/XX/Document.src/M000058.html +98 -0
- data/ref/ruby/{files/bin/generate_test_tpl/spec_rb.html → classes/XX/HTML4/Strict.html} +26 -28
- data/ref/ruby/classes/XX/HTML4/Strict.src/M000016.html +20 -0
- data/ref/ruby/classes/{CounterProto.html → XX/HTML4/Transitional.html} +19 -45
- data/ref/ruby/classes/XX/HTML4/Transitional.src/M000015.html +20 -0
- data/ref/ruby/classes/{MaximumCounterValue.html → XX/HTML4.html} +20 -34
- data/ref/ruby/classes/XX/HTML4.src/M000014.html +20 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.html +236 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000022.html +22 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000023.html +20 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000024.html +25 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000025.html +20 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000026.html +27 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000027.html +20 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000028.html +27 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000029.html +22 -0
- data/ref/ruby/{files/bin/generate_test_tpl/proto_rb.html → classes/XX/Markup/Error.html} +25 -21
- data/ref/ruby/classes/XX/Markup/InstanceMethods.html +474 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000030.html +56 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000031.html +33 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000032.html +31 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000033.html +48 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000034.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000035.html +31 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000036.html +32 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000037.html +32 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000038.html +28 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000039.html +23 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000040.html +26 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000041.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000042.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000043.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000044.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000045.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000046.html +21 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000047.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000048.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000049.html +20 -0
- data/ref/ruby/classes/{TestHw5UnitModel.html → XX/Markup.html} +29 -49
- data/ref/ruby/classes/XX/Markup.src/M000021.html +28 -0
- data/ref/ruby/{files/samp/counter/counter_rspecTest_spec_rb.html → classes/XX/XHTML/Strict.html} +46 -50
- data/ref/ruby/classes/XX/XHTML/Strict.src/M000020.html +20 -0
- data/ref/ruby/classes/XX/XHTML/Transitional.html +138 -0
- data/ref/ruby/classes/XX/XHTML/Transitional.src/M000019.html +20 -0
- data/ref/ruby/classes/XX/XHTML.html +145 -0
- data/ref/ruby/classes/XX/XHTML.src/M000018.html +36 -0
- data/ref/ruby/classes/XX/XML.html +138 -0
- data/ref/ruby/classes/XX/XML.src/M000013.html +20 -0
- data/ref/ruby/classes/XX/XMLish.html +138 -0
- data/ref/ruby/classes/XX/XMLish.src/M000017.html +18 -0
- data/ref/ruby/{files/samp/counter/counter_unitTest_spec_rb.html → classes/XX.html} +39 -36
- 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_rb.src/{M000002.html → M000001.html} +0 -0
- data/ref/ruby/files/bin/header_to_ruby_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/{samp/pipelined_alu/hw5_unit_bench_rb.html → lib/ruby-vpi/rcov_rb.html} +8 -5
- 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 +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +6 -6
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/{M000001.html → M000002.html} +0 -0
- data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +148 -0
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -1
- data/ref/ruby/fr_class_index.html +15 -10
- data/ref/ruby/fr_file_index.html +2 -20
- data/ref/ruby/fr_method_index.html +69 -51
- data/ref/ruby/index.html +1 -1
- data/style.css +47 -0
- metadata +133 -109
- data/ref/ruby/classes/Counter.html +0 -258
- data/ref/ruby/classes/Counter.src/M000038.html +0 -20
- data/ref/ruby/classes/Counter.src/M000039.html +0 -22
- data/ref/ruby/classes/Counter.src/M000040.html +0 -20
- data/ref/ruby/classes/Counter.src/M000041.html +0 -22
- data/ref/ruby/classes/CounterProto.src/M000005.html +0 -22
- data/ref/ruby/classes/CounterProto.src/M000006.html +0 -22
- data/ref/ruby/classes/Hw5UnitModel/Operation.html +0 -216
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000012.html +0 -25
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000013.html +0 -33
- data/ref/ruby/classes/Hw5UnitModel/Operation.src/M000014.html +0 -18
- data/ref/ruby/classes/Hw5UnitModel.html +0 -256
- data/ref/ruby/classes/Hw5UnitModel.src/M000007.html +0 -24
- data/ref/ruby/classes/Hw5UnitModel.src/M000009.html +0 -20
- data/ref/ruby/classes/Hw5UnitModel.src/M000010.html +0 -38
- data/ref/ruby/classes/Hw5UnitModel.src/M000011.html +0 -22
- data/ref/ruby/classes/Hw5_unit.html +0 -196
- data/ref/ruby/classes/Hw5_unit.src/M000004.html +0 -27
- data/ref/ruby/classes/Hw5_unit_spec.html +0 -237
- data/ref/ruby/classes/Hw5_unit_spec.src/M000024.html +0 -21
- data/ref/ruby/classes/Hw5_unit_spec.src/M000025.html +0 -21
- data/ref/ruby/classes/Hw5_unit_spec.src/M000026.html +0 -67
- data/ref/ruby/classes/InputGenerator.html +0 -260
- data/ref/ruby/classes/InputGenerator.src/M000028.html +0 -18
- data/ref/ruby/classes/InputGenerator.src/M000030.html +0 -19
- data/ref/ruby/classes/InputGenerator.src/M000031.html +0 -38
- data/ref/ruby/classes/InputGenerator.src/M000032.html +0 -19
- data/ref/ruby/classes/InputGenerator.src/M000033.html +0 -19
- data/ref/ruby/classes/MaximumCounterValue.src/M000036.html +0 -23
- data/ref/ruby/classes/MaximumCounterValue.src/M000037.html +0 -21
- data/ref/ruby/classes/ResettedCounterValue.src/M000015.html +0 -19
- data/ref/ruby/classes/ResettedCounterValue.src/M000016.html +0 -18
- data/ref/ruby/classes/ResettedCounterValue.src/M000017.html +0 -23
- data/ref/ruby/classes/RubyVPI.src/M000050.html +0 -39
- data/ref/ruby/classes/TestHw5UnitModel.src/M000021.html +0 -19
- data/ref/ruby/classes/TestHw5UnitModel.src/M000022.html +0 -19
- data/ref/ruby/classes/TestHw5UnitModel.src/M000023.html +0 -64
- data/ref/ruby/files/bin/generate_test_tpl/bench_rb.html +0 -115
- data/ref/ruby/files/bin/generate_test_tpl/design_rb.html +0 -107
- data/ref/ruby/files/bin/generate_test_tpl/spec_rb.src/M000003.html +0 -22
- data/ref/ruby/files/ext/extconf_rb.html +0 -108
- data/ref/ruby/files/gem_extconf_rb.html +0 -114
- data/ref/ruby/files/samp/counter/counter_rspecTest_bench_rb.html +0 -115
- data/ref/ruby/files/samp/counter/counter_rspecTest_design_rb.html +0 -107
- data/ref/ruby/files/samp/counter/counter_rspecTest_proto_rb.html +0 -107
- data/ref/ruby/files/samp/counter/counter_unitTest_bench_rb.html +0 -115
- data/ref/ruby/files/samp/counter/counter_unitTest_design_rb.html +0 -107
- data/ref/ruby/files/samp/counter/counter_unitTest_proto_rb.html +0 -107
- data/ref/ruby/files/samp/pipelined_alu/Hw5UnitModel_rb.html +0 -101
- data/ref/ruby/files/samp/pipelined_alu/InputGenerator_rb.html +0 -101
- data/ref/ruby/files/samp/pipelined_alu/TestHw5UnitModel_rb.html +0 -111
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_design_rb.html +0 -107
- data/ref/ruby/files/samp/pipelined_alu/hw5_unit_spec_rb.html +0 -112
|
@@ -1,67 +0,0 @@
|
|
|
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>test_pipeline (Hw5_unit_spec)</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/hw5_unit_spec.rb, line 71</span>
|
|
14
|
-
71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_pipeline</span>
|
|
15
|
-
72: <span class="ruby-identifier">operationQueue</span> = []
|
|
16
|
-
73: <span class="ruby-identifier">numOperations</span> = <span class="ruby-value">0</span>
|
|
17
|
-
74:
|
|
18
|
-
75: <span class="ruby-keyword kw">begin</span>
|
|
19
|
-
76: <span class="ruby-comment cmt"># start a new operation</span>
|
|
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>
|
|
66
|
-
</body>
|
|
67
|
-
</html>
|
|
@@ -1,260 +0,0 @@
|
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<title>Class: InputGenerator</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
// <![CDATA[
|
|
14
|
-
|
|
15
|
-
function popupCode( url ) {
|
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toggleCode( id ) {
|
|
20
|
-
if ( document.getElementById )
|
|
21
|
-
elem = document.getElementById( id );
|
|
22
|
-
else if ( document.all )
|
|
23
|
-
elem = eval( "document.all." + id );
|
|
24
|
-
else
|
|
25
|
-
return false;
|
|
26
|
-
|
|
27
|
-
elemStyle = elem.style;
|
|
28
|
-
|
|
29
|
-
if ( elemStyle.display != "block" ) {
|
|
30
|
-
elemStyle.display = "block"
|
|
31
|
-
} else {
|
|
32
|
-
elemStyle.display = "none"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Make codeblocks hidden by default
|
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
-
|
|
41
|
-
// ]]>
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div id="classHeader">
|
|
50
|
-
<table class="header-table">
|
|
51
|
-
<tr class="top-aligned-row">
|
|
52
|
-
<td><strong>Class</strong></td>
|
|
53
|
-
<td class="class-name-in-header">InputGenerator</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr class="top-aligned-row">
|
|
56
|
-
<td><strong>In:</strong></td>
|
|
57
|
-
<td>
|
|
58
|
-
<a href="../files/samp/pipelined_alu/InputGenerator_rb.html">
|
|
59
|
-
samp/pipelined_alu/InputGenerator.rb
|
|
60
|
-
</a>
|
|
61
|
-
<br />
|
|
62
|
-
</td>
|
|
63
|
-
</tr>
|
|
64
|
-
|
|
65
|
-
<tr class="top-aligned-row">
|
|
66
|
-
<td><strong>Parent:</strong></td>
|
|
67
|
-
<td>
|
|
68
|
-
Object
|
|
69
|
-
</td>
|
|
70
|
-
</tr>
|
|
71
|
-
</table>
|
|
72
|
-
</div>
|
|
73
|
-
<!-- banner header -->
|
|
74
|
-
|
|
75
|
-
<div id="bodyContent">
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<div id="contextContent">
|
|
80
|
-
|
|
81
|
-
<div id="description">
|
|
82
|
-
<p>
|
|
83
|
-
Generates random input sequences of configurable length.
|
|
84
|
-
</p>
|
|
85
|
-
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<div id="method-list">
|
|
92
|
-
<h3 class="section-bar">Methods</h3>
|
|
93
|
-
|
|
94
|
-
<div class="name-list">
|
|
95
|
-
<a href="#M000029">bits</a>
|
|
96
|
-
<a href="#M000030">bits=</a>
|
|
97
|
-
<a href="#M000031">gen</a>
|
|
98
|
-
<a href="#M000033">genPowerOfTwo</a>
|
|
99
|
-
<a href="#M000032">genPrime</a>
|
|
100
|
-
<a href="#M000028">new</a>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<!-- if includes -->
|
|
108
|
-
|
|
109
|
-
<div id="section">
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
<div id="constants-list">
|
|
113
|
-
<h3 class="section-bar">Constants</h3>
|
|
114
|
-
|
|
115
|
-
<div class="name-list">
|
|
116
|
-
<table summary="Constants">
|
|
117
|
-
<tr class="top-aligned-row context-row">
|
|
118
|
-
<td class="context-item-name">PrimeNums</td>
|
|
119
|
-
<td>=</td>
|
|
120
|
-
<td class="context-item-value">[ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919</td>
|
|
121
|
-
<td width="3em"> </td>
|
|
122
|
-
<td class="context-item-desc">
|
|
123
|
-
the first 1000 prime numbers, gotten from <<a
|
|
124
|
-
href="http://en.wikipedia.org/wiki/List_of_prime_numbers#The_first_1000_prime_numbers">en.wikipedia.org/wiki/List_of_prime_numbers#The_first_1000_prime_numbers</a>>
|
|
125
|
-
|
|
126
|
-
</td>
|
|
127
|
-
</tr>
|
|
128
|
-
</table>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<!-- if method_list -->
|
|
138
|
-
<div id="methods">
|
|
139
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
140
|
-
|
|
141
|
-
<div id="method-M000028" class="method-detail">
|
|
142
|
-
<a name="M000028"></a>
|
|
143
|
-
|
|
144
|
-
<div class="method-heading">
|
|
145
|
-
<a href="InputGenerator.src/M000028.html" target="Code" class="method-signature"
|
|
146
|
-
onclick="popupCode('InputGenerator.src/M000028.html');return false;">
|
|
147
|
-
<span class="method-name">new</span><span class="method-args">(bits)</span>
|
|
148
|
-
</a>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<div class="method-description">
|
|
152
|
-
<p>
|
|
153
|
-
@param bits Number of bits that can be used to represent a generated input
|
|
154
|
-
sequence
|
|
155
|
-
</p>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
160
|
-
|
|
161
|
-
<div id="method-M000029" class="method-detail">
|
|
162
|
-
<a name="M000029"></a>
|
|
163
|
-
|
|
164
|
-
<div class="method-heading">
|
|
165
|
-
<a href="InputGenerator.src/M000029.html" target="Code" class="method-signature"
|
|
166
|
-
onclick="popupCode('InputGenerator.src/M000029.html');return false;">
|
|
167
|
-
<span class="method-name">bits</span><span class="method-args">()</span>
|
|
168
|
-
</a>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<div class="method-description">
|
|
172
|
-
<p>
|
|
173
|
-
gets the number of bits that can be used to represent a generated input
|
|
174
|
-
sequence
|
|
175
|
-
</p>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
|
|
179
|
-
<div id="method-M000030" class="method-detail">
|
|
180
|
-
<a name="M000030"></a>
|
|
181
|
-
|
|
182
|
-
<div class="method-heading">
|
|
183
|
-
<a href="InputGenerator.src/M000030.html" target="Code" class="method-signature"
|
|
184
|
-
onclick="popupCode('InputGenerator.src/M000030.html');return false;">
|
|
185
|
-
<span class="method-name">bits=</span><span class="method-args">(num)</span>
|
|
186
|
-
</a>
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
<div class="method-description">
|
|
190
|
-
<p>
|
|
191
|
-
sets the number of bits that can be used to represent a generated input
|
|
192
|
-
sequence
|
|
193
|
-
</p>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
|
|
197
|
-
<div id="method-M000031" class="method-detail">
|
|
198
|
-
<a name="M000031"></a>
|
|
199
|
-
|
|
200
|
-
<div class="method-heading">
|
|
201
|
-
<a href="InputGenerator.src/M000031.html" target="Code" class="method-signature"
|
|
202
|
-
onclick="popupCode('InputGenerator.src/M000031.html');return false;">
|
|
203
|
-
<span class="method-name">gen</span><span class="method-args">()</span>
|
|
204
|
-
</a>
|
|
205
|
-
</div>
|
|
206
|
-
|
|
207
|
-
<div class="method-description">
|
|
208
|
-
<p>
|
|
209
|
-
generates a random input sequence
|
|
210
|
-
</p>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
|
|
214
|
-
<div id="method-M000033" class="method-detail">
|
|
215
|
-
<a name="M000033"></a>
|
|
216
|
-
|
|
217
|
-
<div class="method-heading">
|
|
218
|
-
<a href="InputGenerator.src/M000033.html" target="Code" class="method-signature"
|
|
219
|
-
onclick="popupCode('InputGenerator.src/M000033.html');return false;">
|
|
220
|
-
<span class="method-name">genPowerOfTwo</span><span class="method-args">()</span>
|
|
221
|
-
</a>
|
|
222
|
-
</div>
|
|
223
|
-
|
|
224
|
-
<div class="method-description">
|
|
225
|
-
<p>
|
|
226
|
-
generates a random power-of-two number
|
|
227
|
-
</p>
|
|
228
|
-
</div>
|
|
229
|
-
</div>
|
|
230
|
-
|
|
231
|
-
<div id="method-M000032" class="method-detail">
|
|
232
|
-
<a name="M000032"></a>
|
|
233
|
-
|
|
234
|
-
<div class="method-heading">
|
|
235
|
-
<a href="InputGenerator.src/M000032.html" target="Code" class="method-signature"
|
|
236
|
-
onclick="popupCode('InputGenerator.src/M000032.html');return false;">
|
|
237
|
-
<span class="method-name">genPrime</span><span class="method-args">()</span>
|
|
238
|
-
</a>
|
|
239
|
-
</div>
|
|
240
|
-
|
|
241
|
-
<div class="method-description">
|
|
242
|
-
<p>
|
|
243
|
-
generates a random prime number
|
|
244
|
-
</p>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
</div>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<div id="validator-badges">
|
|
256
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
</body>
|
|
260
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
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>new (InputGenerator)</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/InputGenerator.rb, line 32</span>
|
|
14
|
-
32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">bits</span>)
|
|
15
|
-
33: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bits</span> = <span class="ruby-identifier">bits</span>
|
|
16
|
-
34: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
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>bits= (InputGenerator)</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/InputGenerator.rb, line 46</span>
|
|
14
|
-
46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bits=</span>(<span class="ruby-identifier">num</span>)
|
|
15
|
-
47: <span class="ruby-ivar">@inputBits</span> = <span class="ruby-identifier">num</span>
|
|
16
|
-
48: <span class="ruby-ivar">@inputLimit</span> = <span class="ruby-value">2</span> <span class="ruby-operator">**</span> <span class="ruby-ivar">@inputBits</span>
|
|
17
|
-
49: <span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,38 +0,0 @@
|
|
|
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>gen (InputGenerator)</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/InputGenerator.rb, line 54</span>
|
|
14
|
-
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gen</span>
|
|
15
|
-
55: <span class="ruby-comment cmt"># randomly select a specific kind of integer to generate</span>
|
|
16
|
-
56: <span class="ruby-comment cmt"># @note param to rand() is number of situations in this 'case' block</span>
|
|
17
|
-
57: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">rand</span>(<span class="ruby-value">6</span>)
|
|
18
|
-
58: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># positive numbers</span>
|
|
19
|
-
59: <span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@inputLimit</span>)
|
|
20
|
-
60:
|
|
21
|
-
61: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># negative numbers</span>
|
|
22
|
-
62: <span class="ruby-operator">-</span><span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@inputLimit</span>)
|
|
23
|
-
63:
|
|
24
|
-
64: <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-comment cmt"># zero</span>
|
|
25
|
-
65: <span class="ruby-value">0</span>
|
|
26
|
-
66:
|
|
27
|
-
67: <span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span> <span class="ruby-comment cmt"># one</span>
|
|
28
|
-
68: <span class="ruby-value">1</span>
|
|
29
|
-
69:
|
|
30
|
-
70: <span class="ruby-keyword kw">when</span> <span class="ruby-value">4</span> <span class="ruby-comment cmt"># prime numbers</span>
|
|
31
|
-
71: <span class="ruby-identifier">genPrime</span>
|
|
32
|
-
72:
|
|
33
|
-
73: <span class="ruby-keyword kw">when</span> <span class="ruby-value">5</span> <span class="ruby-comment cmt"># power-of-two numbers</span>
|
|
34
|
-
74: <span class="ruby-identifier">genPowerOfTwo</span>
|
|
35
|
-
75: <span class="ruby-keyword kw">end</span>
|
|
36
|
-
76: <span class="ruby-keyword kw">end</span></pre>
|
|
37
|
-
</body>
|
|
38
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
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>genPrime (InputGenerator)</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/InputGenerator.rb, line 81</span>
|
|
14
|
-
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genPrime</span>
|
|
15
|
-
82: <span class="ruby-identifier">prime</span> = <span class="ruby-constant">PrimeNums</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-constant">PrimeNums</span>.<span class="ruby-identifier">size</span>)]
|
|
16
|
-
83: <span class="ruby-identifier">prime</span> <span class="ruby-operator"><</span> <span class="ruby-ivar">@inputLimit</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">prime</span> <span class="ruby-operator">:</span> <span class="ruby-value">2</span>
|
|
17
|
-
84: <span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
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>genPowerOfTwo (InputGenerator)</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/InputGenerator.rb, line 89</span>
|
|
14
|
-
89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">genPowerOfTwo</span>
|
|
15
|
-
90: <span class="ruby-identifier">power</span> = <span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@inputBits</span>) <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
|
16
|
-
91: (<span class="ruby-value">2</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">power</span>) <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
|
17
|
-
92: <span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,23 +0,0 @@
|
|
|
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>setup (MaximumCounterValue)</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/counter/counter_unitTest_spec.rb, line 34</span>
|
|
14
|
-
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
|
15
|
-
35: <span class="ruby-ivar">@design</span> = <span class="ruby-constant">Counter</span>.<span class="ruby-identifier">new</span>
|
|
16
|
-
36: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">reset!</span>
|
|
17
|
-
37:
|
|
18
|
-
38: <span class="ruby-comment cmt"># increment the counter to maximum value</span>
|
|
19
|
-
39: <span class="ruby-constant">MAX</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-identifier">relay_verilog</span> <span class="ruby-keyword kw">end</span>
|
|
20
|
-
40: <span class="ruby-identifier">assert_equal</span> <span class="ruby-constant">MAX</span>, <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">intVal</span>
|
|
21
|
-
41: <span class="ruby-keyword kw">end</span></pre>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
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>test_overflow (MaximumCounterValue)</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/counter/counter_unitTest_spec.rb, line 43</span>
|
|
14
|
-
43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_overflow</span>
|
|
15
|
-
44: <span class="ruby-comment cmt"># increment the counter</span>
|
|
16
|
-
45: <span class="ruby-identifier">relay_verilog</span>
|
|
17
|
-
46:
|
|
18
|
-
47: <span class="ruby-identifier">assert_equal</span> <span class="ruby-value">0</span>, <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">intVal</span>
|
|
19
|
-
48: <span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
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>setup (ResettedCounterValue)</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/counter/counter_unitTest_spec.rb, line 12</span>
|
|
14
|
-
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
|
15
|
-
13: <span class="ruby-ivar">@design</span> = <span class="ruby-constant">Counter</span>.<span class="ruby-identifier">new</span>
|
|
16
|
-
14: <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">reset!</span>
|
|
17
|
-
15: <span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
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>test_zero (ResettedCounterValue)</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/counter/counter_unitTest_spec.rb, line 17</span>
|
|
14
|
-
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_zero</span>
|
|
15
|
-
18: <span class="ruby-identifier">assert_equal</span> <span class="ruby-value">0</span>, <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">intVal</span>
|
|
16
|
-
19: <span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,23 +0,0 @@
|
|
|
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>test_increment (ResettedCounterValue)</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/counter/counter_unitTest_spec.rb, line 21</span>
|
|
14
|
-
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_increment</span>
|
|
15
|
-
22: <span class="ruby-constant">LIMIT</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
16
|
-
23: <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">i</span>, <span class="ruby-ivar">@design</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">intVal</span>
|
|
17
|
-
24:
|
|
18
|
-
25: <span class="ruby-comment cmt"># advance the clock</span>
|
|
19
|
-
26: <span class="ruby-identifier">relay_verilog</span>
|
|
20
|
-
27: <span class="ruby-keyword kw">end</span>
|
|
21
|
-
28: <span class="ruby-keyword kw">end</span></pre>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,39 +0,0 @@
|
|
|
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>init_bench (RubyVPI)</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 lib/ruby-vpi.rb, line 24</span>
|
|
14
|
-
24: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init_bench</span> <span class="ruby-identifier">aTestPrefix</span>, <span class="ruby-identifier">aProtoClassId</span>
|
|
15
|
-
25: <span class="ruby-constant">Vpi</span><span class="ruby-operator">::</span><span class="ruby-identifier">relay_verilog</span> <span class="ruby-comment cmt"># service the $ruby_init() callback</span>
|
|
16
|
-
26:
|
|
17
|
-
27: <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-vpi/vpi_util'</span>
|
|
18
|
-
28:
|
|
19
|
-
29: <span class="ruby-comment cmt"># load the design under test</span>
|
|
20
|
-
30: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{aTestPrefix}_design.rb"</span>
|
|
21
|
-
31:
|
|
22
|
-
32: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PROTO'</span>]
|
|
23
|
-
33: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{aTestPrefix}_proto.rb"</span>
|
|
24
|
-
34:
|
|
25
|
-
35: <span class="ruby-identifier">proto</span> = <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">aProtoClassId</span>).<span class="ruby-identifier">new</span>
|
|
26
|
-
36:
|
|
27
|
-
37: <span class="ruby-constant">Vpi</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
|
28
|
-
38: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:relay_verilog</span> <span class="ruby-keyword kw">do</span>
|
|
29
|
-
39: <span class="ruby-identifier">proto</span>.<span class="ruby-identifier">simulate!</span>
|
|
30
|
-
40: <span class="ruby-keyword kw">end</span>
|
|
31
|
-
41: <span class="ruby-keyword kw">end</span>
|
|
32
|
-
42:
|
|
33
|
-
43: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{aTestPrefix}: verifying prototype instead of design"</span>
|
|
34
|
-
44: <span class="ruby-keyword kw">end</span>
|
|
35
|
-
45:
|
|
36
|
-
46: <span class="ruby-identifier">require</span> <span class="ruby-node">"#{aTestPrefix}_spec.rb"</span>
|
|
37
|
-
47: <span class="ruby-keyword kw">end</span></pre>
|
|
38
|
-
</body>
|
|
39
|
-
</html>
|