ruby-vpi 13.0.0 → 14.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/Rakefile +6 -1
- data/bin/generate_test_tpl/bench.rb +84 -1
- data/bin/generate_test_tpl/bench.v +8 -17
- data/bin/generate_test_tpl/proto.rb +1 -1
- data/doc/common.css +14 -41
- data/doc/common.tpl +1 -1
- data/doc/figures/figures.dia +274 -753
- data/doc/figures/organization_detailed.png +0 -0
- data/doc/figures/ruby_relay.png +0 -0
- data/doc/history.html +363 -276
- data/doc/history.yml +40 -0
- data/doc/intro.inc +37 -15
- data/doc/lib/doc_proxy.rb +24 -4
- data/doc/manual.doc +345 -196
- data/doc/manual.html +741 -497
- data/doc/memo.doc +15 -15
- data/doc/memo.html +28 -27
- data/doc/readme.doc +2 -2
- data/doc/readme.html +51 -15
- data/doc/rss.erb +1 -1
- data/doc/rss.xml +1624 -31
- data/ext/Rakefile +1 -6
- data/ext/main.c +8 -3
- data/ext/main.h +5 -0
- data/ext/relay.c +12 -12
- data/ext/relay.h +1 -6
- data/ext/swig_vpi.i +2 -2
- data/ext/swig_wrap.cin +37 -20
- data/ext/verilog.h +2 -2
- data/ext/vlog.c +10 -3
- data/ext/vlog.h +4 -4
- data/lib/ruby-vpi/vpi.rb +114 -0
- data/lib/ruby-vpi.rb +21 -59
- 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_0x6d.html +3 -2
- data/ref/c/globals_0x70.html +1 -1
- data/ref/c/globals_0x72.html +4 -5
- data/ref/c/globals_0x73.html +1 -1
- data/ref/c/globals_0x74.html +1 -1
- data/ref/c/globals_0x76.html +4 -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 +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 +8 -7
- data/ref/c/globals_type.html +1 -1
- data/ref/c/globals_vars.html +3 -2
- data/ref/c/index.html +1 -1
- data/ref/c/main_8c.html +26 -1
- data/ref/c/main_8h.html +26 -1
- data/ref/c/relay_8c.html +11 -35
- data/ref/c/relay_8h.html +3 -27
- 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/verilog_8h.html +5 -5
- data/ref/c/vlog_8c.html +44 -6
- data/ref/c/vlog_8h.html +7 -8
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000041.html → M000045.html} +0 -0
- data/ref/ruby/classes/RubyVpi.html +10 -28
- data/ref/ruby/classes/RubyVpi.src/M000029.html +101 -124
- data/ref/ruby/classes/Vpi/Handle.html +56 -56
- data/ref/ruby/classes/Vpi/Handle.src/M000034.html +5 -9
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +5 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +9 -11
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +44 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +74 -55
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +30 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +24 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +68 -0
- data/ref/ruby/classes/Vpi.html +149 -0
- data/ref/ruby/classes/Vpi.src/M000030.html +28 -0
- data/ref/ruby/classes/Vpi.src/M000031.html +18 -0
- data/ref/ruby/classes/Vpi.src/M000032.html +39 -0
- data/ref/ruby/classes/Vpi.src/M000033.html +22 -0
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -2
- data/ref/ruby/fr_method_index.html +18 -14
- data/samp/counter/counter_rspec_bench.rb +81 -1
- data/samp/counter/counter_rspec_bench.v +5 -12
- data/samp/counter/counter_rspec_design.rb +1 -2
- data/samp/counter/counter_rspec_proto.rb +1 -1
- data/samp/counter/counter_rspec_spec.rb +3 -3
- data/samp/counter/counter_xunit_bench.rb +81 -1
- data/samp/counter/counter_xunit_bench.v +5 -12
- data/samp/counter/counter_xunit_design.rb +1 -2
- data/samp/counter/counter_xunit_proto.rb +1 -1
- data/samp/counter/counter_xunit_spec.rb +3 -3
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +81 -1
- data/samp/pipelined_alu/hw5_unit_test_bench.v +11 -18
- data/samp/pipelined_alu/hw5_unit_test_design.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +1 -1
- metadata +12 -9
- data/doc/figures/ruby_init.png +0 -0
- data/ext/swig_vpi.h +0 -924
- data/ref/ruby/classes/Vpi/Handle.src/M000030.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000031.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000032.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000033.html +0 -18
data/doc/history.yml
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
-
|
|
2
|
+
Version: 14.0.0
|
|
3
|
+
|
|
4
|
+
Date: 2006-12-30
|
|
5
|
+
|
|
6
|
+
Summary: |
|
|
7
|
+
This release adds support for simulation callbacks, renders Verilog benches _fully simplified_, and revises the user manual to reflect major changes.
|
|
8
|
+
|
|
9
|
+
Notice: |
|
|
10
|
+
* The @Vpi::relay_verilog@ method has been replaced by @Vpi::simulate@.
|
|
11
|
+
|
|
12
|
+
Please update you tests accordingly, because invoking the @Vpi::relay_verilog@ method directly will cause your tests to freeze/hang.
|
|
13
|
+
|
|
14
|
+
* Verilog benches no longer contain any clock generation code. They are now mere skeletons, whose _only_ purpose is to instantiate the design under test.
|
|
15
|
+
|
|
16
|
+
The clock generation code is now contained in the Ruby bench.
|
|
17
|
+
|
|
18
|
+
h3. New features
|
|
19
|
+
|
|
20
|
+
* The @RubyVpi::init_bench@ method now gives you _complete control_ over performing a clock/operation/whatever cycle for your design. This feature allows you to work with multi-clocked designs.
|
|
21
|
+
|
|
22
|
+
* Callbacks are now supported through the @Vpi::vpi_register_cb@ method. See "the callbacks section in the user manual":manual.html#usage.vpi.callbacks for details.
|
|
23
|
+
|
|
24
|
+
* Added the @Vpi::advance_time@ method, which makes the Verilog simulator simulate a given number of time steps.
|
|
25
|
+
|
|
26
|
+
* Added the @Vpi::simulation_time@ method, which gives you the current simulation time as a 64-bit integer.
|
|
27
|
+
|
|
28
|
+
Details: |
|
|
29
|
+
* Removed the monkey patch for the SWIG @va_list@ problem -- it no longer occurs.
|
|
30
|
+
|
|
31
|
+
* Cleansed the appearance of the user documentation.
|
|
32
|
+
** Added indices to section headings, just like LaTeX.
|
|
33
|
+
** Admonition boxes no longer interfere with surrounding text, and they don't have big gap above them.
|
|
34
|
+
** Navigation menu is now elastic (fluid layout).
|
|
35
|
+
|
|
36
|
+
* Revised the user manual and added new content.
|
|
37
|
+
** Moved "VPI utility layer" section from background chapter into usage chapter in user manual.
|
|
38
|
+
** Added a nice introduction to entire manual with links to reference documentation.
|
|
39
|
+
|
|
40
|
+
|
|
1
41
|
-
|
|
2
42
|
Version: 13.0.0
|
|
3
43
|
|
data/doc/intro.inc
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
Ruby-VPI is a "Ruby":http://www.ruby-lang.org interface to "IEEE 1364-2005 Verilog VPI":http://ieeexplore.ieee.org/xpl/standardstoc.jsp?isnumber=33945. It lets you create complex Verilog test benches easily and wholly in Ruby.
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
h2(#intro.features). Features
|
|
5
5
|
|
|
6
|
+
h3. Portable
|
|
7
|
+
|
|
6
8
|
* Supports the _entire_ "IEEE Std 1364-2005"::http://ieeexplore.ieee.org/xpl/standardstoc.jsp?isnumber=33945 VPI standard.
|
|
7
9
|
|
|
8
10
|
* Works with all "major Verilog simulators":manual.html#setup.reqs available today.
|
|
9
|
-
**
|
|
11
|
+
** Compiled _just once_ during "installation":manual.html#setup.installation and used forever!
|
|
12
|
+
|
|
13
|
+
h3. Agile
|
|
10
14
|
|
|
11
15
|
* Enables "agile practices":http://agilemanifesto.org/ such as
|
|
12
16
|
** "test-driven":http://www.testdriven.com development
|
|
@@ -14,33 +18,51 @@ h2(#intro.features). Features
|
|
|
14
18
|
** "rapid prototyping":manual.html#usage.tutorial.implement-proto for design exploration
|
|
15
19
|
|
|
16
20
|
* Eliminates unneccesary work:
|
|
17
|
-
** "Specifications":manual.html#usage.tutorial.specification are
|
|
21
|
+
** "Specifications":manual.html#usage.tutorial.specification are readable, portable, and _executable_.
|
|
18
22
|
** The "automated test generator":manual.html#usage.tools.generate-test helps you accomodate design changes with _minimal_ effort.
|
|
23
|
+
** There is absolutely _no compiling_!
|
|
24
|
+
|
|
25
|
+
h3. Powerful
|
|
19
26
|
|
|
20
|
-
*
|
|
27
|
+
* Inherits the "power and elegance":http://www.ruby-lang.org/en/about/ of Ruby:
|
|
21
28
|
** Unlimited length integers
|
|
22
29
|
** Regular expressions
|
|
23
30
|
** Multi-threading
|
|
24
31
|
** System calls and I/O
|
|
25
32
|
** "_ad infinitum_":http://rubyforge.org
|
|
26
33
|
|
|
34
|
+
* Uses "ruby-debug":http://rubyforge.org/projects/ruby-debug/ for "interactive debugging":manual.html#usage.debugger.
|
|
35
|
+
* Uses "rcov":http://eigenclass.org/hiki.rb?rcov for test "coverage analysis and report generation":manual.html#usage.test-runner.env-vars.
|
|
36
|
+
|
|
37
|
+
h3. Free
|
|
38
|
+
|
|
27
39
|
* 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.
|
|
28
40
|
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
h2(#intro.applications). Applications
|
|
43
|
+
|
|
44
|
+
Here is a modest sampling of tasks that Ruby-VPI can be used to perform.
|
|
31
45
|
|
|
32
|
-
|
|
46
|
+
* From the second edition of "_The Verilog PLI Handbook_":http://www.sutherland-hdl.com/publications.html:
|
|
47
|
+
** C language bus-functional models
|
|
48
|
+
** Reading test vector files
|
|
49
|
+
** Delay calculation
|
|
50
|
+
** Custom output displays
|
|
51
|
+
** Co-simulation
|
|
52
|
+
** Design debug utilities
|
|
53
|
+
** Simulation analysis
|
|
33
54
|
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
* Adapted from "Pin Hong's":http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/ observations:
|
|
56
|
+
** Writing hardware models in Ruby
|
|
57
|
+
** Dumping or processing netlist data from Verilog database
|
|
58
|
+
** Dumping or processing simulation data
|
|
59
|
+
** Feeding dynamic simulation stimuli
|
|
60
|
+
** Back-annotating delay information
|
|
61
|
+
** Interactive logic simulation
|
|
62
|
+
** Building a distributed simulation
|
|
41
63
|
|
|
42
64
|
|
|
43
|
-
|
|
65
|
+
h2(#intro.appetizers). Appetizers
|
|
44
66
|
|
|
45
67
|
Here is a modest sampling of code to whet your appetite.
|
|
46
68
|
|
|
@@ -58,5 +80,5 @@ bq. @puts some_register@
|
|
|
58
80
|
|
|
59
81
|
* Simulate fifteen clock cycles:
|
|
60
82
|
|
|
61
|
-
bq. @15.times {
|
|
83
|
+
bq. @15.times { simulate }@
|
|
62
84
|
|
data/doc/lib/doc_proxy.rb
CHANGED
|
@@ -23,7 +23,7 @@ require 'erb_proxy'
|
|
|
23
23
|
# Processes ERB templates to produce documentation. Templates may contain "<xref...>" tags where the ... represents the target anchor of the cross-reference.
|
|
24
24
|
class DocProxy < ErbProxy
|
|
25
25
|
Block = Struct.new :anchor, :title, :type
|
|
26
|
-
Heading = Struct.new :anchor, :title, :depth
|
|
26
|
+
Heading = Struct.new :anchor, :title, :depth, :index
|
|
27
27
|
@@anchorNum = 0
|
|
28
28
|
|
|
29
29
|
CATEGORIES = {
|
|
@@ -67,12 +67,32 @@ class DocProxy < ErbProxy
|
|
|
67
67
|
|
|
68
68
|
# parse document structure and insert anchors (so that the table of contents can link directly to these headings) where necessary
|
|
69
69
|
buffer.gsub! %r{^(\s*h(\d))(.*)$} do
|
|
70
|
-
head, depth, rest = $1, $2, $3
|
|
70
|
+
head, depth, rest = $1, $2.to_i, $3
|
|
71
71
|
|
|
72
72
|
# parse title and class attributes
|
|
73
73
|
rest =~ /^([\{\(\[].*?[\]\)\}])?\.(.*)$/
|
|
74
74
|
atts, title = $1, $2.strip
|
|
75
75
|
|
|
76
|
+
# put heading index in title
|
|
77
|
+
prevDepth = @headings.last.depth rescue 0
|
|
78
|
+
prevIndex = @headings.last.index rescue ""
|
|
79
|
+
depthDiff = (depth - prevDepth).abs
|
|
80
|
+
|
|
81
|
+
index =
|
|
82
|
+
if depth > prevDepth
|
|
83
|
+
s = prevIndex + ('.1' * depthDiff)
|
|
84
|
+
s.sub /^\./, ''
|
|
85
|
+
|
|
86
|
+
elsif depth < prevDepth
|
|
87
|
+
s = prevIndex.sub /(\.\d+){#{depthDiff}}$/, ''
|
|
88
|
+
s.next
|
|
89
|
+
|
|
90
|
+
else
|
|
91
|
+
prevIndex.next
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
rest = "#{atts}. #{index} #{title}"
|
|
95
|
+
|
|
76
96
|
# parse and insert anchor if necessary
|
|
77
97
|
if atts =~ /#(.*?)\)/
|
|
78
98
|
anchor = $1
|
|
@@ -81,7 +101,7 @@ class DocProxy < ErbProxy
|
|
|
81
101
|
rest.insert 0, "(##{anchor})"
|
|
82
102
|
end
|
|
83
103
|
|
|
84
|
-
@headings << Heading.new(anchor, title, depth
|
|
104
|
+
@headings << Heading.new(anchor, title, depth, index)
|
|
85
105
|
@blocks[:section] << Block.new(anchor, title, :section)
|
|
86
106
|
|
|
87
107
|
head + rest
|
|
@@ -141,7 +161,7 @@ class DocProxy < ErbProxy
|
|
|
141
161
|
|
|
142
162
|
# Joins the given elements by putting enough white-space between them so that RedCloth knows they're different elements.
|
|
143
163
|
def join_redcloth_elements *args
|
|
144
|
-
args.join "\n\n\n"
|
|
164
|
+
args.join("\n\n\n") << "\n\n\n"
|
|
145
165
|
end
|
|
146
166
|
|
|
147
167
|
# Removes the # from a HTML anchor so that only its name is preserved.
|