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.
Files changed (123) hide show
  1. data/Rakefile +6 -1
  2. data/bin/generate_test_tpl/bench.rb +84 -1
  3. data/bin/generate_test_tpl/bench.v +8 -17
  4. data/bin/generate_test_tpl/proto.rb +1 -1
  5. data/doc/common.css +14 -41
  6. data/doc/common.tpl +1 -1
  7. data/doc/figures/figures.dia +274 -753
  8. data/doc/figures/organization_detailed.png +0 -0
  9. data/doc/figures/ruby_relay.png +0 -0
  10. data/doc/history.html +363 -276
  11. data/doc/history.yml +40 -0
  12. data/doc/intro.inc +37 -15
  13. data/doc/lib/doc_proxy.rb +24 -4
  14. data/doc/manual.doc +345 -196
  15. data/doc/manual.html +741 -497
  16. data/doc/memo.doc +15 -15
  17. data/doc/memo.html +28 -27
  18. data/doc/readme.doc +2 -2
  19. data/doc/readme.html +51 -15
  20. data/doc/rss.erb +1 -1
  21. data/doc/rss.xml +1624 -31
  22. data/ext/Rakefile +1 -6
  23. data/ext/main.c +8 -3
  24. data/ext/main.h +5 -0
  25. data/ext/relay.c +12 -12
  26. data/ext/relay.h +1 -6
  27. data/ext/swig_vpi.i +2 -2
  28. data/ext/swig_wrap.cin +37 -20
  29. data/ext/verilog.h +2 -2
  30. data/ext/vlog.c +10 -3
  31. data/ext/vlog.h +4 -4
  32. data/lib/ruby-vpi/vpi.rb +114 -0
  33. data/lib/ruby-vpi.rb +21 -59
  34. data/ref/c/annotated.html +1 -1
  35. data/ref/c/common_8h.html +1 -1
  36. data/ref/c/files.html +1 -1
  37. data/ref/c/functions.html +1 -1
  38. data/ref/c/functions_vars.html +1 -1
  39. data/ref/c/globals.html +1 -1
  40. data/ref/c/globals_0x63.html +1 -1
  41. data/ref/c/globals_0x65.html +1 -1
  42. data/ref/c/globals_0x66.html +1 -1
  43. data/ref/c/globals_0x6d.html +3 -2
  44. data/ref/c/globals_0x70.html +1 -1
  45. data/ref/c/globals_0x72.html +4 -5
  46. data/ref/c/globals_0x73.html +1 -1
  47. data/ref/c/globals_0x74.html +1 -1
  48. data/ref/c/globals_0x76.html +4 -2
  49. data/ref/c/globals_0x78.html +1 -1
  50. data/ref/c/globals_defs.html +1 -1
  51. data/ref/c/globals_defs_0x65.html +1 -1
  52. data/ref/c/globals_defs_0x70.html +1 -1
  53. data/ref/c/globals_defs_0x76.html +1 -1
  54. data/ref/c/globals_defs_0x78.html +1 -1
  55. data/ref/c/globals_enum.html +1 -1
  56. data/ref/c/globals_eval.html +1 -1
  57. data/ref/c/globals_func.html +8 -7
  58. data/ref/c/globals_type.html +1 -1
  59. data/ref/c/globals_vars.html +3 -2
  60. data/ref/c/index.html +1 -1
  61. data/ref/c/main_8c.html +26 -1
  62. data/ref/c/main_8h.html +26 -1
  63. data/ref/c/relay_8c.html +11 -35
  64. data/ref/c/relay_8h.html +3 -27
  65. data/ref/c/structt__cb__data.html +1 -1
  66. data/ref/c/structt__vpi__delay.html +1 -1
  67. data/ref/c/structt__vpi__error__info.html +1 -1
  68. data/ref/c/structt__vpi__strengthval.html +1 -1
  69. data/ref/c/structt__vpi__systf__data.html +1 -1
  70. data/ref/c/structt__vpi__time.html +1 -1
  71. data/ref/c/structt__vpi__value.html +1 -1
  72. data/ref/c/structt__vpi__vecval.html +1 -1
  73. data/ref/c/structt__vpi__vlog__info.html +1 -1
  74. data/ref/c/verilog_8h.html +5 -5
  75. data/ref/c/vlog_8c.html +44 -6
  76. data/ref/c/vlog_8h.html +7 -8
  77. data/ref/c/vpi__user_8h.html +1 -1
  78. data/ref/ruby/classes/RDoc.html +5 -5
  79. data/ref/ruby/classes/RDoc.src/{M000041.html → M000045.html} +0 -0
  80. data/ref/ruby/classes/RubyVpi.html +10 -28
  81. data/ref/ruby/classes/RubyVpi.src/M000029.html +101 -124
  82. data/ref/ruby/classes/Vpi/Handle.html +56 -56
  83. data/ref/ruby/classes/Vpi/Handle.src/M000034.html +5 -9
  84. data/ref/ruby/classes/Vpi/Handle.src/M000035.html +5 -31
  85. data/ref/ruby/classes/Vpi/Handle.src/M000036.html +5 -74
  86. data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -17
  87. data/ref/ruby/classes/Vpi/Handle.src/M000038.html +9 -11
  88. data/ref/ruby/classes/Vpi/Handle.src/M000039.html +44 -0
  89. data/ref/ruby/classes/Vpi/Handle.src/M000040.html +74 -55
  90. data/ref/ruby/classes/Vpi/Handle.src/M000041.html +30 -0
  91. data/ref/ruby/classes/Vpi/Handle.src/M000042.html +24 -0
  92. data/ref/ruby/classes/Vpi/Handle.src/M000044.html +68 -0
  93. data/ref/ruby/classes/Vpi.html +149 -0
  94. data/ref/ruby/classes/Vpi.src/M000030.html +28 -0
  95. data/ref/ruby/classes/Vpi.src/M000031.html +18 -0
  96. data/ref/ruby/classes/Vpi.src/M000032.html +39 -0
  97. data/ref/ruby/classes/Vpi.src/M000033.html +22 -0
  98. data/ref/ruby/created.rid +1 -1
  99. data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
  100. data/ref/ruby/files/lib/ruby-vpi_rb.html +2 -2
  101. data/ref/ruby/fr_method_index.html +18 -14
  102. data/samp/counter/counter_rspec_bench.rb +81 -1
  103. data/samp/counter/counter_rspec_bench.v +5 -12
  104. data/samp/counter/counter_rspec_design.rb +1 -2
  105. data/samp/counter/counter_rspec_proto.rb +1 -1
  106. data/samp/counter/counter_rspec_spec.rb +3 -3
  107. data/samp/counter/counter_xunit_bench.rb +81 -1
  108. data/samp/counter/counter_xunit_bench.v +5 -12
  109. data/samp/counter/counter_xunit_design.rb +1 -2
  110. data/samp/counter/counter_xunit_proto.rb +1 -1
  111. data/samp/counter/counter_xunit_spec.rb +3 -3
  112. data/samp/pipelined_alu/hw5_unit_test_bench.rb +81 -1
  113. data/samp/pipelined_alu/hw5_unit_test_bench.v +11 -18
  114. data/samp/pipelined_alu/hw5_unit_test_design.rb +1 -1
  115. data/samp/pipelined_alu/hw5_unit_test_proto.rb +1 -1
  116. data/samp/pipelined_alu/hw5_unit_test_spec.rb +1 -1
  117. metadata +12 -9
  118. data/doc/figures/ruby_init.png +0 -0
  119. data/ext/swig_vpi.h +0 -924
  120. data/ref/ruby/classes/Vpi/Handle.src/M000030.html +0 -18
  121. data/ref/ruby/classes/Vpi/Handle.src/M000031.html +0 -18
  122. data/ref/ruby/classes/Vpi/Handle.src/M000032.html +0 -18
  123. 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 = format_history_entry @history.first
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
- parameter <%= param.decl %>;
12
+ parameter <%= param.decl %>;
17
13
  <% end %>
18
14
  <% aModuleInfo.ports.each do |port| %>
19
- <%= port.input? ? 'reg' : 'wire' %> <%= port.size %> <%= port.name %>;
15
+ <%= port.input? ? 'reg' : 'wire' %> <%= port.size %> <%= port.name %>;
20
16
  <% end %>
21
17
 
22
- <%= aModuleInfo.name %> <%
23
- instConfigDecl = make_inst_param_decl(aModuleInfo.parameters)
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
- // generate clock for the design under test
32
- initial <%= clockSignal %> = 0;
33
- always #5 <%= clockSignal %> = !<%= clockSignal %>;
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, relay_verilog invokes this method
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-left: 275px;
5
- margin-right: 50px;
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
- padding: 0.5em;
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: 200px;
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 li {
62
- margin-left: -1.25em;
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
- padding-top: 0px;
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
- font-weight: bold;
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
- /* extra spacing before big block elements */
161
-
162
- .admonition, .figure {
163
- margin-top: 3em;
164
- }
135
+ .formal .title {
136
+ margin-top: 3em;
137
+ }
data/doc/common.tpl CHANGED
@@ -24,7 +24,7 @@
24
24
  <h1>Contents</h1>
25
25
  <%=
26
26
  @headings.map do |h|
27
- %{#{'*' * h.depth} "#{h.title}":##{h.anchor}}
27
+ %{#{'*' * h.depth} #{h.index} "#{h.title}":##{h.anchor}}
28
28
  end.join("\n").redcloth
29
29
  %>
30
30