ruby-vpi 12.1.0 → 13.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/generate_test.rb +4 -5
- data/bin/generate_test_tpl/bench.rb +2 -0
- data/bin/generate_test_tpl/bench.v +4 -11
- data/bin/header_to_ruby.rb +0 -1
- data/doc/history.html +281 -206
- data/doc/history.rb +1 -1
- data/doc/history.yml +66 -35
- data/doc/manual.html +3 -3
- data/doc/memo.doc +2 -0
- data/doc/memo.html +5 -0
- data/doc/readme.doc +16 -8
- data/doc/readme.html +19 -13
- data/doc/rss.xml +7 -0
- data/ext/common.h +1 -0
- data/ext/{swig.c → main.c} +32 -6
- data/ext/{swig.h → main.h} +8 -7
- data/ext/relay.c +7 -83
- data/ext/relay.h +7 -5
- data/ext/swig_vpi.i +10 -3
- data/ext/swig_wrap.cin +4 -1
- data/ext/verilog.h +26 -10
- data/ext/vlog.c +16 -23
- data/ext/vlog.h +5 -19
- data/lib/ruby-vpi/rcov.rb +3 -3
- data/lib/ruby-vpi/runner.rb +5 -2
- data/lib/ruby-vpi/vpi.rb +1 -1
- data/lib/ruby-vpi.rb +57 -5
- data/ref/c/annotated.html +1 -7
- data/ref/c/common_8h.html +2 -1
- data/ref/c/files.html +3 -5
- data/ref/c/functions.html +24 -46
- data/ref/c/functions_vars.html +24 -46
- data/ref/c/globals.html +5 -210
- data/ref/c/globals_0x63.html +32 -48
- data/ref/c/globals_0x65.html +3 -9
- data/ref/c/globals_0x66.html +3 -19
- data/ref/c/globals_0x6d.html +5 -10
- data/ref/c/globals_0x70.html +19 -25
- data/ref/c/globals_0x72.html +8 -18
- data/ref/c/globals_0x73.html +11 -198
- data/ref/c/globals_0x74.html +2 -8
- data/ref/c/globals_0x76.html +419 -427
- data/ref/c/globals_0x78.html +3 -9
- data/ref/c/globals_defs.html +30 -35
- data/ref/c/globals_defs_0x65.html +2 -7
- data/ref/c/globals_defs_0x70.html +3 -8
- data/ref/c/globals_defs_0x76.html +416 -420
- data/ref/c/globals_defs_0x78.html +2 -7
- data/ref/c/globals_enum.html +1 -1
- data/ref/c/globals_eval.html +1 -1
- data/ref/c/globals_func.html +13 -173
- data/ref/c/globals_type.html +26 -29
- data/ref/c/globals_vars.html +4 -88
- data/ref/c/index.html +1 -1
- data/ref/c/{swig_8c.html → main_8c.html} +16 -14
- data/ref/c/{swig_8h.html → main_8h.html} +15 -14
- data/ref/c/relay_8c.html +25 -38
- data/ref/c/relay_8h.html +16 -15
- data/ref/c/structt__cb__data.html +6 -23
- data/ref/c/structt__vpi__delay.html +3 -20
- data/ref/c/structt__vpi__error__info.html +3 -71
- data/ref/c/structt__vpi__strengthval.html +3 -3
- data/ref/c/structt__vpi__systf__data.html +12 -46
- data/ref/c/structt__vpi__time.html +3 -3
- data/ref/c/structt__vpi__value.html +3 -113
- data/ref/c/structt__vpi__vecval.html +3 -3
- data/ref/c/structt__vpi__vlog__info.html +3 -54
- data/ref/c/verilog_8h.html +69 -3
- data/ref/c/vlog_8c.html +16 -61
- data/ref/c/vlog_8h.html +14 -57
- data/ref/c/vpi__user_8h.html +16 -16
- data/ref/ruby/classes/ERB.html +5 -5
- data/ref/ruby/classes/ERB.src/{M000032.html → M000026.html} +0 -0
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/{M000034.html → M000027.html} +0 -0
- data/ref/ruby/classes/FileUtils.src/{M000035.html → M000028.html} +0 -0
- data/ref/ruby/classes/Float.html +5 -5
- data/ref/ruby/classes/Float.src/{M000027.html → M000022.html} +0 -0
- data/ref/ruby/classes/Integer.html +68 -68
- data/ref/ruby/classes/Integer.src/M000008.html +25 -0
- data/ref/ruby/classes/Integer.src/M000009.html +18 -0
- data/ref/ruby/classes/Integer.src/{M000014.html → M000010.html} +0 -0
- data/ref/ruby/classes/Integer.src/{M000015.html → M000011.html} +0 -0
- data/ref/ruby/classes/Integer.src/M000012.html +5 -12
- data/ref/ruby/classes/Integer.src/M000013.html +5 -5
- data/ref/ruby/classes/Integer.src/M000016.html +9 -5
- data/ref/ruby/classes/Integer.src/M000017.html +9 -5
- data/ref/ruby/classes/Integer.src/{M000022.html → M000018.html} +0 -0
- data/ref/ruby/classes/Integer.src/{M000023.html → M000019.html} +0 -0
- data/ref/ruby/classes/Integer.src/M000020.html +12 -9
- data/ref/ruby/classes/Integer.src/M000021.html +17 -9
- data/ref/ruby/classes/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000050.html → M000041.html} +0 -0
- data/ref/ruby/classes/RubyVpi.html +29 -24
- data/ref/ruby/classes/RubyVpi.src/M000029.html +142 -0
- data/ref/ruby/classes/String.html +15 -15
- data/ref/ruby/classes/String.src/{M000029.html → M000023.html} +0 -0
- data/ref/ruby/classes/String.src/{M000030.html → M000024.html} +0 -0
- data/ref/ruby/classes/String.src/{M000031.html → M000025.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Parameter.html +5 -5
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/{M000011.html → M000007.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.html +20 -20
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000007.html → M000003.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000008.html → M000004.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000009.html → M000005.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module/Port.src/{M000010.html → M000006.html} +0 -0
- data/ref/ruby/classes/VerilogParser/Module.html +5 -5
- data/ref/ruby/classes/VerilogParser/Module.src/{M000006.html → M000002.html} +0 -0
- data/ref/ruby/classes/VerilogParser.html +5 -5
- data/ref/ruby/classes/VerilogParser.src/{M000005.html → M000001.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.html +56 -62
- data/ref/ruby/classes/Vpi/Handle.src/M000030.html +18 -0
- data/ref/ruby/classes/Vpi/Handle.src/{M000039.html → M000031.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000032.html +18 -0
- data/ref/ruby/classes/Vpi/Handle.src/{M000041.html → M000033.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.src/{M000042.html → M000034.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.src/{M000043.html → M000035.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.src/{M000044.html → M000036.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.src/{M000045.html → M000037.html} +0 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +11 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +55 -5
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +1 -49
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_rb.html +1 -48
- data/ref/ruby/files/lib/ruby-vpi/vpi_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/fr_class_index.html +0 -5
- data/ref/ruby/fr_method_index.html +41 -50
- data/samp/counter/counter_rspec_bench.rb +2 -0
- data/samp/counter/counter_rspec_bench.v +4 -11
- data/samp/counter/counter_rspec_design.rb +2 -2
- data/samp/counter/counter_xunit_bench.rb +2 -0
- data/samp/counter/counter_xunit_bench.v +4 -11
- data/samp/counter/counter_xunit_design.rb +2 -2
- data/samp/pipelined_alu/hw5_unit_test_bench.rb +2 -0
- data/samp/pipelined_alu/hw5_unit_test_bench.v +4 -11
- metadata +37 -85
- data/ref/c/globals_0x62.html +0 -62
- data/ref/c/globals_0x67.html +0 -64
- data/ref/c/globals_0x69.html +0 -62
- data/ref/c/globals_0x6c.html +0 -64
- data/ref/c/globals_0x6e.html +0 -63
- data/ref/c/globals_0x75.html +0 -63
- data/ref/c/globals_defs_0x6c.html +0 -57
- data/ref/c/globals_defs_0x6e.html +0 -56
- data/ref/c/globals_defs_0x72.html +0 -57
- data/ref/c/globals_defs_0x73.html +0 -164
- data/ref/c/globals_defs_0x75.html +0 -56
- data/ref/c/globals_func_0x66.html +0 -62
- data/ref/c/globals_func_0x67.html +0 -55
- data/ref/c/globals_func_0x69.html +0 -53
- data/ref/c/globals_func_0x70.html +0 -53
- data/ref/c/globals_func_0x72.html +0 -57
- data/ref/c/globals_func_0x73.html +0 -114
- data/ref/c/globals_func_0x76.html +0 -57
- data/ref/c/structrelay____RubyOptions____def.html +0 -73
- data/ref/c/structswig__cast__info.html +0 -98
- data/ref/c/structswig__class.html +0 -115
- data/ref/c/structswig__module__info.html +0 -132
- data/ref/c/structswig__type__info.html +0 -132
- data/ref/c/swig__vpi_8h.html +0 -8739
- data/ref/c/swig__wrap_8cin.html +0 -11556
- data/ref/c/unions__vpi__value__value.html +0 -166
- 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 -294
- data/ref/ruby/classes/OutputInfo.src/M000026.html +0 -50
- data/ref/ruby/classes/RubyVpi.src/M000036.html +0 -107
- data/ref/ruby/classes/RubyVpi.src/M000037.html +0 -20
- data/ref/ruby/classes/Template.html +0 -158
- data/ref/ruby/classes/Template.src/M000028.html +0 -18
- data/ref/ruby/classes/Vpi/Handle/Property.html +0 -130
- data/ref/ruby/classes/Vpi/Handle/Property.src/M000049.html +0 -80
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +0 -24
- data/ref/ruby/classes/Vpi/Handle.src/M000048.html +0 -68
- data/ref/ruby/classes/XX/XMLish.html +0 -138
- data/ref/ruby/classes/XX/XMLish.src/M000033.html +0 -18
- data/ref/ruby/classes/XX.html +0 -111
- 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 -38
- 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/bin/generate_test.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
1
|
# Generates Ruby-VPI tests from Verilog 2001 module declarations.
|
3
2
|
# * The standard input stream is read if no input files are specified.
|
4
3
|
# * The first input signal in a module's declaration is assumed to be the clocking signal.
|
@@ -39,12 +38,12 @@ require 'digest/md5'
|
|
39
38
|
|
40
39
|
|
41
40
|
# Notify the user about some action being performed.
|
42
|
-
def notify *args
|
41
|
+
def notify *args # :nodoc:
|
43
42
|
printf "%8s %s\n", *args
|
44
43
|
end
|
45
44
|
|
46
45
|
# Writes the given contents to the file at the given path. If the given path already exists, then a backup is created before invoking the merging tool.
|
47
|
-
def write_file aPath, aContent
|
46
|
+
def write_file aPath, aContent # :nodoc:
|
48
47
|
if File.exist? aPath
|
49
48
|
oldDigest = Digest::MD5.digest(File.read(aPath))
|
50
49
|
newDigest = Digest::MD5.digest(aContent)
|
@@ -72,7 +71,7 @@ end
|
|
72
71
|
require 'ruby-vpi/erb'
|
73
72
|
|
74
73
|
# Template used for generating output.
|
75
|
-
class Template < ERB
|
74
|
+
class Template < ERB # :nodoc:
|
76
75
|
TEMPLATE_PATH = __FILE__.sub %r{\.rb$}, '_tpl'
|
77
76
|
|
78
77
|
def initialize aName
|
@@ -83,7 +82,7 @@ end
|
|
83
82
|
|
84
83
|
|
85
84
|
# Holds information about the output destinations of a parsed Verilog module.
|
86
|
-
class OutputInfo
|
85
|
+
class OutputInfo # :nodoc:
|
87
86
|
RUBY_EXT = '.rb'
|
88
87
|
VERILOG_EXT = '.v'
|
89
88
|
RUNNER_EXT = '.rake'
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
clockSignal = aModuleInfo.ports.first.name
|
10
10
|
%>
|
11
|
-
|
11
|
+
// This file is the Verilog side of the bench.
|
12
12
|
module <%= aOutputInfo.verilogBenchName %>;
|
13
13
|
|
14
14
|
// instantiate the design under test
|
@@ -28,15 +28,8 @@ module <%= aOutputInfo.verilogBenchName %>;
|
|
28
28
|
|
29
29
|
%> <%= aOutputInfo.verilogBenchName %>_design(<%= make_inst_param_decl(aModuleInfo.ports) %>);
|
30
30
|
|
31
|
-
//
|
32
|
-
initial
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
always begin
|
37
|
-
#1 <%= clockSignal %> = 0;
|
38
|
-
#1 $ruby_relay;
|
39
|
-
#1 <%= clockSignal %> = 1;
|
40
|
-
end
|
31
|
+
// generate clock for the design under test
|
32
|
+
initial <%= clockSignal %> = 0;
|
33
|
+
always #5 <%= clockSignal %> = !<%= clockSignal %>;
|
41
34
|
|
42
35
|
endmodule
|
data/bin/header_to_ruby.rb
CHANGED