ruby-vpi 11.1.1 → 12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/generate_test.rb +12 -11
- data/bin/generate_test_tpl/bench.rb +0 -4
- data/bin/generate_test_tpl/bench.v +3 -6
- data/bin/generate_test_tpl/runner.rake +20 -4
- data/bin/generate_test_tpl/spec.rb +5 -7
- data/doc/common.css +110 -95
- data/doc/common.tpl +16 -17
- data/doc/history.html +350 -330
- data/doc/history.yml +49 -0
- data/doc/intro.inc +18 -4
- data/doc/lib/doc_proxy.rb +22 -32
- data/doc/manual.erb +90 -83
- data/doc/manual.html +298 -266
- data/doc/memo.html +31 -10
- data/doc/readme.html +26 -6
- data/ext/relay.c +24 -28
- data/ext/vlog.c +4 -15
- data/lib/ruby-vpi/rspec.rb +1 -1
- data/lib/ruby-vpi/runner.rb +12 -10
- data/lib/ruby-vpi/runner_proxy.rb +17 -6
- data/lib/ruby-vpi/verilog_parser.rb +11 -7
- data/lib/ruby-vpi/vpi.rb +11 -1
- data/lib/ruby-vpi.rb +4 -0
- data/ref/c/annotated.html +2 -2
- 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 +2 -2
- data/ref/c/globals_0x78.html +1 -1
- data/ref/c/globals_defs.html +1 -1
- data/ref/c/globals_defs_0x65.html +1 -1
- data/ref/c/globals_defs_0x70.html +1 -1
- data/ref/c/globals_defs_0x76.html +2 -2
- 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 +2 -2
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +1 -1
- data/ref/c/index.html +1 -1
- data/ref/c/relay_8c.html +2 -1
- data/ref/c/relay_8h.html +1 -1
- data/ref/c/structrelay____RubyOptions____def.html +8 -2
- 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_8c.html +1 -1
- data/ref/c/swig_8h.html +1 -1
- data/ref/c/verilog_8h.html +1 -1
- data/ref/c/vlog_8c.html +15 -15
- data/ref/c/vlog_8h.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/OutputInfo.html +1 -1
- data/ref/ruby/classes/OutputInfo.src/M000030.html +30 -30
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000097.html → M000099.html} +0 -0
- data/ref/ruby/classes/RubyVpi.src/M000085.html +43 -39
- data/ref/ruby/classes/String.src/M000033.html +26 -26
- data/ref/ruby/classes/String.src/M000034.html +4 -4
- data/ref/ruby/classes/Template.src/M000032.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000011.html +5 -5
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000007.html +7 -7
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000008.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000009.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000010.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module.src/M000006.html +15 -11
- data/ref/ruby/classes/Vpi/Handle/Property.html +5 -5
- data/ref/ruby/classes/Vpi/Handle/Property.src/{M000096.html → M000098.html} +61 -61
- data/ref/ruby/classes/Vpi/Handle.html +78 -43
- data/ref/ruby/classes/Vpi/Handle.src/M000088.html +3 -3
- data/ref/ruby/classes/Vpi/Handle.src/M000089.html +4 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000090.html +5 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000091.html +9 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000092.html +31 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000093.html +74 -11
- data/ref/ruby/classes/Vpi/Handle.src/M000094.html +30 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000095.html +11 -55
- data/ref/ruby/classes/Vpi/Handle.src/M000097.html +68 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +8 -11
- data/ref/ruby/files/bin/generate_test_rb.src/M000001.html +4 -4
- data/ref/ruby/files/bin/generate_test_rb.src/M000002.html +22 -24
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_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 +2 -2
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000003.html +10 -10
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.src/M000004.html +12 -12
- data/ref/ruby/files/lib/ruby-vpi/verilog_parser_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -1
- data/ref/ruby/fr_method_index.html +20 -18
- data/samp/counter/counter_rspec_bench.v +3 -6
- data/samp/counter/counter_rspec_design.rb +2 -1
- data/samp/counter/counter_rspec_runner.rake +20 -4
- data/samp/counter/counter_rspec_spec.rb +4 -4
- data/samp/counter/counter_xunit_bench.v +3 -6
- data/samp/counter/counter_xunit_design.rb +2 -1
- data/samp/counter/counter_xunit_runner.rake +20 -4
- data/samp/pipelined_alu/hw5_unit_test_bench.v +3 -6
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +20 -4
- metadata +21 -20
- data/doc/manual.rb +0 -5
data/doc/history.yml
CHANGED
@@ -1,3 +1,52 @@
|
|
1
|
+
-
|
2
|
+
Version: 12.0.0
|
3
|
+
|
4
|
+
Date: 2006-12-07
|
5
|
+
|
6
|
+
Summary: |
|
7
|
+
This release adds support for the "test/spec":http://chneukirchen.org/blog/archive/2006/10/announcing-test-spec-0-2-a-bdd-interface-for-test-unit.html library, fixes some bugs, and improves the user manual and generated tests.
|
8
|
+
|
9
|
+
Notice: |
|
10
|
+
* Icarus Verilog 0.8 has been demoted to a "mostly acceptable":manual.html#setup.reqs status.
|
11
|
+
|
12
|
+
* Generated Verilog benches no longer supply the <tt>-w</tt> option to the @$ruby_init@ task.
|
13
|
+
|
14
|
+
* The @ruby-vpi/runner_proxy@ library now invokes test runners
|
15
|
+
** just before exiting. Thus, you can invoke tasks in the main <tt>Rakefile</tt> before the test runners are invoked.
|
16
|
+
** located within any directory that is a descendant of the current working directory.
|
17
|
+
|
18
|
+
* The @SIMULATOR_ARGS@ parameter of generated runners has been renamed to @SIMULATOR_ARGUMENTS@ for clarity.
|
19
|
+
|
20
|
+
* The automated test generator
|
21
|
+
** no longer displays the *backup* status indicator.
|
22
|
+
** now supplies a third argument to the @MERGER@ command.
|
23
|
+
** no longer replaces existing files with newly generated content during the *update* action. Instead, it now writes the newly generated output to a <tt>.new</tt> file and then invokes the @MERGER@ command.
|
24
|
+
|
25
|
+
Detail: |
|
26
|
+
* The @Vpi::Handle@ class has two new methods: @x!@ and @z!@, which set the handle's logic value to _unknown_ and _high impedance_ respectively.
|
27
|
+
|
28
|
+
* The tests for the simple up-counter example were randomly failing because the specifications were not asserting the design's @reset@ signal long enough. So the design was getting into weird states and behaving in a non-deterministic way. This problem has been fixed.
|
29
|
+
|
30
|
+
* The user manual has been revised and some minor issues have been fixed.
|
31
|
+
|
32
|
+
h3. Test generation
|
33
|
+
|
34
|
+
* The automated test generator accepts new command-line options:
|
35
|
+
** <tt>--test-unit</tt>
|
36
|
+
** <tt>--test-spec</tt>
|
37
|
+
** <tt>--tspec</tt>
|
38
|
+
|
39
|
+
* The automated test generator was crashing when parsing module parameters of an input file which did not have any module parameters. This has been fixed.
|
40
|
+
|
41
|
+
* Generated Verilog benches now contain simpler clock generation code.
|
42
|
+
|
43
|
+
* Generated runners now contain
|
44
|
+
** a @:setup@ task which is invoked before the simulator runs. It can be used to make preprations, such as converting Verilog header files into Ruby, for the simulation.
|
45
|
+
** better explanations to accomodate new users.
|
46
|
+
|
47
|
+
* Specifications generated in the *generic* format no longer contain a class that is instantiated in the generated Ruby bench.
|
48
|
+
|
49
|
+
|
1
50
|
-
|
2
51
|
Version: 11.1.1
|
3
52
|
|
data/doc/intro.inc
CHANGED
@@ -6,8 +6,9 @@ h2(#intro.features). Features
|
|
6
6
|
* Supports the _entire_ IEEE Std 1364-2005 VPI standard.
|
7
7
|
|
8
8
|
* Works with all "major Verilog simulators":manual.html#setup.reqs available today.
|
9
|
+
** Compile _once_ (during "installation":manual.html#setup.installation) and use forever!
|
9
10
|
|
10
|
-
* Enables "agile practices":http://
|
11
|
+
* Enables "agile practices":http://agilemanifesto.org/ such as
|
11
12
|
** "test-driven":http://www.testdriven.com development
|
12
13
|
** "behavior-driven":http://behaviour-driven.org development
|
13
14
|
** "rapid prototyping":manual.html#usage.tutorial.implement-proto for design exploration
|
@@ -21,14 +22,27 @@ h2(#intro.features). Features
|
|
21
22
|
** Regular expressions
|
22
23
|
** Multi-threading
|
23
24
|
** System calls and I/O
|
24
|
-
** "_ad
|
25
|
+
** "_ad infinitum_":http://rubyforge.org
|
25
26
|
|
26
27
|
* Gives you the _freedom_ to study, modify, and distribute this software, in accordance with the "GNU General Public License":http://www.gnu.org/copyleft/gpl.html.
|
27
28
|
|
28
29
|
|
29
|
-
|
30
|
+
h3(#intro.applications). Applications
|
30
31
|
|
31
|
-
Here is a modest sampling
|
32
|
+
Here is a modest sampling of tasks, paraphrased from "Pin Hong":http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/, that Ruby-VPI can be used to perform.
|
33
|
+
|
34
|
+
* Writing hardware models in Ruby
|
35
|
+
* Dumping/processing netlist data from Verilog database
|
36
|
+
* Dumping/processing simulation data
|
37
|
+
* Feeding dynamic simulation stimuli
|
38
|
+
* Back-annotating delay information
|
39
|
+
* Interactive logic simulation
|
40
|
+
* Building a distributed simulation
|
41
|
+
|
42
|
+
|
43
|
+
h3(#intro.appetizers). Appetizers
|
44
|
+
|
45
|
+
Here is a modest sampling of code to whet your appetite.
|
32
46
|
|
33
47
|
* Assign the value 2^2048^ to a register:
|
34
48
|
|
data/doc/lib/doc_proxy.rb
CHANGED
@@ -25,6 +25,13 @@ class DocProxy < ErbProxy
|
|
25
25
|
Block = Struct.new :anchor, :title, :type
|
26
26
|
Heading = Struct.new :anchor, :title, :depth
|
27
27
|
|
28
|
+
CATEGORIES = {
|
29
|
+
:admonition => [:tip, :note, :important, :caution, :warning],
|
30
|
+
|
31
|
+
# formal blocks; see http://www.sagehill.net/docbookxsl/FormalTitles.html
|
32
|
+
:formal => [:figure, :table, :example, :equation, :procedure],
|
33
|
+
}
|
34
|
+
|
28
35
|
attr_reader :blocks, :headings, :references
|
29
36
|
|
30
37
|
def initialize
|
@@ -33,26 +40,24 @@ class DocProxy < ErbProxy
|
|
33
40
|
@blocks = Hash.new {|h,k| h[k] = []}
|
34
41
|
@headings = []
|
35
42
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
]
|
44
|
-
end
|
43
|
+
CATEGORIES[:admonition].each do |type|
|
44
|
+
add_block_handler :admonition, type do |index, title, text|
|
45
|
+
join_redcloth_elements [
|
46
|
+
%{!<images/#{type}.png(#{type})!},
|
47
|
+
%{p(title). #{type.to_s.capitalize}: #{title}},
|
48
|
+
text,
|
49
|
+
]
|
45
50
|
end
|
51
|
+
end
|
46
52
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
]
|
54
|
-
end
|
53
|
+
CATEGORIES[:formal].each do |type|
|
54
|
+
add_block_handler :formal, type do |index, title, text|
|
55
|
+
join_redcloth_elements [
|
56
|
+
%{p(title). #{type.to_s.capitalize} #{index}. #{title}},
|
57
|
+
text,
|
58
|
+
]
|
55
59
|
end
|
60
|
+
end
|
56
61
|
end
|
57
62
|
|
58
63
|
# Post-processes the given ERB template result by parsing the document structure and expanding cross-references, and returns the result.
|
@@ -142,19 +147,4 @@ class DocProxy < ErbProxy
|
|
142
147
|
def unanchor aAnchor
|
143
148
|
aAnchor.sub(/^#+/, '')
|
144
149
|
end
|
145
|
-
|
146
|
-
# update positions of xrefs so that they are later inserted in correct place
|
147
|
-
def update_xrefs aSrcPos, aSrcLen, aDstLen
|
148
|
-
# because it's a replacement, we delete the match and insert the replacement
|
149
|
-
change = 0 - aSrcLen + aDstLen
|
150
|
-
|
151
|
-
@references.select {|ref| ref.position >= aSrcPos}.each do |ref|
|
152
|
-
ref.position += change
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
def append_to_buffer aBuff, aText
|
157
|
-
update_xrefs aBuff.length, 0, aText.length
|
158
|
-
aBuff << aText
|
159
|
-
end
|
160
150
|
end
|
data/doc/manual.erb
CHANGED
@@ -35,7 +35,7 @@ h2(#intro.related-works). Related works
|
|
35
35
|
* "MyHDL":http://myhdl.jandecaluwe.com is a hardware description and verification language based on Python, which features conversion to Verilog and co-simulation.
|
36
36
|
|
37
37
|
|
38
|
-
|
38
|
+
h3(#intro.related-works.pli). Ye olde PLI
|
39
39
|
|
40
40
|
The following projects utilize the archaic *tf* and *acc* PLI interfaces, which have been officially deprecated in IEEE Std 1364-2005.
|
41
41
|
|
@@ -51,20 +51,20 @@ Ruby-VPI is a "bench":#glossary.bench which lets you "test":#glossary.test Veril
|
|
51
51
|
|
52
52
|
h2(#background.methodology). Methodology
|
53
53
|
|
54
|
-
Ruby-VPI presents an open-ended interface to VPI. Thus, you can use any methodology you wish when writing tests.
|
54
|
+
Ruby-VPI presents an open-ended interface to VPI. Thus, you can use any methodology you wish when writing tests. However, being an agile language, Ruby makes it _very_ easy to use agile development practies such as "TDD":#glossary.TDD and "BDD":#glossary.BDD.
|
55
55
|
|
56
56
|
|
57
57
|
h2(#background.vocab). Terminology
|
58
58
|
|
59
|
-
<%
|
59
|
+
<% note do %>
|
60
60
|
Have a look at the "glossary":#glossary for definitions of terms used in this manual.
|
61
61
|
<% end %>
|
62
62
|
|
63
|
-
As a newcomer into the world of Verilog, I often heard the term *test bench*: "I ran the test bench, but it didn't work!" or "Are you crazy?!! You _still_ haven't written the test bench?", for example. I
|
63
|
+
As a newcomer into the world of Verilog, I often heard the term *test bench*: "I ran the test bench, but it didn't work!" or "Are you crazy?!! You _still_ haven't written the test bench?", for example. I poured through my textbook for a definition of the term, but it was to no avail. Instead, it nonchalantly employed the term _throughout_ its being, as if mocking my ignorance of what seems to be universal knowledge.
|
64
64
|
|
65
65
|
Defeated, I turned to my inner faculties to determine the answer. Let's see, the term _test bench_ has the word _test_—so it has something to do with testing—and it has the word _bench_—so maybe it's referring to a table where the testing should occur. This reasoning grew increasingly familiar as my mind rummaged through towering stores of obsolescence and ultimately revealed dreaded memories of sleepless anguish: debugging electronics in the robotics laboratory.
|
66
66
|
|
67
|
-
Aha! I exclaimed hesitantly,
|
67
|
+
Aha! I exclaimed, hesitantly, rushing to dismiss the past. The term has its roots in the testing of electronic devices, where an engineer would sit at a bench in an electronics laboratory and verify that an electronic component satisfies some criteria. The bench would be furnished with tools of measurement and manipulation—such as oscilloscopes, voltmeters, soldering irons, and so on—which help the engineer to verify the electronic component or locate the sources of defects in the component.
|
68
68
|
|
69
69
|
Alright, now I remember what a laboratory bench is, but how does that compare with the term test bench? Surely they cannot have the same meaning, because it doesn't make sense to _run_ a laboratory bench or to _write_ one. Thus, to avoid propagating such confusion into this manual, I have attempted to clarify the terminology by "simplifying and reintroducing it in a new light":#glossary.
|
70
70
|
|
@@ -75,7 +75,9 @@ h2(#background.org). Organization
|
|
75
75
|
!figures/organization.png!
|
76
76
|
<% end %>
|
77
77
|
|
78
|
-
As <xref #fig..organization> shows, a test is composed of a bench, a design, and a specification
|
78
|
+
As <xref #fig..organization> shows, a "test":#glossary.test is composed of a "bench":#glossary.bench, a "design":#glossary.design, and a "specification":#glossary.specification.
|
79
|
+
|
80
|
+
To extend the "analogy of an electronics laboratory":#background.vocab, the _bench_ acts as the laboratory bench which provides measurement and manipulation tools. The _design_ acts as the electronic component being verified by the engineer. And the _specification_ acts as the engineer who measures, manipulates, and verifies the electronic component.
|
79
81
|
|
80
82
|
|
81
83
|
h3(#background.org.vpi). Interface to VPI
|
@@ -84,7 +86,9 @@ h3(#background.org.vpi). Interface to VPI
|
|
84
86
|
!figures/organization_detailed.png!
|
85
87
|
<% end %>
|
86
88
|
|
87
|
-
In <xref #fig..organization.detail>, Ruby-VPI acts as the
|
89
|
+
In <xref #fig..organization.detail>, Ruby-VPI acts as the _bench_, a Verilog simulator encapsulates the _design_, and a Ruby interpreter encapsulates the _specification_.
|
90
|
+
|
91
|
+
Notice that Ruby-VPI encapsulates all communication between the Ruby interpreter and VPI. This allows the specification, or any Ruby program in general, to access VPI using nothing more than the Ruby language! Thus, Ruby-VPI removes the burden of having to write C programs in order to access VPI.
|
88
92
|
|
89
93
|
Furthermore, Ruby-VPI presents the _entire_ IEEE Std 1364-2005 VPI interface to the Ruby interpreter, but with the following minor changes.
|
90
94
|
|
@@ -103,9 +107,9 @@ void foo(va_list ap) {
|
|
103
107
|
|
104
108
|
h4(#background.org.vpi.util). VPI utility layer
|
105
109
|
|
106
|
-
From a user's perspective, the VPI utility layer greatly enhances the ability to interact with handles. One simply invokes a handle's methods, which are carefully named in the following manner, to access either (1) its children or (2) its VPI properties.
|
110
|
+
From a user's perspective, the VPI utility layer (see <xref #fig..organization.detail>) greatly enhances the ability to interact with "handles":#glossary.handle. One simply invokes a handle's methods, which are carefully named in the following manner, to access either (1) its children or (2) its VPI properties.
|
107
111
|
|
108
|
-
The children of a handle are simply the handles that are
|
112
|
+
The children of a handle are simply the handles that are _immediately_ contained within it in. For example, suppose that you had a Verilog module that contains some registers. The children of a handle to that module would be handles to that module's registers.
|
109
113
|
|
110
114
|
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 @Vpi::Handle.get_value@ and @Vpi::Handle.put_value@ methods.
|
111
115
|
|
@@ -173,35 +177,35 @@ In the event that a child handle has the same name as a VPI property, the child
|
|
173
177
|
|
174
178
|
h2(#background.running-tests). Running a test
|
175
179
|
|
176
|
-
Unlike an engineer who can verify an electronic component in real-time, the Verilog simulator and the Ruby interpreter (see <xref #fig..organization.detail>) take turns working with
|
180
|
+
Unlike an engineer who can verify an electronic component in real-time, the Verilog simulator and the Ruby interpreter (see <xref #fig..organization.detail>) take turns working with "handles":#glossary.handle when a "test":#glossary.test is run. In particular, they take turns manipulating the Verilog "design":#glossary.design and transfer control to each other when appropriate.
|
177
181
|
|
178
182
|
The situation is similar to a pair of friends playing catch. One friend throws a ball to the other, and the other throws it back. Either is able to inspect and modify the ball, but only when it is in hand.
|
179
183
|
|
180
184
|
|
181
185
|
h3(#background.running-tests.init). Initialization
|
182
186
|
|
187
|
+
A "test":#glossary.test is first initialized before it is "executed":#background.running-tests.exec. This process is illustrated by <xref #fig..ruby_init>.
|
188
|
+
|
183
189
|
<% figure "Initialization of a test", "#fig..ruby_init" do %>
|
184
190
|
!figures/ruby_init.png!
|
185
|
-
<% end %>
|
186
|
-
|
187
|
-
A test is first initialized before it is "executed":#background.running-tests.exec. <xref #fig..ruby_init> illustrates the initialization process "described below":#proc..ruby_init.
|
188
191
|
|
189
192
|
# The Verilog simulator initializes the Ruby interpreter by invoking the @$ruby_init;@ system task/function, whose parameters represent the command-line invocation of the Ruby interpreter. For example, one would specify @$ruby_init("ruby", "-w");@ in Verilog to achieve the same effect as running <pre>ruby -w</pre> at a command-prompt.
|
190
193
|
# The Verilog simulator is paused and the Ruby interpreter is initialized with the arguments of the @$ruby_init;@ system task/function.
|
191
194
|
# When the Ruby interpreter invokes the @Vpi::relay_verilog@ method, it is paused and the Verilog simulator is given control.
|
195
|
+
<% end %>
|
192
196
|
|
193
197
|
|
194
198
|
h3(#background.running-tests.exec). Execution
|
195
199
|
|
196
|
-
After a test is "initialized":#background.running-tests.init, it is executed such that the design is verified against the specification.
|
200
|
+
After a "test":#glossary.test is "initialized":#background.running-tests.init, it is executed such that the design is verified against the "specification":#glossary.specification. This process is illustrated by <xref #fig..ruby_relay>.
|
197
201
|
|
198
202
|
<% figure "Execution of a test", "#fig..ruby_relay" do %>
|
199
203
|
!figures/ruby_relay.png!
|
200
|
-
<% end %>
|
201
204
|
|
202
205
|
# The Verilog simulator transfers control to the Ruby interpreter by invoking the @$ruby_relay;@ system task/function.
|
203
206
|
# The Verilog simulator is paused and the Ruby interpreter is given control.
|
204
207
|
# When the Ruby interpreter invokes the @Vpi::relay_verilog@ method, it is paused and the Verilog simulator is given control.
|
208
|
+
<% end %>
|
205
209
|
|
206
210
|
|
207
211
|
h1(#setup). Setup
|
@@ -228,12 +232,16 @@ The following software is necessary in order to use Ruby-VPI.
|
|
228
232
|
** "GPL Cver":http://www.pragmatic-c.com/gpl-cver/
|
229
233
|
- version 2.11a or newer is acceptable.
|
230
234
|
** "Icarus Verilog":http://www.icarus.com/eda/Verilog/
|
231
|
-
- version 0.8
|
235
|
+
- version 0.8 is _mostly_ acceptable -- you *will not* be able to "access child handles through method calls":#background.org.vpi.util. The reason for this limitation is explained in <xref #problems.ivl.vpi_handle_by_name.absolute-paths>.
|
232
236
|
** "Synopsys VCS":http://www.synopsys.com/products/simulation/simulation.html
|
233
237
|
- any version that supports the <tt>-load</tt> option is acceptable.
|
234
238
|
** "Mentor Modelsim":http://www.model.com
|
235
239
|
- any version that supports the <tt>-pli</tt> option is acceptable.
|
236
240
|
|
241
|
+
<% tip "Add support for your Verilog simulator" do %>
|
242
|
+
Write a "support request":http://rubyforge.org/tracker/?group_id=1339 for your simulator, while providing a sample transcript of the commands you use to run a test with your simulator, and we will add support for your simulator in the next release!
|
243
|
+
<% end %>
|
244
|
+
|
237
245
|
* *make*
|
238
246
|
- any distribution should be acceptable.
|
239
247
|
|
@@ -282,16 +290,18 @@ h3(#setup.installation.windows). Installing on Windows
|
|
282
290
|
|
283
291
|
* Install "Cygwin":http://www.cygwin.com, the Linux-like environment for Windows.
|
284
292
|
|
293
|
+
<% note "Undefined symbols in Windows" do %>
|
294
|
+
After Ruby-VPI is compiled, it is linked to symbols whose names begin with <tt>_vpi</tt>. In GNU/Linux and similar operating systems, these symbols are allowed to be undefined. However, one "cannot compile a shared object file with references to undefined symbols in Windows":http://sourceware.org/ml/cygwin/2001-12/msg01293.html.
|
295
|
+
|
296
|
+
One solution is to supply the Verilog simulator's VPI object file, which contains definitions of all VPI symbols, to the linker. The following steps illustrate this process.
|
297
|
+
<% end %>
|
298
|
+
|
285
299
|
* Search for object files whose names end with <tt>.so</tt>, <tt>.o</tt>, or <tt>.dll</tt> in your Verilog simulator's installation directory.
|
286
300
|
|
287
|
-
* Determine which object files, among those found in the previous step, contain symbols whose names begin with "_vpi" by running the <pre>for x in *.{o,so,dll}; do nm $x | grep -q '[Tt] _vpi'
|
301
|
+
* Determine which object files, among those found in the previous step, contain symbols whose names begin with "_vpi" by running the <pre>for x in *.{o,so,dll}; do nm $x | grep -q '[Tt] _vpi' && echo $x; done</pre> command in Cygwin.
|
288
302
|
** If you are using Mentor Modelsim, the desired object file can be found at a path similar to <tt>C:\Modeltech\win32\libvsim.dll</tt>.
|
289
303
|
** If you are using GPL Cver, the desired object file can be found at a path similar to <tt>C:\gplcver\objs\v_vpi.o</tt>.
|
290
304
|
|
291
|
-
<% note do %>
|
292
|
-
Since Ruby-VPI makes use of the VPI C-language interface, it links to symbols whose names begin with "_vpi". It is possible for these symbols to be undefined when Ruby-VPI is compiled under GNU/Linux and similar operating systems. In contrast, one "cannot compile a shared object file with references to undefined symbols under Windows":http://sourceware.org/ml/cygwin/2001-12/msg01293.html. Thus, we must find a Verilog simulator's shared object file, which contains definitions of all VPI symbols, and give this file to the linker when compiling Ruby-VPI.
|
293
|
-
<% end %>
|
294
|
-
|
295
305
|
* Assign the path of the object file (determined in the previous step) to the @LDFLAGS@ environment variable. For example, if the object file's path is <tt>/foo/bar/vpi.so</tt>, then you would run the <pre>export LDFLAGS=/foo/bar/vpi.so</pre> command in Cygwin.
|
296
306
|
|
297
307
|
* You may now install Ruby-VPI by running the <pre>gem install ruby-vpi</pre> command in Cygwin.
|
@@ -311,7 +321,7 @@ h1(#usage). Usage
|
|
311
321
|
|
312
322
|
h2(#usage.tools). Tools
|
313
323
|
|
314
|
-
The <tt>bin</tt> directory contains various utilities which ease the process of writing tests. Each tool provides help and usage information invoked with the <tt
|
324
|
+
The <tt>bin</tt> directory contains various utilities which ease the process of writing tests. Each tool provides help and usage information invoked with the <tt>-h</tt> option.
|
315
325
|
|
316
326
|
|
317
327
|
h3(#usage.tools.generate-test). Automated test generation
|
@@ -319,7 +329,7 @@ h3(#usage.tools.generate-test). Automated test generation
|
|
319
329
|
The automated test generator (*generate_test.rb*) generates tests from Verilog 2001 module declarations, as demonstrated "in the tutorial":#usage.tutorial.generate-test. A generated test is composed of the following parts:
|
320
330
|
|
321
331
|
* Runner
|
322
|
-
- written in Rake, this file builds and runs the test.
|
332
|
+
- written in "Rake":#glossary.rake, this file builds and runs the test.
|
323
333
|
* Bench
|
324
334
|
- written in Verilog and Ruby, these files define the testing environment.
|
325
335
|
* Design
|
@@ -329,7 +339,7 @@ The automated test generator (*generate_test.rb*) generates tests from Verilog 2
|
|
329
339
|
* Specification
|
330
340
|
- written in Ruby, this file describes the expected behavior of the design.
|
331
341
|
|
332
|
-
The reason for dividing a single test into these parts is mainly to decouple the design from the specification. This allows you to focus on writing the specification while the remainder is automatically generated by the tool. For example, when the interface of a Verilog module changes, you would simply re-run this tool and incorporate those changes (using a "text merging tool":#setup.recom) into the test without diverting your focus from the specification.
|
342
|
+
The reason for dividing a single test into these parts is mainly to decouple the design from the specification. This allows you to focus on writing the specification while the remainder is automatically generated by the tool. For example, when the interface of a Verilog module changes, you would simply re-run this tool and incorporate those changes (using a "text merging tool":#setup.recom.merger) into the test without diverting your focus from the specification.
|
333
343
|
|
334
344
|
<% tip "Using *kdiff3* with the automated test generator." do %>
|
335
345
|
# Create a file named <tt>merge2</tt> with the following content: <code>
|
@@ -341,7 +351,7 @@ kdiff3 --auto --output "$2" "$@"
|
|
341
351
|
# Place the file somewhere accessible by your @PATH@ environment variable.
|
342
352
|
# Assign the value "merge2" to the @MERGER@ environment variable using your shell's *export* or *setenv* command.
|
343
353
|
|
344
|
-
From now on, *kdiff3* will be invoked to help you transfer your changes between generated files. When you are finished transferring changes, simply issue the "save the file" command and
|
354
|
+
From now on, *kdiff3* will be invoked to help you transfer your changes between generated files. When you are finished transferring changes, simply issue the "save the file" command and quit *kdiff3*. Or, if you do not want to transfer any changes, simply quit *kdiff3* _without_ saving the file.
|
345
355
|
<% end %>
|
346
356
|
|
347
357
|
|
@@ -349,6 +359,8 @@ h3(#usage.tools.verilog-ruby-conv). Verilog to Ruby conversion
|
|
349
359
|
|
350
360
|
The *header_to_ruby.rb* tool can be used to convert Verilog header files into Ruby. You can try it by running the <pre>header_to_ruby.rb --help</pre> command.
|
351
361
|
|
362
|
+
By converting Verilog header files into Ruby, your "test":#glossary.test can utilize the same @`define@ constants that are used in the Verilog "design":#glossary.design.
|
363
|
+
|
352
364
|
|
353
365
|
h2(#usage.tutorial). Tutorial
|
354
366
|
|
@@ -395,9 +407,11 @@ Each format represents a different software development methodology:
|
|
395
407
|
* xUnit represents "TDD":#glossary.TDD
|
396
408
|
* our own format can represent another methodology
|
397
409
|
|
398
|
-
|
410
|
+
<% note do %>
|
411
|
+
Both rSpec and xUnit formats are presented in this tutorial.
|
412
|
+
<% end %>
|
399
413
|
|
400
|
-
Once we have decided how we want to implement our specification, we can proceed to generate a test for our design. <xref #fig..generate-test.rspec> and <xref #fig..generate-test.unit-test
|
414
|
+
Once we have decided how we want to implement our specification, we can proceed to generate a test for our design. This process is illustrated by <xref #fig..generate-test.rspec> and <xref #fig..generate-test.unit-test>.
|
401
415
|
|
402
416
|
<% example "Generating a test with specification in rSpec format", "#fig..generate-test.rspec" do %>
|
403
417
|
<pre>
|
@@ -437,8 +451,7 @@ Here are some reasonable expectations for our simple counter:
|
|
437
451
|
* A resetted counter's value should increment by one count upon each rising clock edge.
|
438
452
|
* A counter with the maximum value should overflow upon increment.
|
439
453
|
|
440
|
-
Now that we have identified a set of expectations for our design, we are ready to implement them in our specification. <xref #fig..counter_rspec_spec.rb> and <xref #fig..counter_xunit_spec.rb
|
441
|
-
|
454
|
+
Now that we have identified a set of expectations for our design, we are ready to implement them in our specification. This process is illustrated by <xref #fig..counter_rspec_spec.rb> and <xref #fig..counter_xunit_spec.rb>.
|
442
455
|
|
443
456
|
<% example "Specification implemented in rSpec format", "#fig..counter_rspec_spec.rb" do %>
|
444
457
|
<code><%= File.read '../samp/counter/counter_rspec_spec.rb' %></code>
|
@@ -451,24 +464,13 @@ Now that we have identified a set of expectations for our design, we are ready t
|
|
451
464
|
<% important "Before we continue..." do %>
|
452
465
|
# Replace the contents of the file named <tt>counter_rspec_spec.rb</tt> with the source code shown in <xref #fig..counter_rspec_spec.rb>.
|
453
466
|
# Replace the contents of the file named <tt>counter_xunit_spec.rb</tt> with the source code shown in <xref #fig..counter_xunit_spec.rb>.
|
454
|
-
# Replace the contents of the files named <tt>counter_rspec_design.rb</tt> and <tt>counter_xunit_design.rb</tt> with the following code.
|
455
|
-
def Counter.reset!
|
456
|
-
reset.intVal = 1
|
457
|
-
|
458
|
-
# simulate one clock cycle
|
459
|
-
relay_verilog
|
460
|
-
|
461
|
-
reset.intVal = 0
|
462
|
-
end
|
463
|
-
</code>
|
467
|
+
# Replace the contents of the files named <tt>counter_rspec_design.rb</tt> and <tt>counter_xunit_design.rb</tt> with the following code. <code><%= File.read '../samp/counter/counter_rspec_design.rb' %></code>
|
464
468
|
<% end %>
|
465
469
|
|
466
470
|
|
467
471
|
h3(#usage.tutorial.implement-proto). Implement the prototype
|
468
472
|
|
469
|
-
|
470
|
-
Now that we have a "specification":#glossary.specification against which to verify our "design":#glossary.design, let us build a prototype of our design. By doing so, we exercise our specification, experience potential problems that may arise when we later implement our design in Verilog, and gain confidence in our work. <xref #fig..counter_proto.rb> shows the completed prototype for our design.
|
471
|
-
|
473
|
+
Now that we have a "specification":#glossary.specification against which to verify our "design":#glossary.design, let us build a prototype of our design. By doing so, we exercise our specification, experience potential problems that may arise when we later implement our design in Verilog, and gain confidence in our work. The result of this proceess is illustrated by <xref #fig..counter_proto.rb>.
|
472
474
|
|
473
475
|
<% example "Ruby prototype of our Verilog design", "#fig..counter_proto.rb" do %>
|
474
476
|
<code>
|
@@ -489,17 +491,7 @@ Replace the contents of the files named <tt>counter_rspec_proto.rb</tt> and <tt>
|
|
489
491
|
|
490
492
|
h3(#usage.tutorial.test-proto). Verify the prototype
|
491
493
|
|
492
|
-
Now that we have implemented our prototype, we are ready to verify it against our "specification":#glossary.specification by running the "test":#glossary.test. <xref #fig..test-proto.rspec> and <xref #fig..test-proto.unit-test
|
493
|
-
|
494
|
-
<% tip "Reuse your specification." do %>
|
495
|
-
The _same_ specification can be used to verify both prototype and design.
|
496
|
-
<% end %>
|
497
|
-
|
498
|
-
Here, the @PROTOTYPE@ environment variable is assigned a non-empty value while running the test, so that, instead of our design, our prototype is verified against our specification. You can also assign a value to @PROTOTYPE@ before running the test, by using your shell's *export* or *setenv* command. Finally, the Icarus Verilog simulator, denoted by _cver_, is used to run the simulation.
|
499
|
-
|
500
|
-
<% tip "What can the test runner do?" do %>
|
501
|
-
If you invoke the test runner (1) without any arguments or (2) with the <tt>-T</tt> option, it will show you a list of tasks that it can perform for you.
|
502
|
-
<% end %>
|
494
|
+
Now that we have implemented our prototype, we are ready to verify it against our "specification":#glossary.specification by running the "test":#glossary.test. This process is illustrated by <xref #fig..test-proto.rspec> and <xref #fig..test-proto.unit-test>.
|
503
495
|
|
504
496
|
<% example "Running a test with specification in rSpec format", "#fig..test-proto.rspec" do %>
|
505
497
|
<pre>
|
@@ -535,10 +527,16 @@ Finished in 0.040668 seconds.
|
|
535
527
|
</pre>
|
536
528
|
<% end %>
|
537
529
|
|
530
|
+
In these examples, the @PROTOTYPE@ environment variable is assigned a non-empty value while running the test so that, instead of our design, our prototype is verified against our specification. You can also assign a value to @PROTOTYPE@ before running the test, by using your shell's *export* or *setenv* command. Finally, the "GPL Cver simulator":#setup.reqs, denoted by _cver_, is used to run the simulation.
|
531
|
+
|
532
|
+
<% tip "What can the test runner do?" do %>
|
533
|
+
If you invoke the test runner (1) without any arguments or (2) with the <tt>-T</tt> option, it will show you a list of tasks that it can perform for you.
|
534
|
+
<% end %>
|
535
|
+
|
538
536
|
|
539
537
|
h3(#usage.tutorial.implement-design). Implement the design
|
540
538
|
|
541
|
-
Now that we have implemented and verified our prototype, we are ready to implement our "design":#glossary.design. This is often quite simple because we translate _existing_ code from Ruby (our prototype) into Verilog (our design).
|
539
|
+
Now that we have implemented and verified our prototype, we are ready to implement our "design":#glossary.design. This is often quite simple because we translate _existing_ code from Ruby (our prototype) into Verilog (our design). The result of this process is illustrated by <xref #fig..counter.v_impl>.
|
542
540
|
|
543
541
|
|
544
542
|
<% example "Implementation of a simple up-counter with synchronous reset", "#fig..counter.v_impl" do %>
|
@@ -554,16 +552,6 @@ h3(#usage.tutorial.test-design). Verify the design
|
|
554
552
|
|
555
553
|
Now that we have implemented our "design":#glossary.design, we are ready to verify it against our "specification":#glossary.specification by running the "test":#glossary.test. <xref #fig..test-design.rspec> and <xref #fig..test-design.unit-test> illustrate this process.
|
556
554
|
|
557
|
-
Here, the @PROTOTYPE@ environment variable is _not_ specified while running the test, so that our design, instead of our prototype, is verified against our specification. You can also achieve this effect by assigning an empty value to @PROTOTYPE@, or by using your shell's *unset* command. Finally, the GPL Cver Verilog simulator, denoted by _cver_, is used to run the simulation.
|
558
|
-
|
559
|
-
<% tip "Running multiple tests at once." do %>
|
560
|
-
Create a file named <tt>Rakefile</tt> containing the following line.
|
561
|
-
|
562
|
-
bq. @require 'ruby-vpi/runner_proxy'@
|
563
|
-
|
564
|
-
Now you can invoke all test runners in the current directory simply by executing <pre>rake cver</pre> (where _cver_ denotes the GPL Cver simulator).
|
565
|
-
<% end %>
|
566
|
-
|
567
555
|
<% example "Running a test with specification in rSpec format", "#fig..test-design.rspec" do %>
|
568
556
|
<pre>
|
569
557
|
$ rake -f counter_rspec_runner.rake cver
|
@@ -594,19 +582,27 @@ Finished in 0.006766 seconds.
|
|
594
582
|
</pre>
|
595
583
|
<% end %>
|
596
584
|
|
585
|
+
In these examples, the @PROTOTYPE@ environment variable is _not_ specified while running the test, so that our design, instead of our prototype, is verified against our specification. You can also achieve this effect by assigning an empty value to @PROTOTYPE@, or by using your shell's *unset* command. Finally, the "GPL Cver simulator":#setup.reqs, denoted by _cver_, is used to run the simulation.
|
586
|
+
|
587
|
+
<% tip "Running multiple tests at once." do %>
|
588
|
+
Create a file named <tt>Rakefile</tt> containing the following line.
|
589
|
+
|
590
|
+
bq. @require 'ruby-vpi/runner_proxy'@
|
591
|
+
|
592
|
+
Now you can invoke all test runners in the current directory simply by executing <pre>rake cver</pre> (where _cver_ denotes the "GPL Cver simulator":#setup.reqs).
|
593
|
+
<% end %>
|
594
|
+
|
597
595
|
|
598
596
|
h2(#usage.examples). Examples
|
599
597
|
|
600
598
|
The <tt>samp</tt> directory contains several example tests which illustrate how Ruby-VPI can be used. Each example has an associated <tt>Rakefile</tt> which simplifies the process of running it. Therefore, simply navigate into an example directory and run the <pre>rake</pre> command to get started.
|
601
599
|
|
602
|
-
Also, some example specifications make use of BDD through the rSpec library. See <xref #background.methodology> for a discussion of rSpec.
|
603
|
-
|
604
600
|
|
605
601
|
h1(#hacking). Hacking
|
606
602
|
|
607
603
|
h2(#hacking.release-packages). Building release packages
|
608
604
|
|
609
|
-
In addition to the "normal requirements"
|
605
|
+
In addition to the "normal requirements":#setup.reqs, you need the following software to build release packages:
|
610
606
|
|
611
607
|
* "SWIG":http://www.swig.org/
|
612
608
|
* "RedCloth":http://rubyforge.org/projects/redcloth/
|
@@ -625,14 +621,18 @@ h2(#problems.ruby). Ruby
|
|
625
621
|
|
626
622
|
h3(#problems.ruby.SystemStackError). SystemStackError
|
627
623
|
|
628
|
-
|
624
|
+
<% note "Fixed in 2.0.0." do %>
|
625
|
+
This problem was fixed in release 2.0.0 (2006-04-17).
|
626
|
+
<% end %>
|
629
627
|
|
630
628
|
If a "stack level too deep (SystemStackError)" error occurs during the simulation, then increase the system-resource limit for stack-size by running the <pre>ulimit -s unlimited</pre> command before starting the simulation.
|
631
629
|
|
632
630
|
|
633
631
|
h3(#problems.ruby.xUnit). test/unit
|
634
632
|
|
635
|
-
|
633
|
+
<% note "Fixed in 2.0.0." do %>
|
634
|
+
This problem was fixed in release 2.0.0 (2006-04-17).
|
635
|
+
<% end %>
|
636
636
|
|
637
637
|
If your specification employs Ruby's unit testing framework, then you will encounter an error saying "[BUG] cross-thread violation on rb_gc()".
|
638
638
|
|
@@ -645,9 +645,9 @@ h3(#problems.ivl.vpi_handle_by_name). Vpi::vpi_handle_by_name
|
|
645
645
|
|
646
646
|
h4(#problems.ivl.vpi_handle_by_name.absolute-paths). Give full paths to Verilog objects
|
647
647
|
|
648
|
-
In version 0.8 and snapshot 20061009 of Icarus Verilog, the @vpi_handle_by_name@ function requires an _absolute_ path (including the name of the bench which instantiates the design) to a Verilog object. In addition, @vpi_handle_by_name@
|
648
|
+
In version 0.8 and snapshot 20061009 of Icarus Verilog, the @vpi_handle_by_name@ function requires an _absolute_ path (including the name of the bench which instantiates the design) to a Verilog object. In addition, @vpi_handle_by_name@ always returns @nil@ when its second parameter is specified.
|
649
649
|
|
650
|
-
For example, consider <xref #ex..TestFoo
|
650
|
+
For example, consider <xref #ex..TestFoo>. Here, one must write @vpi_handle_by_name("TestFoo.my_foo.clk", nil)@ instead of @vpi_handle_by_name("my_foo.clk", TestFoo)@ in order to access the @clk@ input of the @my_foo@ module instance.
|
651
651
|
|
652
652
|
<% example "Part of a bench which instantiates a Verilog design", "#ex..TestFoo" do %>
|
653
653
|
<code lang="verilog">
|
@@ -658,6 +658,7 @@ endmodule
|
|
658
658
|
</code>
|
659
659
|
<% end %>
|
660
660
|
|
661
|
+
|
661
662
|
h4(#problems.ivl.vpi_handle_by_name.connect-registers). Registers must be connected
|
662
663
|
|
663
664
|
In version 0.8 of Icarus Verilog, if you want to access a register in a design, then it must be connected to something (either assigned to a wire or passed as a parameter to a module instantiation). Otherwise, you will get a @nil@ value as the result of @vpi_handle_by_name@ method.
|
@@ -701,7 +702,9 @@ h2(#problems.vsim). Mentor Modelsim
|
|
701
702
|
|
702
703
|
h3(#problems.vsim.ruby_run). ruby_run();
|
703
704
|
|
704
|
-
|
705
|
+
<% note "Fixed in 2.0.0." do %>
|
706
|
+
This problem was fixed in release 2.0.0 (2006-04-17).
|
707
|
+
<% end %>
|
705
708
|
|
706
709
|
Version 6.1b of Mentor Modelsim doesn't play nicely with either an embedded Ruby interpreter or POSIX threads in a PLI application. When Ruby-VPI invokes the ruby_run function (which starts the Ruby interpreter), the simulator terminates immediately with an exit status of 0.
|
707
710
|
|
@@ -714,16 +717,16 @@ h2(#glossary.bench). Bench
|
|
714
717
|
An environment in which a "design":#glossary.design is verified against a "specification":#glossary.specification. Often, it is used to emulate conditions in which the design will be eventually deployed.
|
715
718
|
|
716
719
|
|
717
|
-
h2(#glossary.BDD). BDD
|
720
|
+
h2(#glossary.BDD). Behavior driven development (BDD)
|
718
721
|
|
719
|
-
|
722
|
+
An "agile software development methodology":http://agilemanifesto.org/ which emphasizes thinking in terms of behavior when designing, implementing, and verifying software.
|
720
723
|
|
721
|
-
|
724
|
+
See the "official wiki":http://behaviour-driven.org/ for more information.
|
722
725
|
|
723
726
|
|
724
727
|
h2(#glossary.design). Design
|
725
728
|
|
726
|
-
|
729
|
+
A Verilog module that is verified against a "specification":#glossary.specification in order to ensure correctness or soundness of its being. In other words, it is the thing being checked: does it work or not?
|
727
730
|
|
728
731
|
|
729
732
|
h2(#glossary.expectation). Expectation
|
@@ -733,29 +736,33 @@ The desired response to some stimulus.
|
|
733
736
|
|
734
737
|
h2(#glossary.handle). Handle
|
735
738
|
|
736
|
-
|
739
|
+
A reference to an object inside the Verilog simulation that was obtained through the @vpi_handle_by_name@ function.
|
737
740
|
|
738
741
|
|
739
742
|
h2(#glossary.rake). Rake
|
740
743
|
|
741
|
-
bq. Rake is a build tool, written in Ruby, using Ruby as a build language. Rake is similar to make in scope and purpose.
|
744
|
+
bq. Rake is a build tool, written in Ruby, using Ruby as a build language. Rake is similar to *make* in scope and purpose.
|
742
745
|
|
743
|
-
|
746
|
+
bq>. --"Rake documentation":http://docs.rubyrake.org
|
744
747
|
|
745
748
|
|
746
749
|
h2(#glossary.rspec). rSpec
|
747
750
|
|
748
|
-
|
751
|
+
The "BDD":#glossary.BDD framework for Ruby.
|
752
|
+
|
753
|
+
See the "rSpec website":http://rspec.rubyforge.org and "tutorial":http://rspec.rubyforge.org/tutorials/index.html for more information.
|
749
754
|
|
750
755
|
|
751
756
|
h2(#glossary.specification). Specification
|
752
757
|
|
753
|
-
A set of "
|
758
|
+
A set of "expectations":#glossary.expectations which define the desired behavior of a "design":#glossary.design when it is subjected to certain stimulus.
|
759
|
+
|
754
760
|
|
761
|
+
h2(#glossary.TDD). Test driven development (TDD)
|
755
762
|
|
756
|
-
|
763
|
+
An "agile software development methodology":http://agilemanifesto.org/ which emphasizes (1) testing functionality before implementing it and (2) refactoring.
|
757
764
|
|
758
|
-
|
765
|
+
See "this introductory article":http://www.agiledata.org/essays/tdd.html for more information.
|
759
766
|
|
760
767
|
|
761
768
|
h2(#glossary.test). Test
|