ruby-vpi 9.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +120 -56
- data/MEMO +8 -0
- data/README +1 -1
- data/Rakefile +2 -2
- data/bin/generate_test.rb +11 -12
- data/bin/generate_test_tpl/bench.rb +2 -2
- data/bin/generate_test_tpl/bench.v +1 -4
- data/bin/generate_test_tpl/design.rb +6 -20
- data/bin/generate_test_tpl/proto.rb +5 -3
- data/bin/generate_test_tpl/runner.rake +2 -1
- data/bin/generate_test_tpl/spec.rb +5 -12
- data/doc/background.organization.html +1 -1
- data/doc/background.running-tests.html +1 -1
- data/doc/index.html +2 -2
- data/doc/manual.txt +276 -223
- data/doc/problem.ivl.html +3 -3
- data/doc/problems.html +1 -1
- data/doc/problems.ruby.html +1 -1
- data/doc/problems.vsim.html +1 -1
- data/doc/setup.html +3 -0
- data/doc/setup.installation.html +9 -0
- data/doc/setup.maintenance.html +3 -0
- data/doc/setup.reqs.html +3 -0
- data/doc/src/manual.xml +232 -195
- data/doc/styles/manual.css +8 -0
- data/doc/usage.examples.html +1 -1
- data/doc/usage.html +1 -1
- data/doc/usage.tools.html +7 -1
- data/doc/usage.tutorial.html +50 -56
- data/history.html +195 -77
- data/history.part.html +195 -77
- data/lib/ruby-vpi/vpi.rb +13 -1
- data/lib/ruby-vpi.rb +18 -7
- data/memo.html +19 -0
- data/memo.part.html +19 -0
- data/readme.html +1 -1
- data/readme.part.html +1 -1
- data/samp/counter/counter_rspec_bench.rb +2 -2
- data/samp/counter/counter_rspec_bench.v +1 -4
- data/samp/counter/counter_rspec_design.rb +4 -18
- data/samp/counter/counter_rspec_proto.rb +7 -5
- data/samp/counter/counter_rspec_runner.rake +2 -1
- data/samp/counter/counter_rspec_spec.rb +8 -12
- data/samp/counter/counter_xunit_bench.rb +2 -2
- data/samp/counter/counter_xunit_bench.v +1 -4
- data/samp/counter/counter_xunit_design.rb +4 -18
- data/samp/counter/counter_xunit_proto.rb +7 -5
- data/samp/counter/counter_xunit_runner.rake +2 -1
- data/samp/counter/counter_xunit_spec.rb +8 -14
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +3 -3
- data/samp/pipelined_alu/hw5_unit_test_bench.v +1 -4
- data/samp/pipelined_alu/hw5_unit_test_design.rb +49 -65
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +9 -5
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +2 -1
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +18 -21
- metadata +8 -242
- data/doc/usage.installation.html +0 -9
- data/doc/usage.recommendations.html +0 -3
- data/doc/usage.requirements.html +0 -3
- data/ref/c/annotated.html +0 -35
- data/ref/c/common_8h.html +0 -146
- data/ref/c/doxygen.css +0 -358
- data/ref/c/doxygen.png +0 -0
- data/ref/c/files.html +0 -34
- data/ref/c/functions.html +0 -134
- data/ref/c/functions_vars.html +0 -134
- data/ref/c/globals.html +0 -55
- data/ref/c/globals_0x63.html +0 -86
- data/ref/c/globals_0x65.html +0 -55
- data/ref/c/globals_0x66.html +0 -55
- data/ref/c/globals_0x70.html +0 -71
- data/ref/c/globals_0x72.html +0 -62
- data/ref/c/globals_0x73.html +0 -65
- data/ref/c/globals_0x74.html +0 -55
- data/ref/c/globals_0x76.html +0 -472
- data/ref/c/globals_0x78.html +0 -55
- data/ref/c/globals_defs.html +0 -81
- data/ref/c/globals_defs_0x65.html +0 -50
- data/ref/c/globals_defs_0x70.html +0 -51
- data/ref/c/globals_defs_0x76.html +0 -463
- data/ref/c/globals_defs_0x78.html +0 -50
- data/ref/c/globals_enum.html +0 -39
- data/ref/c/globals_eval.html +0 -40
- data/ref/c/globals_func.html +0 -49
- data/ref/c/globals_type.html +0 -63
- data/ref/c/globals_vars.html +0 -42
- data/ref/c/index.html +0 -20
- data/ref/c/relay_8c.html +0 -214
- data/ref/c/relay_8h.html +0 -129
- data/ref/c/structrelay____RubyOptions____def.html +0 -67
- data/ref/c/structt__cb__data.html +0 -151
- data/ref/c/structt__vpi__delay.html +0 -134
- data/ref/c/structt__vpi__error__info.html +0 -151
- data/ref/c/structt__vpi__strengthval.html +0 -83
- data/ref/c/structt__vpi__systf__data.html +0 -151
- data/ref/c/structt__vpi__time.html +0 -100
- data/ref/c/structt__vpi__value.html +0 -204
- data/ref/c/structt__vpi__vecval.html +0 -66
- data/ref/c/structt__vpi__vlog__info.html +0 -100
- data/ref/c/swig_8c.html +0 -80
- data/ref/c/swig_8h.html +0 -83
- data/ref/c/tab_b.gif +0 -0
- data/ref/c/tab_l.gif +0 -0
- data/ref/c/tab_r.gif +0 -0
- data/ref/c/tabs.css +0 -102
- data/ref/c/verilog_8h.html +0 -117
- data/ref/c/vlog_8c.html +0 -168
- data/ref/c/vlog_8h.html +0 -128
- data/ref/c/vpi__user_8h.html +0 -8739
- data/ref/ruby/classes/ERB.html +0 -158
- data/ref/ruby/classes/ERB.src/M000034.html +0 -29
- data/ref/ruby/classes/FileUtils.html +0 -165
- data/ref/ruby/classes/FileUtils.src/M000089.html +0 -18
- data/ref/ruby/classes/FileUtils.src/M000090.html +0 -18
- data/ref/ruby/classes/Integer.html +0 -398
- data/ref/ruby/classes/Integer.src/M000012.html +0 -25
- data/ref/ruby/classes/Integer.src/M000013.html +0 -18
- data/ref/ruby/classes/Integer.src/M000014.html +0 -18
- data/ref/ruby/classes/Integer.src/M000015.html +0 -18
- data/ref/ruby/classes/Integer.src/M000016.html +0 -18
- data/ref/ruby/classes/Integer.src/M000017.html +0 -18
- data/ref/ruby/classes/Integer.src/M000020.html +0 -22
- data/ref/ruby/classes/Integer.src/M000021.html +0 -22
- data/ref/ruby/classes/Integer.src/M000022.html +0 -25
- data/ref/ruby/classes/Integer.src/M000023.html +0 -31
- data/ref/ruby/classes/Integer.src/M000024.html +0 -25
- data/ref/ruby/classes/Integer.src/M000025.html +0 -30
- data/ref/ruby/classes/OutputInfo.html +0 -299
- data/ref/ruby/classes/OutputInfo.src/M000030.html +0 -51
- data/ref/ruby/classes/RDoc.html +0 -135
- data/ref/ruby/classes/RDoc.src/M000093.html +0 -40
- data/ref/ruby/classes/RubyVpi/Config.html +0 -148
- data/ref/ruby/classes/RubyVpi.html +0 -186
- data/ref/ruby/classes/RubyVpi.src/M000091.html +0 -50
- data/ref/ruby/classes/RubyVpi.src/M000092.html +0 -20
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.html +0 -407
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000081.html +0 -18
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000082.html +0 -18
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000083.html +0 -22
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000084.html +0 -44
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000085.html +0 -82
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000086.html +0 -127
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000087.html +0 -26
- data/ref/ruby/classes/SWIG/TYPE_p_unsigned_int.src/M000088.html +0 -18
- data/ref/ruby/classes/SWIG.html +0 -111
- data/ref/ruby/classes/String.html +0 -158
- data/ref/ruby/classes/String.src/M000032.html +0 -41
- data/ref/ruby/classes/String.src/M000033.html +0 -18
- data/ref/ruby/classes/Table.html +0 -191
- data/ref/ruby/classes/Table.src/M000026.html +0 -38
- data/ref/ruby/classes/Table.src/M000027.html +0 -18
- data/ref/ruby/classes/Table.src/M000028.html +0 -18
- data/ref/ruby/classes/Table.src/M000029.html +0 -18
- data/ref/ruby/classes/Template.html +0 -158
- data/ref/ruby/classes/Template.src/M000031.html +0 -18
- data/ref/ruby/classes/VerilogParser/Module/Parameter.html +0 -160
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000011.html +0 -21
- data/ref/ruby/classes/VerilogParser/Module/Port.html +0 -207
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +0 -21
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +0 -18
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000009.html +0 -18
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000010.html +0 -18
- data/ref/ruby/classes/VerilogParser/Module.html +0 -172
- data/ref/ruby/classes/VerilogParser/Module.src/M000006.html +0 -29
- data/ref/ruby/classes/VerilogParser.html +0 -187
- data/ref/ruby/classes/VerilogParser.src/M000005.html +0 -34
- data/ref/ruby/classes/XX/Document.html +0 -295
- data/ref/ruby/classes/XX/Document.src/M000072.html +0 -22
- data/ref/ruby/classes/XX/Document.src/M000073.html +0 -20
- data/ref/ruby/classes/XX/Document.src/M000074.html +0 -20
- data/ref/ruby/classes/XX/Document.src/M000075.html +0 -20
- data/ref/ruby/classes/XX/Document.src/M000076.html +0 -22
- data/ref/ruby/classes/XX/Document.src/M000077.html +0 -21
- data/ref/ruby/classes/XX/Document.src/M000078.html +0 -21
- data/ref/ruby/classes/XX/Document.src/M000079.html +0 -34
- data/ref/ruby/classes/XX/Document.src/M000080.html +0 -98
- data/ref/ruby/classes/XX/HTML4/Strict.html +0 -138
- data/ref/ruby/classes/XX/HTML4/Strict.src/M000038.html +0 -20
- data/ref/ruby/classes/XX/HTML4/Transitional.html +0 -138
- data/ref/ruby/classes/XX/HTML4/Transitional.src/M000037.html +0 -20
- data/ref/ruby/classes/XX/HTML4.html +0 -145
- data/ref/ruby/classes/XX/HTML4.src/M000036.html +0 -20
- data/ref/ruby/classes/XX/Markup/ClassMethods.html +0 -236
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000044.html +0 -22
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000045.html +0 -20
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000046.html +0 -25
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000047.html +0 -20
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000048.html +0 -27
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000049.html +0 -20
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000050.html +0 -27
- data/ref/ruby/classes/XX/Markup/ClassMethods.src/M000051.html +0 -22
- data/ref/ruby/classes/XX/Markup/Error.html +0 -111
- data/ref/ruby/classes/XX/Markup/InstanceMethods.html +0 -474
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000052.html +0 -56
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000053.html +0 -33
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000054.html +0 -31
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000055.html +0 -48
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000056.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000057.html +0 -31
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000058.html +0 -32
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000059.html +0 -32
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000060.html +0 -28
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000061.html +0 -23
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000062.html +0 -26
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000063.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000064.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000065.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000066.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000067.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000068.html +0 -21
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000069.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000070.html +0 -20
- data/ref/ruby/classes/XX/Markup/InstanceMethods.src/M000071.html +0 -20
- data/ref/ruby/classes/XX/Markup.html +0 -160
- data/ref/ruby/classes/XX/Markup.src/M000043.html +0 -28
- data/ref/ruby/classes/XX/XHTML/Strict.html +0 -138
- data/ref/ruby/classes/XX/XHTML/Strict.src/M000041.html +0 -20
- data/ref/ruby/classes/XX/XHTML/Transitional.html +0 -138
- data/ref/ruby/classes/XX/XHTML/Transitional.src/M000040.html +0 -20
- data/ref/ruby/classes/XX/XHTML.html +0 -145
- data/ref/ruby/classes/XX/XHTML.src/M000039.html +0 -36
- data/ref/ruby/classes/XX/XML.html +0 -138
- data/ref/ruby/classes/XX/XML.src/M000035.html +0 -20
- data/ref/ruby/classes/XX/XMLish.html +0 -138
- data/ref/ruby/classes/XX/XMLish.src/M000042.html +0 -18
- data/ref/ruby/classes/XX.html +0 -138
- data/ref/ruby/created.rid +0 -1
- data/ref/ruby/files/bin/generate_test_rb.html +0 -245
- data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +0 -18
- data/ref/ruby/files/bin/generate_test_rb.src/M000002.html +0 -39
- data/ref/ruby/files/bin/header_to_ruby_rb.html +0 -125
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +0 -108
- data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +0 -101
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +0 -108
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +0 -111
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +0 -108
- data/ref/ruby/files/lib/ruby-vpi/rspec_rb.html +0 -115
- data/ref/ruby/files/lib/ruby-vpi/runner_proxy_rb.html +0 -108
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +0 -208
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000003.html +0 -24
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000004.html +0 -26
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +0 -107
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +0 -108
- data/ref/ruby/files/lib/ruby-vpi/xx_rb.html +0 -148
- data/ref/ruby/files/lib/ruby-vpi_rb.html +0 -109
- data/ref/ruby/fr_class_index.html +0 -56
- data/ref/ruby/fr_file_index.html +0 -40
- data/ref/ruby/fr_method_index.html +0 -119
- data/ref/ruby/index.html +0 -24
- data/ref/ruby/rdoc-style.css +0 -208
data/HISTORY
CHANGED
|
@@ -12,13 +12,55 @@ We _strictly_ follow the RubyGems project's "rational versioning policy":http://
|
|
|
12
12
|
fn1. C. Gross, "Explaining Open Source Version Numbers", [Online document], 2005 Nov 28, [cited 2006 Aug 27], Available HTTP: "http://ablog.apress.com/?p=738":http://ablog.apress.com/?p=738
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
h1. Version 10.0.0 (2006-11-05)
|
|
16
|
+
|
|
17
|
+
h2. Summary
|
|
18
|
+
|
|
19
|
+
This release adds the ability to access a handle's children and reduces the amount of code produced by the automated test generator.
|
|
20
|
+
|
|
21
|
+
h2. Acknowledgment
|
|
22
|
+
|
|
23
|
+
Thanks to Matt Fischler for finding the problem of misdirected compilation errors in Verilog benches.
|
|
24
|
+
|
|
25
|
+
h2. Notice
|
|
26
|
+
|
|
27
|
+
* The way in which Ruby-VPI and generated tests interact has changed: the design is now a VPI handle object and the @design.rb@ and @proto.rb@ files define "singleton methods":http://wiki.rubygarden.org/Ruby/page/show/SingletonTutorial for that object.
|
|
28
|
+
** I suggest that you regenerate your existing tests (just run *generate_test.rb* again) whilst employing the service of a text merging tool (see the user manual).
|
|
29
|
+
|
|
30
|
+
* You can now access a handle's children by simply calling methods on it. In the event that a child handle has the same name as a VPI property, the child is given priority. However, you can always access VPI properties explicitly via the @get_value@ and @put_value@ methods.
|
|
31
|
+
|
|
32
|
+
* *generate_test.rb* no longer accepts the @-s@ and @-u@ options. Use their longer counterparts @--rspec@ and @--xunit@ instead.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
h2. Detail
|
|
36
|
+
|
|
37
|
+
h3. Automated test generator
|
|
38
|
+
|
|
39
|
+
* Generated Verilog benches no longer divert compilation errors from Verilog design files. That is, if the Verilog simulator finds compilation errors in a Verilog design file, it will report that the Verilog design file is at fault (instead of reporting that the generated Verilog bench is at fault).
|
|
40
|
+
|
|
41
|
+
* The user is now notified when a backup of an existing file is made.
|
|
42
|
+
|
|
43
|
+
* Generated tests have been greatly simplified to reduce the amount of work for the user.
|
|
44
|
+
** The design is now just a handle to the module in the Verilog bench.
|
|
45
|
+
** @include Vpi@ and @@design@ are no longer generated.
|
|
46
|
+
** The tutorial and examples have been updated accordingly.
|
|
47
|
+
|
|
48
|
+
h3. User manual
|
|
49
|
+
|
|
50
|
+
* Revised the stylesheet to make disjoint sections readily distinguishable from eachother, through generous spacing and minor coloring.
|
|
51
|
+
|
|
52
|
+
* Added tips about @ruby-vpi/runner_proxy@, @rake -T@, and using *kdiff3* with *generate_test.rb*.
|
|
53
|
+
|
|
54
|
+
* Moved installation information into a new "setup" chapter.
|
|
55
|
+
|
|
56
|
+
|
|
15
57
|
h1. Version 9.0.0 (2006-10-28)
|
|
16
58
|
|
|
17
59
|
h2. Summary
|
|
18
60
|
|
|
19
61
|
This release improves the automated test generator and adds new content to the user manual.
|
|
20
62
|
|
|
21
|
-
h2.
|
|
63
|
+
h2. Acknowledgment
|
|
22
64
|
|
|
23
65
|
Thanks to Matt Fischler for helping test and debug the installation of Ruby-VPI on Windows.
|
|
24
66
|
|
|
@@ -26,7 +68,7 @@ h2. Notice
|
|
|
26
68
|
|
|
27
69
|
* The command-line options for @generate_test.rb@ have changed. Run the command @generate_test.rb --help@ for details.
|
|
28
70
|
|
|
29
|
-
h2.
|
|
71
|
+
h2. Detail
|
|
30
72
|
|
|
31
73
|
* Test runners now attempt to resolve paths in @SIMULATOR_SOURCES@ by searching for them within the directories specified in @SIMULATOR_INCLUDES@.
|
|
32
74
|
|
|
@@ -54,7 +96,7 @@ h2. Summary
|
|
|
54
96
|
|
|
55
97
|
This release simplifies configuration of generated tests.
|
|
56
98
|
|
|
57
|
-
h2.
|
|
99
|
+
h2. Acknowledgment
|
|
58
100
|
|
|
59
101
|
Thanks to "students in CMPE-126":http://www.soe.ucsc.edu/classes/cmpe126/Fall06/ for their constructive criticism.
|
|
60
102
|
|
|
@@ -62,7 +104,7 @@ h2. Notice
|
|
|
62
104
|
|
|
63
105
|
* Generated runners now have a @SIMULATOR_INCLUDES@ array, whose entries specify places where Verilog source files, needed by the Verilog design, reside.
|
|
64
106
|
|
|
65
|
-
h2.
|
|
107
|
+
h2. Detail
|
|
66
108
|
|
|
67
109
|
* Generated Verilog benches now inherit all @`include@ and @`define@ directives from the Verilog design in a simpler manner.
|
|
68
110
|
* A generated test no longer requires its Verilog design to reside in the same directory.
|
|
@@ -79,7 +121,7 @@ h2. Notice
|
|
|
79
121
|
|
|
80
122
|
* The *vpi_util* library has been renamed to *vpi*. This change should not affect your code unless you explicitly imported this library via @require 'ruby-vpi/vpi_util'@. In which case, you should update your code to use @require 'ruby-vpi/vpi'@ accordingly.
|
|
81
123
|
|
|
82
|
-
h2.
|
|
124
|
+
h2. Detail
|
|
83
125
|
|
|
84
126
|
* An integer library has been added to simplify common tasks related to hardware and the binary number system. You can import this library for use via @require 'ruby-vpi/integer'@.
|
|
85
127
|
|
|
@@ -97,7 +139,7 @@ h2. Notice
|
|
|
97
139
|
* The @PROTO@ environment variable has been renamed to @PROTOTYPE@.
|
|
98
140
|
** In addition to using @unset@, you can now disable simulation of the prototype by assigning an empty value to this variable.
|
|
99
141
|
|
|
100
|
-
h2.
|
|
142
|
+
h2. Detail
|
|
101
143
|
|
|
102
144
|
* We now use "Darcs":http://darcs.net for revision control, instead of Subversion. The source repository can now be accessed at "http://ruby-vpi.rubyforge.org/src/ruby-vpi":http://ruby-vpi.rubyforge.org/src/ruby-vpi.
|
|
103
145
|
|
|
@@ -120,10 +162,10 @@ This release fixes a bug in generated Verilog benches, includes parsed constants
|
|
|
120
162
|
h2. Notice
|
|
121
163
|
|
|
122
164
|
* Handles now have two new methods:
|
|
123
|
-
** @handle.x?@
|
|
124
|
-
** @handle.z?@
|
|
165
|
+
** @handle.x?@ checks if the logic value is "don't care"
|
|
166
|
+
** @handle.z?@ checks if the logic value is high impedance
|
|
125
167
|
|
|
126
|
-
h2.
|
|
168
|
+
h2. Detail
|
|
127
169
|
|
|
128
170
|
* Module instantiation code in generated Verilog benches has been fixed. Whitespace between the module type and instance variable was missing.
|
|
129
171
|
|
|
@@ -139,11 +181,11 @@ h2. Summary
|
|
|
139
181
|
|
|
140
182
|
This release adds initial[1] support for code coverage analysis via the "rcov library":http://eigenclass.org/hiki.rb?rcov.
|
|
141
183
|
|
|
142
|
-
h2.
|
|
184
|
+
h2. Acknowledgment
|
|
143
185
|
|
|
144
186
|
Thanks to Mauricio Fernandez for helping me use rcov without its runner.
|
|
145
187
|
|
|
146
|
-
h2.
|
|
188
|
+
h2. Detail
|
|
147
189
|
|
|
148
190
|
* Added initial[1] support for code coverage analysis, which can be enabled by setting the @COVERAGE@ environment variable to a non-empty value before running a test.
|
|
149
191
|
** For example, you can run a test with the GPL Cver simulator while enabling the generation of code coverage reports as follows: @export COVERAGE=1; rake cver@
|
|
@@ -159,7 +201,7 @@ h2. Summary
|
|
|
159
201
|
|
|
160
202
|
This release simplifies running of multiple tests, restores compatibility with Synopsys VCS, and better integrates with RubyGems.
|
|
161
203
|
|
|
162
|
-
h2.
|
|
204
|
+
h2. Detail
|
|
163
205
|
|
|
164
206
|
* Added @lib/ruby-vpi/runner_proxy@ library which, when embedded into a Rakefile, runs all generated tests in the working directory with any specified arguments. For example, have a look at the @samp/counter/Rakefile@ file.
|
|
165
207
|
|
|
@@ -178,12 +220,10 @@ h2. Summary
|
|
|
178
220
|
|
|
179
221
|
This release distributes Ruby-VPI as a gem, improves portability of generated tests, and fixes a bug.
|
|
180
222
|
|
|
181
|
-
h2.
|
|
223
|
+
h2. Notice
|
|
182
224
|
|
|
183
225
|
* @put_value()@ now accomodates register value overflows when verifying the value it has written.
|
|
184
226
|
|
|
185
|
-
* Ruby-VPI is now distributed only as a "source gem":http://www.rubygems.org. You can decompress the gem without installing it onto your system by running the command @gem install -i output_directory ruby-vpi-7.0.0.gem@. In addition, you can still obtain the source code directly from the Subversion repository.
|
|
186
|
-
|
|
187
227
|
* The test generator's templates and the examples have been updated as follows:
|
|
188
228
|
** Test runners no longer have to specify the path to Ruby-VPI installation directory. Instead, they simply @require 'ruby-vpi/runner'@. Thus, you can run your tests on any machine with Ruby-VPI without having to know where it is installed.
|
|
189
229
|
** Ruby benches now invoke @RubyVPI.init_bench@ instead of @require 'bench'; setup_bench@ to become initialized.
|
|
@@ -192,6 +232,10 @@ h2. Details
|
|
|
192
232
|
|
|
193
233
|
* The @src/@ directory has been renamed to @ext/@ to follow RubyGems convention.
|
|
194
234
|
|
|
235
|
+
h2. Detail
|
|
236
|
+
|
|
237
|
+
* Ruby-VPI is now distributed only as a "source gem":http://www.rubygems.org. You can decompress the gem without installing it onto your system by running the command @gem install -i output_directory ruby-vpi-7.0.0.gem@. In addition, you can still obtain the source code directly from the Subversion repository.
|
|
238
|
+
|
|
195
239
|
* The tools in @bin/@ become available in your system's @bin/@ directory when the gem is installed.
|
|
196
240
|
** Usage and help information has been added to the @header_to_ruby.rb@ tool.
|
|
197
241
|
|
|
@@ -208,13 +252,16 @@ h2. Summary
|
|
|
208
252
|
|
|
209
253
|
This release adds support for the GPL Cver simulator, provides both binary and source packages, and explicitly defines the version numbering system.
|
|
210
254
|
|
|
211
|
-
h2.
|
|
212
|
-
|
|
213
|
-
* The GPL Cver simulator is now supported.
|
|
255
|
+
h2. Notice
|
|
214
256
|
|
|
215
257
|
* Ruby-VPI now only needs to be built once.
|
|
216
258
|
** You can run tests with different Verilog simulators without having to re-compile Ruby-VPI.
|
|
217
|
-
|
|
259
|
+
|
|
260
|
+
h2. Detail
|
|
261
|
+
|
|
262
|
+
* The GPL Cver simulator is now supported.
|
|
263
|
+
|
|
264
|
+
* Release packages are now available in both source and binary form.
|
|
218
265
|
|
|
219
266
|
* The RSpec based specifications for the counter example now use the @should_equal@ instead of the @should_be@ assertion, because the latter ensures strict equivalence. For instance, it will fail when a Fixnum is compared to a Bignum.
|
|
220
267
|
|
|
@@ -241,7 +288,13 @@ h2. Summary
|
|
|
241
288
|
|
|
242
289
|
This release beautifies generated tests, adds checks to find signal width bugs, and includes a new tool.
|
|
243
290
|
|
|
244
|
-
h2.
|
|
291
|
+
h2. Notice
|
|
292
|
+
|
|
293
|
+
* @put_value()@ now returns the value it puts. Therefore, it is easier to chain together a series of assignments: @foo.intVal = bar.intVal = baz.intVal = 10@
|
|
294
|
+
|
|
295
|
+
* @put_value()@ now verifies that the value it puts was written correctly. This helps to find bugs regarding invalid assumptions about the number of bits supported by a signal.
|
|
296
|
+
|
|
297
|
+
h2. Detail
|
|
245
298
|
|
|
246
299
|
* The test generator now uses ERB templates which ensures nice indentation of generated output.
|
|
247
300
|
|
|
@@ -249,10 +302,6 @@ h2. Details
|
|
|
249
302
|
|
|
250
303
|
* A tool which converts Verilog headers into Ruby has been added.
|
|
251
304
|
|
|
252
|
-
* @put_value()@ now returns the value it puts. Therefore, it is easier to chain together a series of assignments: @foo.intVal = bar.intVal = baz.intVal = 10@
|
|
253
|
-
|
|
254
|
-
* @put_value()@ now verifies that the value it puts was written correctly. This helps to find bugs regarding invalid assumptions about the number of bits supported by a signal.
|
|
255
|
-
|
|
256
305
|
* The source code is now indented with two spaces instead of one tab character.
|
|
257
306
|
|
|
258
307
|
|
|
@@ -262,7 +311,7 @@ h2. Summary
|
|
|
262
311
|
|
|
263
312
|
This release simplifies generated tests and fixes a bug.
|
|
264
313
|
|
|
265
|
-
h2.
|
|
314
|
+
h2. Detail
|
|
266
315
|
|
|
267
316
|
* The test generator now produces simpler Ruby benches and specifications.
|
|
268
317
|
** A template used by generated specifications has been added.
|
|
@@ -277,12 +326,7 @@ h2. Summary
|
|
|
277
326
|
|
|
278
327
|
This release adds support and documentation for rapid prototyping of Verilog designs in Ruby.
|
|
279
328
|
|
|
280
|
-
h2.
|
|
281
|
-
|
|
282
|
-
* Support for prototyping designs in Ruby, before they are implemented in Verilog, has been added.
|
|
283
|
-
** The _same_ specification can be used to verify both prototype _and_ design! :-)
|
|
284
|
-
** The tutorial in the user manual has been updated to discuss prototyping.
|
|
285
|
-
*** Prototypes have been added to the counter example.
|
|
329
|
+
h2. Notice
|
|
286
330
|
|
|
287
331
|
* The directory structure has been reorganized as follows:
|
|
288
332
|
** @ext@ → @src@
|
|
@@ -291,6 +335,13 @@ h2. Details
|
|
|
291
335
|
|
|
292
336
|
* All template files have been moved into the @tpl@ directory.
|
|
293
337
|
|
|
338
|
+
h2. Detail
|
|
339
|
+
|
|
340
|
+
* Support for prototyping designs in Ruby, before they are implemented in Verilog, has been added.
|
|
341
|
+
** The _same_ specification can be used to verify both prototype _and_ design! :-)
|
|
342
|
+
** The tutorial in the user manual has been updated to discuss prototyping.
|
|
343
|
+
*** Prototypes have been added to the counter example.
|
|
344
|
+
|
|
294
345
|
* The user manual has been revised for consistency.
|
|
295
346
|
|
|
296
347
|
|
|
@@ -300,11 +351,11 @@ h2. Summary
|
|
|
300
351
|
|
|
301
352
|
This release fixes unreadable syntax coloring in the user manual.
|
|
302
353
|
|
|
303
|
-
h2.
|
|
354
|
+
h2. Acknowledgment
|
|
304
355
|
|
|
305
356
|
* Thanks to Todd Nagengast and Matt Fischler for notifying me about unreadable text in the user manual.
|
|
306
357
|
|
|
307
|
-
h2.
|
|
358
|
+
h2. Detail
|
|
308
359
|
|
|
309
360
|
* Source code comments in the user manual are now readable.
|
|
310
361
|
|
|
@@ -317,11 +368,11 @@ h2. Summary
|
|
|
317
368
|
|
|
318
369
|
This release adds a tutorial to the user manual, and improves the tools and examples.
|
|
319
370
|
|
|
320
|
-
h2.
|
|
371
|
+
h2. Acknowledgment
|
|
321
372
|
|
|
322
373
|
* Thanks to Phil Tomson for correcting the URL of the RHDL website, in the user manual.
|
|
323
374
|
|
|
324
|
-
h2.
|
|
375
|
+
h2. Detail
|
|
325
376
|
|
|
326
377
|
h3. User manual
|
|
327
378
|
|
|
@@ -352,20 +403,22 @@ h2. Summary
|
|
|
352
403
|
|
|
353
404
|
This release enhances the VPI utility layer and adds new content to the user manual.
|
|
354
405
|
|
|
355
|
-
h2.
|
|
406
|
+
h2. Acknowledgment
|
|
356
407
|
|
|
357
408
|
* Thanks to Jan Decaluwe for correcting the description of MyHDL in the user manual.
|
|
358
409
|
|
|
359
|
-
h2.
|
|
410
|
+
h2. Notice
|
|
360
411
|
|
|
361
412
|
* SWIG is no longer required for users because its output is included in the release package.
|
|
362
413
|
|
|
414
|
+
* The @handle.value@ and @handle.value=@ methods have been removed.
|
|
415
|
+
|
|
416
|
+
h2. Detail
|
|
417
|
+
|
|
363
418
|
* The VPI utility layer provides access to VPI properties of handles in a "simpler, more powerful way":http://ruby-vpi.rubyforge.org/doc/background.organization.html#organization.vpi.
|
|
364
419
|
|
|
365
420
|
** All VPI properties, except delay values, are now accessible from a handle.
|
|
366
421
|
|
|
367
|
-
** The @handle.value@ and @handle.value=@ methods have been removed.
|
|
368
|
-
|
|
369
422
|
* The user manual has been revised and new content in the organization and usage sections has been added.
|
|
370
423
|
|
|
371
424
|
* This release was tested and developed using:
|
|
@@ -379,18 +432,20 @@ h2. Summary
|
|
|
379
432
|
|
|
380
433
|
This release adds a comprehensive user manual, upgrades from make to "Rake":http://rake.rubyforge.org, and improves the test generation tool.
|
|
381
434
|
|
|
382
|
-
h2.
|
|
435
|
+
h2. Acknowledgment
|
|
383
436
|
|
|
384
437
|
* Thanks to Jose Renau for solving the problem of strange delays that occurred whenever a design was reset.
|
|
385
438
|
|
|
386
|
-
h2.
|
|
387
|
-
|
|
388
|
-
* A comprehensive user manual, written in DocBook-XML, has been added.
|
|
439
|
+
h2. Notice
|
|
389
440
|
|
|
390
441
|
* Rake has replaced the role of *make*. All makefiles have been converted accordingly.
|
|
391
442
|
|
|
392
443
|
* The test generation tool now generates multiple files (runner, bench, design, spec) and makes backups of existing files. See its help information for details.
|
|
393
444
|
|
|
445
|
+
h2. Detail
|
|
446
|
+
|
|
447
|
+
* A comprehensive user manual, written in DocBook-XML, has been added.
|
|
448
|
+
|
|
394
449
|
* Support for RSpec 0.5.4 has been added.
|
|
395
450
|
** The counter example now makes use of RSpec.
|
|
396
451
|
|
|
@@ -405,11 +460,11 @@ h2. Summary
|
|
|
405
460
|
|
|
406
461
|
This release adds a tool which generates test benches, and adds support for "Behavior Driven Development":http://behaviour-driven.org via the "RSpec":http://rspec.rubyforge.org library.
|
|
407
462
|
|
|
408
|
-
h2.
|
|
463
|
+
h2. Acknowledgment
|
|
409
464
|
|
|
410
465
|
* Thanks to Scott L Holmes for helping me "use the RSpec library without its runner":http://article.gmane.org/gmane.comp.lang.ruby.general/150087 program.
|
|
411
466
|
|
|
412
|
-
h2.
|
|
467
|
+
h2. Detail
|
|
413
468
|
|
|
414
469
|
* A tool, which generates most of a Ruby-VPI test bench from a Verilog 2001 module declaration, has been added.
|
|
415
470
|
|
|
@@ -428,7 +483,11 @@ h2. Summary
|
|
|
428
483
|
|
|
429
484
|
This release adds simple ways of reading and writing values to VPI handles, adds documentation for the VPI utility layer, and fixes the pipelined ALU example.
|
|
430
485
|
|
|
431
|
-
h2.
|
|
486
|
+
h2. Notice
|
|
487
|
+
|
|
488
|
+
* The *msim* Makefile target for Mentor Modelsim has been renamed back to *vsim*.
|
|
489
|
+
|
|
490
|
+
h2. Detail
|
|
432
491
|
|
|
433
492
|
* Simple, consistent ways of reading and writing values to handles have been added to the VPI utility layer. These ways are described in the @SWIG::TYPE_p_unsigned_int@ class' documentation.
|
|
434
493
|
|
|
@@ -451,11 +510,15 @@ h2. Summary
|
|
|
451
510
|
|
|
452
511
|
This release adds support for the _entire_ "IEEE Std. 1364-2005":http://ieeexplore.ieee.org/xpl/standardstoc.jsp?isnumber=33945 VPI interface, and updates the examples into unit tests.
|
|
453
512
|
|
|
454
|
-
h2.
|
|
513
|
+
h2. Acknowledgment
|
|
455
514
|
|
|
456
515
|
* Thanks to the "SWIG developers":http://www.swig.org/guilty.html for making this project _much_ easier! ;-)
|
|
457
516
|
|
|
458
|
-
h2.
|
|
517
|
+
h2. Notice
|
|
518
|
+
|
|
519
|
+
* The *vsim* Makefile target for Mentor Modelsim has been renamed to *msim*.
|
|
520
|
+
|
|
521
|
+
h2. Detail
|
|
459
522
|
|
|
460
523
|
* The Ruby interface to VPI is now generated by "SWIG":http://www.swig.org.
|
|
461
524
|
** The main @VPI@ module has been renamed to @Vpi@.
|
|
@@ -469,7 +532,6 @@ h2. Details
|
|
|
469
532
|
* The examples now make use of the *test/unit* unit testing framework.
|
|
470
533
|
|
|
471
534
|
* The makefiles for the examples have been simplified through the use of a common template.
|
|
472
|
-
** The *vsim* target for Mentor Modelsim has been renamed to *msim*.
|
|
473
535
|
|
|
474
536
|
* This release was tested and developed using:
|
|
475
537
|
** Ruby 1.8.4 and Icarus Verilog 0.8 on i686 GNU/Linux
|
|
@@ -482,19 +544,21 @@ h2. Summary
|
|
|
482
544
|
|
|
483
545
|
This release fixes major bugs, adds support for Mentor Modelsim, and removes the @$ruby_task@ callback.
|
|
484
546
|
|
|
485
|
-
h2.
|
|
547
|
+
h2. Acknowledgment
|
|
486
548
|
|
|
487
549
|
* Thanks to Nobu Nakada for explaining the "cross-thread violation on rb_gc()":http://article.gmane.org/gmane.comp.lang.ruby.general/146653 error.
|
|
488
550
|
|
|
489
|
-
h2.
|
|
551
|
+
h2. Notice
|
|
552
|
+
|
|
553
|
+
* Removed @$ruby_task@ callback and ability to dynamically register system tasks from Ruby because inter-process communication is complicated at present.
|
|
554
|
+
|
|
555
|
+
h2. Detail
|
|
490
556
|
|
|
491
557
|
* The *cross-thread violation on rb_gc()* error has been fixed.
|
|
492
558
|
** The *stack level too deep (SystemStackError)* error has been fixed.
|
|
493
559
|
** The *test/unit* library can be used in Ruby test bench.
|
|
494
560
|
** Mentor Modelsim Verilog simulator works with Ruby-VPI.
|
|
495
561
|
|
|
496
|
-
* Removed @$ruby_task@ callback and ability to dynamically register system tasks from Ruby because inter-process communication is complicated at present.
|
|
497
|
-
|
|
498
562
|
* Added piplelined ALU example.
|
|
499
563
|
|
|
500
564
|
* This release was tested and developed using:
|
|
@@ -512,13 +576,13 @@ This release adds enough Verilog VPI functionality to make Ruby-VPI usable for s
|
|
|
512
576
|
* read and change VPI handle values
|
|
513
577
|
* stop, finish, restart the simulation
|
|
514
578
|
|
|
515
|
-
h2.
|
|
579
|
+
h2. Acknowledgment
|
|
516
580
|
|
|
517
581
|
* Thanks to Jose Renau for helping me debug how Synopsys VCS works with Verilog VPI. The problem was that VCS required calltf signatures to be @void (*)(void)@, whereas the Verilog standard defines a calltf signature as @PLI_INT32 (*)(PLI_BYTE8*)@.
|
|
518
582
|
|
|
519
583
|
* Thanks to Ross Bamford, Eric Hodel, and Yukihiro Matsumoto for "helping me discover":http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/180662 why the @SystemStackError@ was happening.
|
|
520
584
|
|
|
521
|
-
h2.
|
|
585
|
+
h2. Detail
|
|
522
586
|
|
|
523
587
|
* Implemented some Verilog VPI functionality:
|
|
524
588
|
** @VPI::handle_by_name(string, VPI::Handle)@ → @VPI::Handle@
|
|
@@ -551,7 +615,7 @@ h2. Summary
|
|
|
551
615
|
|
|
552
616
|
This is Kazuhiro HIWADA's initial testing release of Ruby-VPI. See its "original announcement":http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-list/18193 and "source code":http://easter.kuee.kyoto-u.ac.jp/~hiwada/ruby/memo/src/ruby-vpi-test.tgz.
|
|
553
617
|
|
|
554
|
-
h2.
|
|
618
|
+
h2. Detail
|
|
555
619
|
|
|
556
620
|
* Added ability to relay control from Verilog test bench to Ruby (using @$ruby_callback@) and vice versa (using @PLI::relay_Verilog@).
|
|
557
621
|
|
data/MEMO
CHANGED
|
@@ -5,6 +5,8 @@ h1. Notes
|
|
|
5
5
|
|
|
6
6
|
h1. Pending tasks
|
|
7
7
|
|
|
8
|
+
* interactive console IRB wrapper for spec (just like Breakpoints in Rails)
|
|
9
|
+
|
|
8
10
|
* add support for reading & writing vpi_delay values
|
|
9
11
|
|
|
10
12
|
* define handled methods in Vpi::method_missing for faster response
|
|
@@ -13,6 +15,10 @@ h1. Pending tasks
|
|
|
13
15
|
* GHDL simulator supports VPI
|
|
14
16
|
** need way to invoke VPI tasks from VHDL, like @$ruby_init();@
|
|
15
17
|
|
|
18
|
+
* need to dump signal values when expectation fails in rSpec
|
|
19
|
+
** maybe a waveform dump will also help
|
|
20
|
+
** this will help in debugging the problem
|
|
21
|
+
|
|
16
22
|
|
|
17
23
|
h1. Finished tasks
|
|
18
24
|
|
|
@@ -33,6 +39,8 @@ h1. Finished tasks
|
|
|
33
39
|
|
|
34
40
|
* integrate RCov for code-coverage statistics
|
|
35
41
|
|
|
42
|
+
* method_missing for Design class
|
|
43
|
+
|
|
36
44
|
|
|
37
45
|
h1. Obsolete tasks
|
|
38
46
|
|
data/README
CHANGED
|
@@ -6,7 +6,7 @@ h2. Features
|
|
|
6
6
|
|
|
7
7
|
* Prototype and verify designs _quickly_ using "BDD(behavior-driven development)":http://behaviour-driven.org/, "TDD(test-driven development)":http://www.agiledata.org/essays/tdd.html, and more.
|
|
8
8
|
* Reuse the _same_ specification to verify both prototype and design.
|
|
9
|
-
* Specifications are executable _and_ human-readable. (See this <a href="./doc/usage.tutorial.html#fig..
|
|
9
|
+
* Specifications are executable _and_ human-readable. (See this <a href="./doc/usage.tutorial.html#fig..counter_rspec_spec.rb">example specification</a> and its <a href="./doc/usage.tutorial.html#fig..test-proto.rspec">boss-friendly output</a>.)
|
|
10
10
|
|
|
11
11
|
* Utilize Ruby's power and elegance. ("Why choose Ruby?":http://www.ruby-doc.org/whyruby)
|
|
12
12
|
** Built-in support for unlimited length integers, regular expressions, networking, multi-threading, system calls, _ad infinium_!
|
data/Rakefile
CHANGED
data/bin/generate_test.rb
CHANGED
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
# * The first input signal in a module's declaration is assumed to be the clocking signal.
|
|
5
5
|
#
|
|
6
6
|
# = Progress indicators
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# update:: Output file exists and is out of date. A backup copy will be made (with a ".old" suffix) before this output file is updated. Use a text merging tool or manually transfer any necessary information from the backup copy to the updated output file.
|
|
7
|
+
# create:: File will be created because it does not exist.
|
|
8
|
+
# skip:: File will be skipped because it is already up to date.
|
|
9
|
+
# update:: File will be updated because it is out of date. A backup copy will be made before the file is updated. Use a text merging tool (see MERGER) or manually transfer any necessary information from the backup copy to the updated file.
|
|
10
|
+
# backup:: A backup copy of a file is being made.
|
|
12
11
|
#
|
|
13
12
|
# = Environment variables
|
|
14
|
-
# MERGER:: A command
|
|
13
|
+
# MERGER:: A command that invokes a text merging tool with two arguments: old file, new file. The tool's output should be written to the new file.
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
=begin
|
|
@@ -53,11 +52,12 @@ def write_file aPath, aContent
|
|
|
53
52
|
if oldDigest == newDigest
|
|
54
53
|
notify :skip, aPath
|
|
55
54
|
else
|
|
56
|
-
notify :update, aPath
|
|
57
|
-
|
|
58
55
|
old, new = "#{aPath}.old", aPath
|
|
59
56
|
|
|
57
|
+
notify :backup, old
|
|
60
58
|
FileUtils.cp aPath, old, :preserve => true
|
|
59
|
+
|
|
60
|
+
notify :update, aPath
|
|
61
61
|
File.open(new, 'w') {|f| f << aContent}
|
|
62
62
|
|
|
63
63
|
if m = ENV['MERGER']
|
|
@@ -92,7 +92,7 @@ class OutputInfo
|
|
|
92
92
|
|
|
93
93
|
SPEC_FORMATS = [:rSpec, :xUnit, :generic]
|
|
94
94
|
|
|
95
|
-
attr_reader :verilogBenchName, :verilogBenchPath, :rubyBenchName, :rubyBenchPath, :designName, :designClassName, :designPath, :specName, :specClassName, :specFormat, :specPath, :rubyVpiPath, :runnerName, :runnerPath, :protoName, :protoPath
|
|
95
|
+
attr_reader :verilogBenchName, :verilogBenchPath, :rubyBenchName, :rubyBenchPath, :designName, :designClassName, :designPath, :specName, :specClassName, :specFormat, :specPath, :rubyVpiPath, :runnerName, :runnerPath, :protoName, :protoPath
|
|
96
96
|
|
|
97
97
|
attr_reader :testName, :suffix, :benchSuffix, :designSuffix, :specSuffix, :runnerSuffix, :protoSuffix
|
|
98
98
|
|
|
@@ -126,7 +126,6 @@ class OutputInfo
|
|
|
126
126
|
@specPath = @specName + RUBY_EXT
|
|
127
127
|
|
|
128
128
|
@designClassName = aModuleName.to_ruby_const_name
|
|
129
|
-
@protoClassName = @designClassName + 'Prototype'
|
|
130
129
|
@specClassName = @specName.to_ruby_const_name
|
|
131
130
|
|
|
132
131
|
@runnerName = aModuleName + @runnerSuffix
|
|
@@ -163,11 +162,11 @@ if File.basename($0) == File.basename(__FILE__)
|
|
|
163
162
|
exit
|
|
164
163
|
end
|
|
165
164
|
|
|
166
|
-
opts.on '
|
|
165
|
+
opts.on '--xunit', 'use xUnit specification format' do |val|
|
|
167
166
|
optSpecFmt = :xUnit if val
|
|
168
167
|
end
|
|
169
168
|
|
|
170
|
-
opts.on '
|
|
169
|
+
opts.on '--rspec', 'use rSpec specification format' do |val|
|
|
171
170
|
optSpecFmt = :rSpec if val
|
|
172
171
|
end
|
|
173
172
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
# This file is the Ruby side of the bench.
|
|
2
2
|
|
|
3
3
|
require 'ruby-vpi'
|
|
4
4
|
<%
|
|
@@ -14,7 +14,7 @@ require 'ruby-vpi/rspec'
|
|
|
14
14
|
end
|
|
15
15
|
%>
|
|
16
16
|
|
|
17
|
-
RubyVpi.init_bench '<%= aModuleInfo.name + aOutputInfo.suffix %>', :<%= aOutputInfo.
|
|
17
|
+
RubyVpi.init_bench '<%= aModuleInfo.name + aOutputInfo.suffix %>', :<%= aOutputInfo.designClassName %>
|
|
18
18
|
|
|
19
19
|
# service the $ruby_relay callback
|
|
20
20
|
<%
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
clockSignal = aModuleInfo.ports.first.name
|
|
10
10
|
%>
|
|
11
|
-
/* This is the Verilog side of the bench. */
|
|
12
|
-
|
|
13
|
-
`include "<%= aModuleInfo.name %>.v"
|
|
14
|
-
|
|
11
|
+
/* This file is the Verilog side of the bench. */
|
|
15
12
|
module <%= aOutputInfo.verilogBenchName %>;
|
|
16
13
|
|
|
17
14
|
// instantiate the design under test
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<% (aParseInfo.constants + aModuleInfo.parameters).each do |var| %>
|
|
6
|
-
<%= var.name.to_ruby_const_name %> = <%= var.value.verilog_to_ruby %>
|
|
1
|
+
# This is a Ruby interface to the design under test.
|
|
2
|
+
<% aParseInfo.constants.each do |var| %>
|
|
3
|
+
<%= var.name.to_ruby_const_name %> = <%= var.value.verilog_to_ruby %>
|
|
7
4
|
<% end %>
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
aModuleInfo.ports.map do |port|
|
|
11
|
-
":#{port.name}"
|
|
12
|
-
end.join(', ')
|
|
13
|
-
%>
|
|
14
|
-
|
|
15
|
-
def initialize
|
|
16
|
-
<% aModuleInfo.ports.each do |port| %>
|
|
17
|
-
@<%= port.name %> = vpi_handle_by_name("<%= aOutputInfo.verilogBenchName %>.<%= port.name %>", nil)
|
|
18
|
-
<% end %>
|
|
19
|
-
end
|
|
20
|
-
|
|
6
|
+
class << <%= aOutputInfo.designClassName %>
|
|
21
7
|
def reset!
|
|
22
|
-
<% aModuleInfo.ports.select { |p| p.input? }[1..-1].each do |port| %>
|
|
23
|
-
|
|
8
|
+
<% aModuleInfo.ports.select { |p| p.input? }[1..-1].each do |port| # using [1..] because the first signal is the clock %>
|
|
9
|
+
<%= port.name %>.hexStrVal = 'x'
|
|
24
10
|
<% end %>
|
|
25
11
|
end
|
|
26
12
|
end
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
#
|
|
2
|
-
class
|
|
1
|
+
# This is a prototype of the design under test.
|
|
2
|
+
class << <%= aOutputInfo.designClassName %>
|
|
3
|
+
# When prototyping is enabled, this method is invoked
|
|
4
|
+
# instead of Vpi::relay_verilog to simulate the design.
|
|
3
5
|
def simulate!
|
|
4
6
|
# discard old outputs
|
|
5
7
|
<% aModuleInfo.ports.reject { |p| p.input? }.each do |port| %>
|
|
6
|
-
|
|
8
|
+
<%= port.name %>.hexStrVal = 'x'
|
|
7
9
|
<% end %>
|
|
8
10
|
|
|
9
11
|
# process new inputs
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
# This file is a behavioral specification for the design under test.
|
|
2
2
|
|
|
3
3
|
<%
|
|
4
4
|
case aOutputInfo.specFormat
|
|
5
5
|
when :xUnit
|
|
6
6
|
%>
|
|
7
7
|
class <%= aOutputInfo.specClassName %> < Test::Unit::TestCase
|
|
8
|
-
include Vpi
|
|
9
|
-
|
|
10
8
|
def setup
|
|
11
|
-
|
|
9
|
+
<%= aOutputInfo.designClassName %>.reset!
|
|
12
10
|
end
|
|
13
11
|
<% aModuleInfo.ports.each do |port| %>
|
|
14
12
|
|
|
@@ -19,26 +17,21 @@ end
|
|
|
19
17
|
<%
|
|
20
18
|
when :rSpec
|
|
21
19
|
%>
|
|
22
|
-
include Vpi
|
|
23
|
-
|
|
24
20
|
context "A new <%= aOutputInfo.designClassName %>" do
|
|
25
21
|
setup do
|
|
26
|
-
|
|
27
|
-
@design.reset!
|
|
22
|
+
<%= aOutputInfo.designClassName %>.reset!
|
|
28
23
|
end
|
|
29
24
|
|
|
30
25
|
specify "should ..." do
|
|
31
|
-
#
|
|
26
|
+
# <%= aOutputInfo.designClassName %>.should ...
|
|
32
27
|
end
|
|
33
28
|
end
|
|
34
29
|
<%
|
|
35
30
|
else
|
|
36
31
|
%>
|
|
37
32
|
class <%= aOutputInfo.specClassName %>
|
|
38
|
-
include Vpi
|
|
39
|
-
|
|
40
33
|
def initialize
|
|
41
|
-
|
|
34
|
+
<%= aOutputInfo.designClassName %>.reset!
|
|
42
35
|
end
|
|
43
36
|
end
|
|
44
37
|
<%
|