ruby-vpi 7.2.0 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HEADER +4 -5
- data/HISTORY +18 -2
- data/MEMO +10 -6
- data/Rakefile +11 -14
- data/bin/generate_test.rb +7 -58
- data/bin/generate_test_tpl/bench.v +15 -19
- data/bin/generate_test_tpl/design.rb +8 -8
- data/bin/generate_test_tpl/spec.rb +2 -2
- data/bin/header_to_ruby.rb +2 -27
- data/doc/xhtml/background.organization.html +1 -1
- data/doc/xhtml/index.html +2 -2
- data/header.html +3 -6
- data/header.part.html +3 -6
- data/history.html +35 -8
- data/history.part.html +32 -2
- data/lib/ruby-vpi/verilog_parser.rb +136 -0
- data/lib/ruby-vpi/vpi_util.rb +10 -0
- data/memo.html +19 -17
- data/memo.part.html +16 -11
- data/readme.html +3 -6
- 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/{M000011.html → M000018.html} +0 -0
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/{M000065.html → M000073.html} +0 -0
- data/ref/ruby/classes/FileUtils.src/{M000066.html → M000074.html} +0 -0
- data/ref/ruby/classes/OutputInfo.html +5 -5
- data/ref/ruby/classes/OutputInfo.src/{M000007.html → M000014.html} +37 -37
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000069.html → M000077.html} +0 -0
- data/ref/ruby/classes/RubyVPI.html +10 -10
- data/ref/ruby/classes/RubyVPI.src/{M000067.html → M000075.html} +0 -0
- data/ref/ruby/classes/RubyVPI.src/{M000068.html → M000076.html} +0 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +72 -35
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000065.html +18 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000066.html +18 -0
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000059.html → M000067.html} +8 -8
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000060.html → M000068.html} +29 -29
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000061.html → M000069.html} +63 -63
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000062.html → M000070.html} +106 -106
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000063.html → M000071.html} +12 -12
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/{M000064.html → M000072.html} +4 -4
- data/ref/ruby/classes/String.html +27 -9
- data/ref/ruby/classes/String.src/M000016.html +41 -0
- data/ref/ruby/classes/String.src/M000017.html +18 -0
- data/ref/ruby/classes/Table.html +20 -20
- data/ref/ruby/classes/Table.src/{M000003.html → M000010.html} +0 -0
- data/ref/ruby/classes/Table.src/{M000004.html → M000011.html} +0 -0
- data/ref/ruby/classes/Table.src/{M000005.html → M000012.html} +0 -0
- data/ref/ruby/classes/Table.src/{M000006.html → M000013.html} +0 -0
- data/ref/ruby/classes/Template.html +5 -5
- data/ref/ruby/classes/Template.src/{M000010.html → M000015.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Parameter.html +160 -0
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000009.html +21 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.html +207 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +21 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +18 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +18 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +18 -0
- data/ref/ruby/classes/VerilogParser/Module.html +172 -0
- data/ref/ruby/classes/VerilogParser/Module.src/M000004.html +29 -0
- data/ref/ruby/classes/{ModuleInfo.html → VerilogParser.html} +38 -50
- data/ref/ruby/classes/VerilogParser.src/M000003.html +34 -0
- data/ref/ruby/classes/XX/Document.html +45 -45
- data/ref/ruby/classes/XX/Document.src/M000056.html +9 -8
- data/ref/ruby/classes/XX/Document.src/M000057.html +7 -21
- data/ref/ruby/classes/XX/Document.src/M000058.html +7 -85
- data/ref/ruby/classes/XX/Document.src/{M000053.html → M000059.html} +0 -0
- data/ref/ruby/classes/XX/Document.src/{M000054.html → M000060.html} +0 -0
- data/ref/ruby/classes/XX/Document.src/{M000055.html → M000061.html} +0 -0
- data/ref/ruby/classes/XX/Document.src/M000062.html +21 -0
- data/ref/ruby/classes/XX/Document.src/M000063.html +34 -0
- data/ref/ruby/classes/XX/Document.src/M000064.html +98 -0
- data/ref/ruby/classes/XX/HTML4/Strict.html +5 -5
- data/ref/ruby/classes/XX/HTML4/Strict.src/{M000016.html → M000022.html} +0 -0
- data/ref/ruby/classes/XX/HTML4/Transitional.html +5 -5
- data/ref/ruby/classes/XX/HTML4/Transitional.src/{M000015.html → M000021.html} +0 -0
- data/ref/ruby/classes/XX/HTML4.html +5 -5
- data/ref/ruby/classes/XX/HTML4.src/{M000014.html → M000020.html} +0 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.html +40 -40
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000028.html +9 -14
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000029.html +7 -9
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000024.html → M000030.html} +0 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000025.html → M000031.html} +0 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000026.html → M000032.html} +0 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/{M000027.html → M000033.html} +0 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000034.html +27 -0
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000035.html +22 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.html +100 -100
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000036.html +43 -19
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000037.html +20 -19
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000038.html +18 -15
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000039.html +35 -10
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000040.html +7 -13
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000041.html +18 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000042.html +19 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000043.html +19 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000044.html +15 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000045.html +10 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000046.html +13 -8
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000047.html +7 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000048.html +7 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000049.html +7 -7
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000050.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000051.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000052.html +21 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000053.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000054.html +20 -0
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000055.html +20 -0
- data/ref/ruby/classes/XX/Markup.html +5 -5
- data/ref/ruby/classes/XX/Markup.src/{M000021.html → M000027.html} +0 -0
- data/ref/ruby/classes/XX/XHTML/Strict.html +5 -5
- data/ref/ruby/classes/XX/XHTML/Strict.src/{M000020.html → M000026.html} +0 -0
- data/ref/ruby/classes/XX/XHTML/Transitional.html +5 -5
- data/ref/ruby/classes/XX/XHTML/Transitional.src/{M000019.html → M000025.html} +0 -0
- data/ref/ruby/classes/XX/XHTML.html +5 -5
- data/ref/ruby/classes/XX/XHTML.src/{M000018.html → M000024.html} +0 -0
- data/ref/ruby/classes/XX/XML.html +5 -5
- data/ref/ruby/classes/XX/XML.src/{M000013.html → M000019.html} +0 -0
- data/ref/ruby/classes/XX/XMLish.html +5 -5
- data/ref/ruby/classes/XX/XMLish.src/{M000017.html → M000023.html} +0 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +2 -1
- data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +15 -15
- data/ref/ruby/files/bin/header_to_ruby_rb.html +2 -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/rcov_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 +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +107 -0
- data/ref/ruby/files/lib/ruby-vpi/vpi_util_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/fr_class_index.html +4 -1
- data/ref/ruby/fr_file_index.html +1 -0
- data/ref/ruby/fr_method_index.html +75 -67
- data/samp/counter/counter_rspecTest_bench.v +4 -5
- data/samp/counter/counter_unitTest_bench.v +6 -5
- data/samp/pipelined_alu/Hw5UnitModel.rb +4 -4
- data/samp/pipelined_alu/hw5_unit.v +15 -23
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +9 -0
- data/samp/pipelined_alu/hw5_unit_test_bench.v +39 -0
- data/samp/pipelined_alu/hw5_unit_test_design.rb +88 -0
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +8 -0
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +28 -0
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +88 -0
- metadata +82 -63
- data/ref/ruby/classes/ModuleInfo.src/M000008.html +0 -44
- data/ref/ruby/classes/ModuleInfo.src/M000009.html +0 -26
- data/ref/ruby/classes/String.src/M000012.html +0 -37
- data/ref/ruby/classes/XX/Document.src/M000050.html +0 -22
- data/ref/ruby/classes/XX/Document.src/M000051.html +0 -20
- data/ref/ruby/classes/XX/Document.src/M000052.html +0 -20
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000022.html +0 -22
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000023.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000030.html +0 -56
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000031.html +0 -33
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000032.html +0 -31
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000033.html +0 -48
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000034.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000035.html +0 -31
- data/samp/pipelined_alu/hw5_unit_bench.rb +0 -8
- data/samp/pipelined_alu/hw5_unit_bench.v +0 -45
- data/samp/pipelined_alu/hw5_unit_design.rb +0 -18
- data/samp/pipelined_alu/hw5_unit_runner.rake +0 -10
- data/samp/pipelined_alu/hw5_unit_spec.rb +0 -123
@@ -20,75 +20,83 @@
|
|
20
20
|
<div id="index">
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
|
-
<a href="classes/XX/Document.html#
|
24
|
-
<a href="classes/SWIG/TYPE_p_unsigned_int.html#
|
25
|
-
<a href="classes/FileUtils.html#
|
26
|
-
<a href="classes/XX/Document.html#
|
27
|
-
<a href="classes/Table.html#
|
28
|
-
<a href="classes/SWIG/TYPE_p_unsigned_int.html#
|
29
|
-
<a href="classes/SWIG/TYPE_p_unsigned_int.html#
|
30
|
-
<a href="classes/SWIG/TYPE_p_unsigned_int.html#
|
31
|
-
<a href="classes/XX/HTML4.html#
|
32
|
-
<a href="classes/XX/HTML4/Transitional.html#
|
33
|
-
<a href="classes/XX/HTML4
|
34
|
-
<a href="classes/XX/Markup.html#
|
35
|
-
<a href="classes/RubyVPI.html#
|
36
|
-
<a href="classes/
|
37
|
-
<a href="classes/
|
38
|
-
<a href="classes/
|
39
|
-
<a href="classes/
|
40
|
-
<a href="classes/
|
41
|
-
<a href="classes/
|
42
|
-
<a href="classes/
|
23
|
+
<a href="classes/XX/Document.html#M000064"><< (XX::Document)</a><br />
|
24
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000071">[] (SWIG::TYPE_p_unsigned_int)</a><br />
|
25
|
+
<a href="classes/FileUtils.html#M000074">collect_args (FileUtils)</a><br />
|
26
|
+
<a href="classes/XX/Document.html#M000063">create (XX::Document)</a><br />
|
27
|
+
<a href="classes/Table.html#M000010">doc (Table)</a><br />
|
28
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000072">each (SWIG::TYPE_p_unsigned_int)</a><br />
|
29
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000068">get_value (SWIG::TYPE_p_unsigned_int)</a><br />
|
30
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000067">get_value_wrapper (SWIG::TYPE_p_unsigned_int)</a><br />
|
31
|
+
<a href="classes/XX/HTML4/Strict.html#M000022">html4_ (XX::HTML4::Strict)</a><br />
|
32
|
+
<a href="classes/XX/HTML4/Transitional.html#M000021">html4_ (XX::HTML4::Transitional)</a><br />
|
33
|
+
<a href="classes/XX/HTML4.html#M000020">html4_ (XX::HTML4)</a><br />
|
34
|
+
<a href="classes/XX/Markup.html#M000027">included (XX::Markup)</a><br />
|
35
|
+
<a href="classes/RubyVPI.html#M000075">init_bench (RubyVPI)</a><br />
|
36
|
+
<a href="classes/VerilogParser/Module/Port.html#M000006">input? (VerilogParser::Module::Port)</a><br />
|
37
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000070">method_missing (SWIG::TYPE_p_unsigned_int)</a><br />
|
38
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000036">method_missing (XX::Markup::InstanceMethods)</a><br />
|
39
|
+
<a href="classes/ERB.html#M000018">new (ERB)</a><br />
|
40
|
+
<a href="classes/VerilogParser/Module/Parameter.html#M000009">new (VerilogParser::Module::Parameter)</a><br />
|
41
|
+
<a href="classes/XX/Document.html#M000056">new (XX::Document)</a><br />
|
42
|
+
<a href="classes/VerilogParser.html#M000003">new (VerilogParser)</a><br />
|
43
|
+
<a href="classes/OutputInfo.html#M000014">new (OutputInfo)</a><br />
|
44
|
+
<a href="classes/VerilogParser/Module/Port.html#M000005">new (VerilogParser::Module::Port)</a><br />
|
45
|
+
<a href="classes/VerilogParser/Module.html#M000004">new (VerilogParser::Module)</a><br />
|
46
|
+
<a href="classes/Template.html#M000015">new (Template)</a><br />
|
43
47
|
<a href="files/lib/ruby-vpi/runner_rb.html#M000002">object_file_path (lib/ruby-vpi/runner.rb)</a><br />
|
44
|
-
<a href="classes/
|
45
|
-
<a href="classes/XX/Document.html#
|
46
|
-
<a href="classes/XX/Document.html#
|
47
|
-
<a href="classes/XX/Document.html#
|
48
|
-
<a href="classes/SWIG/TYPE_p_unsigned_int.html#
|
49
|
-
<a href="classes/
|
50
|
-
<a href="classes/
|
51
|
-
<a href="classes/
|
52
|
-
<a href="classes/
|
53
|
-
<a href="classes/
|
54
|
-
<a href="classes/Table.html#
|
55
|
-
<a href="classes/
|
56
|
-
<a href="classes/XX/Document.html#
|
57
|
-
<a href="classes/
|
58
|
-
<a href="classes/
|
48
|
+
<a href="classes/VerilogParser/Module/Port.html#M000007">output? (VerilogParser::Module::Port)</a><br />
|
49
|
+
<a href="classes/XX/Document.html#M000059">pop (XX::Document)</a><br />
|
50
|
+
<a href="classes/XX/Document.html#M000062">pretty (XX::Document)</a><br />
|
51
|
+
<a href="classes/XX/Document.html#M000058">push (XX::Document)</a><br />
|
52
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000069">put_value (SWIG::TYPE_p_unsigned_int)</a><br />
|
53
|
+
<a href="classes/VerilogParser/Module/Port.html#M000008">reg? (VerilogParser::Module::Port)</a><br />
|
54
|
+
<a href="classes/FileUtils.html#M000073">sh (FileUtils)</a><br />
|
55
|
+
<a href="classes/Table.html#M000012">to_html4 (Table)</a><br />
|
56
|
+
<a href="classes/String.html#M000017">to_ruby_const_name (String)</a><br />
|
57
|
+
<a href="classes/XX/Document.html#M000061">to_str (XX::Document)</a><br />
|
58
|
+
<a href="classes/Table.html#M000011">to_xhtml (Table)</a><br />
|
59
|
+
<a href="classes/Table.html#M000013">to_xml (Table)</a><br />
|
60
|
+
<a href="classes/XX/Document.html#M000057">top (XX::Document)</a><br />
|
61
|
+
<a href="classes/XX/Document.html#M000060">tracking_additions (XX::Document)</a><br />
|
62
|
+
<a href="classes/RDoc.html#M000077">usage_from_file (RDoc)</a><br />
|
63
|
+
<a href="classes/String.html#M000016">verilog_to_ruby (String)</a><br />
|
64
|
+
<a href="classes/RubyVPI.html#M000076">with_coverage_analysis (RubyVPI)</a><br />
|
59
65
|
<a href="files/bin/generate_test_rb.html#M000001">write_file (bin/generate_test.rb)</a><br />
|
60
|
-
<a href="classes/
|
61
|
-
<a href="classes/XX/XHTML
|
62
|
-
<a href="classes/XX/XHTML/
|
63
|
-
<a href="classes/XX/
|
64
|
-
<a href="classes/XX/
|
65
|
-
<a href="classes/XX/
|
66
|
-
<a href="classes/XX/Markup/
|
67
|
-
<a href="classes/XX/Markup/
|
68
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
69
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
70
|
-
<a href="classes/XX/Markup/InstanceMethods.html#M000047">
|
71
|
-
<a href="classes/XX/Markup/
|
72
|
-
<a href="classes/XX/Markup/
|
73
|
-
<a href="classes/XX/Markup/
|
74
|
-
<a href="classes/XX/Markup/
|
75
|
-
<a href="classes/XX/Markup/
|
76
|
-
<a href="classes/XX/Markup/
|
77
|
-
<a href="classes/XX/Markup/ClassMethods.html#
|
78
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
79
|
-
<a href="classes/XX/Markup/ClassMethods.html#
|
80
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
81
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
82
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
83
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
84
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
85
|
-
<a href="classes/XX/Markup/ClassMethods.html#
|
86
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
87
|
-
<a href="classes/XX/Markup/
|
88
|
-
<a href="classes/XX/Markup/
|
89
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
90
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
91
|
-
<a href="classes/XX/Markup/InstanceMethods.html#
|
66
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000065">x? (SWIG::TYPE_p_unsigned_int)</a><br />
|
67
|
+
<a href="classes/XX/XHTML.html#M000024">xhtml_ (XX::XHTML)</a><br />
|
68
|
+
<a href="classes/XX/XHTML/Transitional.html#M000025">xhtml_ (XX::XHTML::Transitional)</a><br />
|
69
|
+
<a href="classes/XX/XHTML/Strict.html#M000026">xhtml_ (XX::XHTML::Strict)</a><br />
|
70
|
+
<a href="classes/XX/XML.html#M000019">xml_ (XX::XML)</a><br />
|
71
|
+
<a href="classes/XX/XMLish.html#M000023">xmlish_ (XX::XMLish)</a><br />
|
72
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000052">xx_ancestors (XX::Markup::InstanceMethods)</a><br />
|
73
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000032">xx_ancestors (XX::Markup::ClassMethods)</a><br />
|
74
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000043">xx_any_ (XX::Markup::InstanceMethods)</a><br />
|
75
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000044">xx_cdata_ (XX::Markup::InstanceMethods)</a><br />
|
76
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000047">xx_class (XX::Markup::InstanceMethods)</a><br />
|
77
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000053">xx_config (XX::Markup::InstanceMethods)</a><br />
|
78
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000033">xx_config (XX::Markup::ClassMethods)</a><br />
|
79
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000054">xx_config_for (XX::Markup::InstanceMethods)</a><br />
|
80
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000034">xx_config_for (XX::Markup::ClassMethods)</a><br />
|
81
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000055">xx_configure (XX::Markup::InstanceMethods)</a><br />
|
82
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000035">xx_configure (XX::Markup::ClassMethods)</a><br />
|
83
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000030">xx_define_tag_method (XX::Markup::ClassMethods)</a><br />
|
84
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000050">xx_define_tag_method (XX::Markup::InstanceMethods)</a><br />
|
85
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000029">xx_define_tmp_method (XX::Markup::ClassMethods)</a><br />
|
86
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000049">xx_define_tmp_method (XX::Markup::InstanceMethods)</a><br />
|
87
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000040">xx_doc (XX::Markup::InstanceMethods)</a><br />
|
88
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000042">xx_markup_ (XX::Markup::InstanceMethods)</a><br />
|
89
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000045">xx_parse_attributes (XX::Markup::InstanceMethods)</a><br />
|
90
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000046">xx_parse_yaml_attributes (XX::Markup::InstanceMethods)</a><br />
|
91
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000031">xx_remove_tag_method (XX::Markup::ClassMethods)</a><br />
|
92
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000051">xx_remove_tag_method (XX::Markup::InstanceMethods)</a><br />
|
93
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000037">xx_tag_ (XX::Markup::InstanceMethods)</a><br />
|
94
|
+
<a href="classes/XX/Markup/ClassMethods.html#M000028">xx_tag_method_name (XX::Markup::ClassMethods)</a><br />
|
95
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000048">xx_tag_method_name (XX::Markup::InstanceMethods)</a><br />
|
96
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000041">xx_text_ (XX::Markup::InstanceMethods)</a><br />
|
97
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000038">xx_which (XX::Markup::InstanceMethods)</a><br />
|
98
|
+
<a href="classes/XX/Markup/InstanceMethods.html#M000039">xx_with_doc_in_effect (XX::Markup::InstanceMethods)</a><br />
|
99
|
+
<a href="classes/SWIG/TYPE_p_unsigned_int.html#M000066">z? (SWIG::TYPE_p_unsigned_int)</a><br />
|
92
100
|
</div>
|
93
101
|
</div>
|
94
102
|
</body>
|
@@ -4,12 +4,11 @@ module counter_rspecTest_bench;
|
|
4
4
|
|
5
5
|
// instantiate the design under test
|
6
6
|
parameter Size = 5;
|
7
|
+
reg clock;
|
8
|
+
reg reset;
|
9
|
+
wire [Size - 1 : 0] count;
|
7
10
|
|
8
|
-
|
9
|
-
reg reset;
|
10
|
-
wire [Size - 1 : 0] count;
|
11
|
-
|
12
|
-
counter#(.Size(Size))counter_rspecTest_bench_rspecTest_design(.clock(clock), .reset(reset), .count(count));
|
11
|
+
counter #(.Size(Size))counter_rspecTest_bench_design(.clock(clock), .reset(reset), .count(count));
|
13
12
|
|
14
13
|
// connect to the Ruby side of this bench
|
15
14
|
initial begin
|
@@ -1,15 +1,16 @@
|
|
1
1
|
/* This is the Verilog side of the bench. */
|
2
2
|
|
3
|
+
|
4
|
+
|
3
5
|
module counter_unitTest_bench;
|
4
6
|
|
5
7
|
// instantiate the design under test
|
6
8
|
parameter Size = 5;
|
9
|
+
reg clock;
|
10
|
+
reg reset;
|
11
|
+
wire [Size - 1 : 0] count;
|
7
12
|
|
8
|
-
|
9
|
-
reg reset;
|
10
|
-
wire [Size - 1 : 0] count;
|
11
|
-
|
12
|
-
counter#(.Size(Size))counter_unitTest_bench_unitTest_design(.clock(clock), .reset(reset), .count(count));
|
13
|
+
counter #(.Size(Size))counter_unitTest_bench_design(.clock(clock), .reset(reset), .count(count));
|
13
14
|
|
14
15
|
// connect to the Ruby side of this bench
|
15
16
|
initial begin
|
@@ -67,10 +67,10 @@ class Hw5UnitModel
|
|
67
67
|
|
68
68
|
# Number of cycles each operation uses.
|
69
69
|
OPERATION_LATENCIES = {
|
70
|
-
:add =>
|
71
|
-
:sub =>
|
72
|
-
:mul => 3,
|
73
|
-
:nop =>
|
70
|
+
:add => 1,
|
71
|
+
:sub => 2,
|
72
|
+
:mul => 3,
|
73
|
+
:nop => 1,
|
74
74
|
}
|
75
75
|
|
76
76
|
# The famous no-operation.
|
@@ -42,10 +42,9 @@ module hw5_unit(
|
|
42
42
|
);
|
43
43
|
|
44
44
|
|
45
|
-
|
46
|
-
// PHASE 0: perform the ALU operations
|
45
|
+
/* PHASE 0: perform the ALU operations */
|
47
46
|
|
48
|
-
|
47
|
+
// operation ID
|
49
48
|
reg [`DATABITS-1:0] in_databits_phase0;
|
50
49
|
reg [1:0] in_op_phase0;
|
51
50
|
|
@@ -54,24 +53,21 @@ module hw5_unit(
|
|
54
53
|
in_op_phase0 = in_op;
|
55
54
|
end
|
56
55
|
|
57
|
-
|
58
|
-
// addition
|
56
|
+
// addition
|
59
57
|
reg [`WIDTH-1:0] add_result_phase0;
|
60
58
|
|
61
59
|
always @(*) begin
|
62
60
|
add_result_phase0 = a + b;
|
63
61
|
end
|
64
62
|
|
65
|
-
|
66
|
-
// subtraction
|
63
|
+
// subtraction
|
67
64
|
reg [`WIDTH-1:0] sub_result_phase0;
|
68
65
|
|
69
66
|
always @(*) begin
|
70
67
|
sub_result_phase0 = a - b;
|
71
68
|
end
|
72
69
|
|
73
|
-
|
74
|
-
// multiplication
|
70
|
+
// multiplication
|
75
71
|
reg [`WIDTH-1:0] mul_result_phase0;
|
76
72
|
|
77
73
|
always @(*) begin
|
@@ -79,17 +75,16 @@ module hw5_unit(
|
|
79
75
|
end
|
80
76
|
|
81
77
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
78
|
+
// always @(posedge clk) begin
|
79
|
+
// $display("in_databits_phase0 => %d", in_databits_phase0);
|
80
|
+
// $display("in_op_phase0 => %d", in_op_phase0);
|
81
|
+
// $display("add_result_phase0 => %d", add_result_phase0);
|
82
|
+
// $display("sub_result_phase0 => %d", sub_result_phase0);
|
83
|
+
// $display("mul_result_phase0 => %d", mul_result_phase0);
|
84
|
+
// end
|
89
85
|
|
90
86
|
|
91
|
-
|
92
|
-
// PHASE 1: delay the ALU results
|
87
|
+
/* PHASE 1: delay the ALU results */
|
93
88
|
|
94
89
|
reg [`DATABITS-1:0] in_databits_phase1;
|
95
90
|
reg [1:0] in_op_phase1;
|
@@ -116,8 +111,7 @@ module hw5_unit(
|
|
116
111
|
// end
|
117
112
|
|
118
113
|
|
119
|
-
|
120
|
-
// PHASE 2: delay the ALU results
|
114
|
+
/* PHASE 2: delay the ALU results */
|
121
115
|
|
122
116
|
reg [`DATABITS-1:0] in_databits_phase2;
|
123
117
|
reg [1:0] in_op_phase2;
|
@@ -144,8 +138,7 @@ module hw5_unit(
|
|
144
138
|
// end
|
145
139
|
|
146
140
|
|
147
|
-
|
148
|
-
// PHASE 3: produce the outputs
|
141
|
+
/* PHASE 3: produce the outputs */
|
149
142
|
|
150
143
|
reg [`DATABITS-1:0] out_databits_next;
|
151
144
|
reg [1:0] out_op_next;
|
@@ -160,7 +153,6 @@ module hw5_unit(
|
|
160
153
|
|
161
154
|
out_databits_next = in_databits_phase2;
|
162
155
|
|
163
|
-
// determine res_next
|
164
156
|
case (in_op_phase2)
|
165
157
|
`OP_NOP:
|
166
158
|
res_next = 0;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/* This is the Verilog side of the bench. */
|
2
|
+
|
3
|
+
`define WIDTH 32
|
4
|
+
`define DATABITS 7
|
5
|
+
`define OP_NOP 0
|
6
|
+
`define OP_ADD 1
|
7
|
+
`define OP_SUB 2
|
8
|
+
`define OP_MULT 3
|
9
|
+
|
10
|
+
module hw5_unit_test_bench;
|
11
|
+
|
12
|
+
// instantiate the design under test
|
13
|
+
reg clk;
|
14
|
+
reg reset;
|
15
|
+
reg [`DATABITS-1:0] in_databits;
|
16
|
+
reg [`WIDTH-1:0] a;
|
17
|
+
reg [`WIDTH-1:0] b;
|
18
|
+
reg [1:0] in_op;
|
19
|
+
wire [`WIDTH-1:0] res;
|
20
|
+
wire [`DATABITS-1:0] out_databits;
|
21
|
+
wire [1:0] out_op;
|
22
|
+
|
23
|
+
hw5_unit hw5_unit_test_bench_design(.clk(clk), .reset(reset), .in_databits(in_databits), .a(a), .b(b), .in_op(in_op), .res(res), .out_databits(out_databits), .out_op(out_op));
|
24
|
+
|
25
|
+
// connect to the Ruby side of this bench
|
26
|
+
initial begin
|
27
|
+
clk = 0;
|
28
|
+
$ruby_init("ruby", "-w", "-rubygems", "hw5_unit_test_bench.rb");
|
29
|
+
end
|
30
|
+
|
31
|
+
always begin
|
32
|
+
#5 clk = ~clk;
|
33
|
+
end
|
34
|
+
|
35
|
+
always @(posedge clk) begin
|
36
|
+
#1 $ruby_relay;
|
37
|
+
end
|
38
|
+
|
39
|
+
endmodule
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# An interface to the design under test.
|
2
|
+
class Hw5_unit
|
3
|
+
include Vpi
|
4
|
+
|
5
|
+
WIDTH = 32
|
6
|
+
DATABITS = 7
|
7
|
+
OP_NOP = 0
|
8
|
+
OP_ADD = 1
|
9
|
+
OP_SUB = 2
|
10
|
+
OP_MULT = 3
|
11
|
+
|
12
|
+
# Supported types of ALU operations.
|
13
|
+
OPERATIONS = constants.grep(/^OP_/).map {|s| const_get s}
|
14
|
+
|
15
|
+
# Number of cycles needed to reset this design.
|
16
|
+
RESET_DELAY = 5
|
17
|
+
|
18
|
+
attr_reader :clk, :reset, :in_databits, :a, :b, :in_op, :res, :out_databits, :out_op
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@clk = vpi_handle_by_name("hw5_unit_test_bench.clk", nil)
|
22
|
+
@reset = vpi_handle_by_name("hw5_unit_test_bench.reset", nil)
|
23
|
+
@in_databits = vpi_handle_by_name("hw5_unit_test_bench.in_databits", nil)
|
24
|
+
@a = vpi_handle_by_name("hw5_unit_test_bench.a", nil)
|
25
|
+
@b = vpi_handle_by_name("hw5_unit_test_bench.b", nil)
|
26
|
+
@in_op = vpi_handle_by_name("hw5_unit_test_bench.in_op", nil)
|
27
|
+
@res = vpi_handle_by_name("hw5_unit_test_bench.res", nil)
|
28
|
+
@out_databits = vpi_handle_by_name("hw5_unit_test_bench.out_databits", nil)
|
29
|
+
@out_op = vpi_handle_by_name("hw5_unit_test_bench.out_op", nil)
|
30
|
+
end
|
31
|
+
|
32
|
+
def reset!
|
33
|
+
@reset.hexStrVal = 'x'
|
34
|
+
@in_databits.hexStrVal = 'x'
|
35
|
+
@a.hexStrVal = 'x'
|
36
|
+
@b.hexStrVal = 'x'
|
37
|
+
@in_op.hexStrVal = 'x'
|
38
|
+
|
39
|
+
|
40
|
+
@reset.intVal = 1
|
41
|
+
|
42
|
+
RESET_DELAY.times do
|
43
|
+
relay_verilog
|
44
|
+
end
|
45
|
+
|
46
|
+
@reset.intVal = 0
|
47
|
+
end
|
48
|
+
|
49
|
+
# Represents an ALU operation.
|
50
|
+
class Operation
|
51
|
+
attr_accessor :type, :tag, :arg1, :arg2, :stage, :result
|
52
|
+
|
53
|
+
def initialize(type, tag, arg1 = 0, arg2 = 0)
|
54
|
+
raise ArgumentError unless OPERATIONS.include? type
|
55
|
+
|
56
|
+
@type = type
|
57
|
+
@tag = tag
|
58
|
+
@arg1 = arg1
|
59
|
+
@arg2 = arg2
|
60
|
+
|
61
|
+
@stage = 0
|
62
|
+
end
|
63
|
+
|
64
|
+
# Computes the result of this operation.
|
65
|
+
def compute
|
66
|
+
case @type
|
67
|
+
when OP_ADD
|
68
|
+
@arg1 + @arg2
|
69
|
+
|
70
|
+
when OP_SUB
|
71
|
+
@arg1 - @arg2
|
72
|
+
|
73
|
+
when OP_MULT
|
74
|
+
@arg1 * @arg2
|
75
|
+
|
76
|
+
when OP_NOP
|
77
|
+
nil
|
78
|
+
|
79
|
+
else
|
80
|
+
raise
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def compute!
|
85
|
+
@result = compute
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
## This file builds and runs the test.
|
2
|
+
|
3
|
+
# These are source files that are to be simulated.
|
4
|
+
SIMULATOR_SOURCES = [
|
5
|
+
'hw5_unit_test_bench.v',
|
6
|
+
'hw5_unit.v',
|
7
|
+
]
|
8
|
+
|
9
|
+
# This specifies the "top module" that is to be simulated.
|
10
|
+
SIMULATOR_TARGET = 'hw5_unit_test_bench'
|
11
|
+
|
12
|
+
# These are command-line arguments for the simulator.
|
13
|
+
# They can be specified as a string or an array of strings.
|
14
|
+
SIMULATOR_ARGS = {
|
15
|
+
# GPL Cver
|
16
|
+
:cver => '',
|
17
|
+
|
18
|
+
# Icarus Verilog
|
19
|
+
:ivl => '',
|
20
|
+
|
21
|
+
# Synopsys VCS
|
22
|
+
:vcs => '',
|
23
|
+
|
24
|
+
# Mentor Modelsim
|
25
|
+
:vsim => '',
|
26
|
+
}
|
27
|
+
|
28
|
+
require 'ruby-vpi/runner'
|
@@ -0,0 +1,88 @@
|
|
1
|
+
## This specification verifies the design under test.
|
2
|
+
=begin
|
3
|
+
Copyright 2006 Suraj N. Kurapati
|
4
|
+
|
5
|
+
This file is part of Ruby-VPI.
|
6
|
+
|
7
|
+
Ruby-VPI is free software; you can redistribute it and/or
|
8
|
+
modify it under the terms of the GNU General Public License
|
9
|
+
as published by the Free Software Foundation; either version 2
|
10
|
+
of the License, or (at your option) any later version.
|
11
|
+
|
12
|
+
Ruby-VPI is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
19
|
+
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
20
|
+
=end
|
21
|
+
|
22
|
+
require 'InputGenerator'
|
23
|
+
|
24
|
+
class Hw5_unit_test_spec < Test::Unit::TestCase
|
25
|
+
include Vpi
|
26
|
+
|
27
|
+
# Number of input sequences to test.
|
28
|
+
NUM_TESTS = 4000
|
29
|
+
|
30
|
+
# Bitmask capable of capturing ALU result.
|
31
|
+
ALU_RESULT_MASK = (2 ** Hw5_unit::WIDTH) - 1
|
32
|
+
|
33
|
+
# Upper limit of values allowed for an operation's tag.
|
34
|
+
OPERATION_TAG_LIMIT = 2 ** Hw5_unit::DATABITS
|
35
|
+
|
36
|
+
def setup
|
37
|
+
@ig = InputGenerator.new(Hw5_unit::WIDTH)
|
38
|
+
|
39
|
+
@design = Hw5_unit.new
|
40
|
+
@design.reset!
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_pipeline
|
44
|
+
issuedOps = []
|
45
|
+
numIssued = numVerified = 0
|
46
|
+
|
47
|
+
until numVerified == NUM_TESTS
|
48
|
+
# issue a new operation
|
49
|
+
if numIssued < NUM_TESTS
|
50
|
+
op = Hw5_unit::Operation.new(
|
51
|
+
Hw5_unit::OPERATIONS[rand(Hw5_unit::OPERATIONS.size)],
|
52
|
+
numIssued % OPERATION_TAG_LIMIT,
|
53
|
+
@ig.gen.abs,
|
54
|
+
@ig.gen.abs
|
55
|
+
)
|
56
|
+
|
57
|
+
@design.a.intVal = op.arg1
|
58
|
+
@design.b.intVal = op.arg2
|
59
|
+
@design.in_op.intVal = op.type
|
60
|
+
@design.in_databits.intVal = op.tag
|
61
|
+
|
62
|
+
issuedOps << op
|
63
|
+
numIssued += 1
|
64
|
+
end
|
65
|
+
|
66
|
+
relay_verilog
|
67
|
+
|
68
|
+
# verify result of finished operation
|
69
|
+
unless @design.out_databits.x?
|
70
|
+
finishedOp = Hw5_unit::Operation.new(
|
71
|
+
@design.out_op.intVal,
|
72
|
+
@design.out_databits.intVal
|
73
|
+
)
|
74
|
+
finishedOp.result = @design.res.intVal & ALU_RESULT_MASK
|
75
|
+
|
76
|
+
expectedOp = issuedOps.shift
|
77
|
+
assert_equal expectedOp.type, finishedOp.type, "incorrect operation"
|
78
|
+
assert_equal expectedOp.tag, finishedOp.tag, "incorrect tag"
|
79
|
+
|
80
|
+
unless finishedOp.type == Hw5_unit::OP_NOP
|
81
|
+
assert_equal expectedOp.compute & ALU_RESULT_MASK, finishedOp.result, "incorrect result"
|
82
|
+
end
|
83
|
+
|
84
|
+
numVerified += 1
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|