ruby-vpi 13.0.0 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/Rakefile
CHANGED
@@ -164,7 +164,12 @@ end
|
|
164
164
|
desc 'Generate release announcement.'
|
165
165
|
task :ann => 'doc/history.rb' do |t|
|
166
166
|
require t.prerequisites[0]
|
167
|
-
text =
|
167
|
+
text = [
|
168
|
+
PROJECT_DETAIL,
|
169
|
+
"* " + PROJECT_URL,
|
170
|
+
"---",
|
171
|
+
format_history_entry(@history.first)
|
172
|
+
].join "\n\n"
|
168
173
|
|
169
174
|
require 'doc/lib/doc_format'
|
170
175
|
html = text.redcloth
|
@@ -1,6 +1,89 @@
|
|
1
|
+
<%
|
2
|
+
clock = aOutputInfo.designClassName + '.' + aModuleInfo.ports.first.name
|
3
|
+
%>
|
1
4
|
# This file is the Ruby side of the bench.
|
2
5
|
|
3
6
|
require 'rubygems'
|
4
7
|
require 'ruby-vpi'
|
5
8
|
|
6
|
-
RubyVpi.init_bench :<%= aOutputInfo.designClassName %>, :<%= aOutputInfo.specFormat %>
|
9
|
+
RubyVpi.init_bench :<%= aOutputInfo.designClassName %>, :<%= aOutputInfo.specFormat %> do
|
10
|
+
##
|
11
|
+
# This block is executed whenever Vpi::simulate is invoked.
|
12
|
+
#
|
13
|
+
# It simulates the design under test. This is typically done
|
14
|
+
# by toggling the clock signal, as demonstrated below.
|
15
|
+
##
|
16
|
+
|
17
|
+
##
|
18
|
+
# We are currently here (marked by the ! signs):
|
19
|
+
#
|
20
|
+
# !
|
21
|
+
# !
|
22
|
+
# ! ____ ____ ____ ____
|
23
|
+
# ___!/ \____/ \____/ \____/ \
|
24
|
+
# !
|
25
|
+
# !
|
26
|
+
#
|
27
|
+
##
|
28
|
+
|
29
|
+
<%= clock %>.intVal = 1
|
30
|
+
|
31
|
+
##
|
32
|
+
# After setting the clock signal to high, we are here:
|
33
|
+
#
|
34
|
+
# !
|
35
|
+
# !
|
36
|
+
# !____ ____ ____ ____
|
37
|
+
# ____/! \____/ \____/ \____/ \
|
38
|
+
# !
|
39
|
+
# !
|
40
|
+
#
|
41
|
+
##
|
42
|
+
|
43
|
+
advance_time
|
44
|
+
|
45
|
+
##
|
46
|
+
# After advancing the time, we are here:
|
47
|
+
#
|
48
|
+
# !
|
49
|
+
# !
|
50
|
+
# ____! ____ ____ ____
|
51
|
+
# ____/ !\____/ \____/ \____/ \
|
52
|
+
# !
|
53
|
+
# !
|
54
|
+
#
|
55
|
+
##
|
56
|
+
|
57
|
+
<%= clock %>.intVal = 0
|
58
|
+
|
59
|
+
##
|
60
|
+
# After setting the clock signal to low, we are here:
|
61
|
+
#
|
62
|
+
# !
|
63
|
+
# !
|
64
|
+
# ____ ! ____ ____ ____
|
65
|
+
# ____/ \!____/ \____/ \____/ \
|
66
|
+
# !
|
67
|
+
# !
|
68
|
+
#
|
69
|
+
##
|
70
|
+
|
71
|
+
advance_time
|
72
|
+
|
73
|
+
##
|
74
|
+
# After advancing the time, we are here:
|
75
|
+
#
|
76
|
+
#
|
77
|
+
# !
|
78
|
+
# !
|
79
|
+
# ____ ! ____ ____ ____
|
80
|
+
# ____/ \____!/ \____/ \____/ \
|
81
|
+
# !
|
82
|
+
# !
|
83
|
+
#
|
84
|
+
##
|
85
|
+
|
86
|
+
##
|
87
|
+
# This process repeats when Vpi::simulate is invoked again.
|
88
|
+
##
|
89
|
+
end
|
@@ -5,31 +5,22 @@
|
|
5
5
|
".#{param.name}(#{param.name})"
|
6
6
|
end.join(', ')
|
7
7
|
end
|
8
|
-
|
9
|
-
clockSignal = aModuleInfo.ports.first.name
|
10
8
|
%>
|
11
9
|
// This file is the Verilog side of the bench.
|
12
10
|
module <%= aOutputInfo.verilogBenchName %>;
|
13
|
-
|
14
|
-
// instantiate the design under test
|
15
11
|
<% aModuleInfo.parameters.each do |param| %>
|
16
|
-
|
12
|
+
parameter <%= param.decl %>;
|
17
13
|
<% end %>
|
18
14
|
<% aModuleInfo.ports.each do |port| %>
|
19
|
-
|
15
|
+
<%= port.input? ? 'reg' : 'wire' %> <%= port.size %> <%= port.name %>;
|
20
16
|
<% end %>
|
21
17
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
unless instConfigDecl.empty?
|
26
|
-
%>#(<%= instConfigDecl %>)<%
|
27
|
-
end
|
28
|
-
|
29
|
-
%> <%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
|
18
|
+
<%= aModuleInfo.name %> <%
|
19
|
+
instConfigDecl = make_inst_param_decl(aModuleInfo.parameters)
|
30
20
|
|
31
|
-
|
32
|
-
|
33
|
-
|
21
|
+
unless instConfigDecl.empty?
|
22
|
+
%>#(<%= instConfigDecl %>)<%
|
23
|
+
end
|
34
24
|
|
25
|
+
%> <%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
|
35
26
|
endmodule
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# This is a prototype of the design under test.
|
2
2
|
|
3
|
-
# When prototyping is enabled,
|
3
|
+
# When prototyping is enabled, Vpi::simulate invokes this method
|
4
4
|
# instead of transferring control to the Verilog simulator.
|
5
5
|
def <%= aOutputInfo.designClassName %>.simulate!
|
6
6
|
# discard old outputs
|
data/doc/common.css
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
body {
|
2
2
|
font-family: sans-serif;
|
3
3
|
|
4
|
-
margin
|
5
|
-
margin-
|
6
|
-
margin-bottom: 5em;
|
4
|
+
margin: 1em;
|
5
|
+
margin-left: 30%;
|
7
6
|
max-width: 600px;
|
8
7
|
}
|
9
8
|
|
@@ -16,26 +15,7 @@ th, h1, h2, h3, h4, h5, h6, .title {
|
|
16
15
|
|
17
16
|
h1, h2, h3, h4, h5, h6 {
|
18
17
|
margin-top: 3em;
|
19
|
-
|
20
|
-
}
|
21
|
-
|
22
|
-
h1, h2, h3 {
|
23
|
-
text-align: center;
|
24
|
-
-moz-border-radius: 1em;
|
25
|
-
border-radius: 1em;
|
26
|
-
}
|
27
|
-
|
28
|
-
h1 {
|
29
|
-
padding: 1em;
|
30
|
-
background-color: mistyrose;
|
31
|
-
}
|
32
|
-
|
33
|
-
h2 {
|
34
|
-
background-color: bisque;
|
35
|
-
}
|
36
|
-
|
37
|
-
h3 {
|
38
|
-
background-color: oldlace;
|
18
|
+
border-bottom: thin solid silver;
|
39
19
|
}
|
40
20
|
|
41
21
|
|
@@ -47,19 +27,17 @@ h3 {
|
|
47
27
|
top: 0px;
|
48
28
|
bottom: 0px;
|
49
29
|
|
50
|
-
max-width:
|
30
|
+
max-width: 25%;
|
51
31
|
padding: 1em;
|
52
32
|
overflow: auto;
|
53
|
-
|
54
|
-
background-color: white;
|
55
33
|
}
|
56
34
|
|
57
35
|
#navigation h1, #navigation h2, #navigation h3, #navigation h4, #navigation h5, #navigation h6 {
|
58
36
|
font-size: smaller;
|
59
37
|
}
|
60
38
|
|
61
|
-
#navigation
|
62
|
-
margin-left: -1.
|
39
|
+
#navigation ul {
|
40
|
+
margin-left: -1.75em;
|
63
41
|
}
|
64
42
|
|
65
43
|
|
@@ -69,7 +47,10 @@ h3 {
|
|
69
47
|
border: thin solid steelblue;
|
70
48
|
background-color: aliceblue;
|
71
49
|
padding: 1em;
|
72
|
-
|
50
|
+
margin-bottom: 1em;
|
51
|
+
margin-top: 1em;
|
52
|
+
|
53
|
+
min-height: 170px;
|
73
54
|
}
|
74
55
|
|
75
56
|
.admonition img {
|
@@ -80,8 +61,7 @@ h3 {
|
|
80
61
|
/* source code */
|
81
62
|
|
82
63
|
tt {
|
83
|
-
|
84
|
-
background-color: lemonchiffon;
|
64
|
+
background-color: #cfc;
|
85
65
|
}
|
86
66
|
|
87
67
|
pre, blockquote .code {
|
@@ -144,10 +124,6 @@ th {
|
|
144
124
|
|
145
125
|
/* misc. */
|
146
126
|
|
147
|
-
.cover-page {
|
148
|
-
text-align: center;
|
149
|
-
}
|
150
|
-
|
151
127
|
a img {
|
152
128
|
border: none;
|
153
129
|
}
|
@@ -156,9 +132,6 @@ em, strong {
|
|
156
132
|
font-family: serif;
|
157
133
|
}
|
158
134
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
.admonition, .figure {
|
163
|
-
margin-top: 3em;
|
164
|
-
}
|
135
|
+
.formal .title {
|
136
|
+
margin-top: 3em;
|
137
|
+
}
|