ruby-vpi 15.0.2 → 16.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +23 -340
- data/Rakefile +169 -192
- data/bin/generate_test.rb +26 -25
- data/bin/generate_test_tpl/runner.rake +4 -10
- data/bin/header_to_ruby.rb +3 -20
- data/doc/README +11 -0
- data/doc/Rakefile +8 -21
- data/doc/common.css +44 -10
- data/doc/common.tpl +5 -10
- data/doc/history.doc +8 -7
- data/doc/history.html +228 -560
- data/doc/history.rb +7 -11
- data/doc/{history.yml → history.yaml} +325 -128
- data/doc/images/{feed-icon.png → feed-icon-28x28.png} +0 -0
- data/doc/images/ruby/LICENSE +15 -0
- data/doc/images/ruby/logo-reflection.png +0 -0
- data/doc/images/ruby/logo-reflection.xcf +0 -0
- data/doc/images/ruby/logo.png +0 -0
- data/doc/images/{LICENSE → tango/LICENSE} +0 -0
- data/doc/images/{caution.png → tango/caution.png} +0 -0
- data/doc/images/{caution.svg → tango/caution.svg} +0 -0
- data/doc/images/{home.png → tango/home.png} +0 -0
- data/doc/images/{home.svg → tango/home.svg} +0 -0
- data/doc/images/{important.png → tango/important.png} +0 -0
- data/doc/images/{important.svg → tango/important.svg} +0 -0
- data/doc/images/{next.png → tango/next.png} +0 -0
- data/doc/images/{next.svg → tango/next.svg} +0 -0
- data/doc/images/{note.png → tango/note.png} +0 -0
- data/doc/images/{note.svg → tango/note.svg} +0 -0
- data/doc/images/{prev.png → tango/prev.png} +0 -0
- data/doc/images/{prev.svg → tango/prev.svg} +0 -0
- data/doc/images/{tip.png → tango/tip.png} +0 -0
- data/doc/images/{tip.svg → tango/tip.svg} +0 -0
- data/doc/images/{up.png → tango/up.png} +0 -0
- data/doc/images/{up.svg → tango/up.svg} +0 -0
- data/doc/images/{warning.png → tango/warning.png} +0 -0
- data/doc/images/{warning.svg → tango/warning.svg} +0 -0
- data/doc/intro.inc +105 -36
- data/doc/lib/doc_format.rb +151 -29
- data/doc/lib/doc_proxy.rb +28 -69
- data/doc/lib/erb_content.rb +10 -22
- data/doc/lib/erb_proxy.rb +13 -24
- data/doc/manual.doc +16 -60
- data/doc/manual.html +257 -340
- data/doc/memo.doc +2 -0
- data/doc/memo.html +11 -11
- data/doc/readme.doc +36 -2
- data/doc/readme.html +214 -51
- data/doc/rss.erb +3 -3
- data/doc/rss.xml +217 -269
- data/ext/Rakefile +7 -22
- data/ext/common.h +10 -21
- data/ext/extconf.rb +5 -0
- data/ext/main.c +2 -18
- data/ext/main.h +1 -16
- data/ext/relay.c +3 -17
- data/ext/relay.h +3 -17
- data/ext/verilog.h +6 -18
- data/ext/vlog.c +3 -21
- data/ext/vlog.h +3 -17
- data/lib/ruby-vpi/erb.rb +7 -20
- data/lib/ruby-vpi/float.rb +6 -20
- data/lib/ruby-vpi/integer.rb +27 -47
- data/lib/ruby-vpi/rake.rb +4 -19
- data/lib/ruby-vpi/rcov.rb +6 -21
- data/lib/ruby-vpi/rdoc.rb +3 -21
- data/lib/ruby-vpi/runner.rb +28 -29
- data/lib/ruby-vpi/runner_proxy.rb +5 -21
- data/lib/ruby-vpi/verilog_parser.rb +5 -20
- data/lib/ruby-vpi/vpi.rb +420 -376
- data/lib/ruby-vpi.rb +26 -32
- 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 +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 +1 -1
- 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 +1 -1
- 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/main_8c.html +1 -1
- data/ref/c/main_8h.html +1 -1
- data/ref/c/relay_8c.html +1 -1
- data/ref/c/relay_8h.html +1 -1
- 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 +1 -1
- data/ref/c/vlog_8c.html +1 -1
- data/ref/c/vlog_8h.html +1 -1
- data/ref/c/vpi__user_8h.html +1 -1
- data/ref/ruby/classes/ERB.html +5 -5
- data/ref/ruby/classes/ERB.src/{M000026.html → M000024.html} +15 -15
- data/ref/ruby/classes/FileUtils.html +10 -10
- data/ref/ruby/classes/FileUtils.src/{M000027.html → M000025.html} +4 -4
- data/ref/ruby/classes/FileUtils.src/{M000028.html → M000026.html} +4 -4
- data/ref/ruby/classes/Float.html +5 -5
- data/ref/ruby/classes/Float.src/{M000022.html → M000020.html} +5 -5
- data/ref/ruby/classes/Integer.html +20 -56
- data/ref/ruby/classes/Integer.src/M000008.html +11 -11
- data/ref/ruby/classes/Integer.src/M000009.html +4 -4
- data/ref/ruby/classes/Integer.src/M000010.html +4 -4
- data/ref/ruby/classes/Integer.src/M000011.html +4 -4
- data/ref/ruby/classes/Integer.src/M000012.html +4 -4
- data/ref/ruby/classes/Integer.src/M000013.html +4 -4
- data/ref/ruby/classes/Integer.src/M000016.html +12 -9
- data/ref/ruby/classes/Integer.src/M000017.html +18 -9
- data/ref/ruby/classes/Integer.src/M000018.html +12 -12
- data/ref/ruby/classes/Integer.src/M000019.html +17 -18
- data/ref/ruby/classes/RDoc.src/M000053.html +25 -25
- data/ref/ruby/classes/RubyVpi/Config.html +3 -3
- data/ref/ruby/classes/RubyVpi.html +11 -5
- data/ref/ruby/classes/RubyVpi.src/{M000029.html → M000027.html} +103 -101
- data/ref/ruby/classes/String.html +21 -15
- data/ref/ruby/classes/String.src/M000021.html +36 -0
- data/ref/ruby/classes/String.src/{M000024.html → M000022.html} +24 -24
- data/ref/ruby/classes/String.src/M000023.html +5 -23
- data/ref/ruby/classes/VerilogParser/Module/Parameter.src/M000007.html +5 -5
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000003.html +7 -7
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000004.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000005.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module/Port.src/M000006.html +4 -4
- data/ref/ruby/classes/VerilogParser/Module.src/M000002.html +20 -20
- data/ref/ruby/classes/VerilogParser.html +6 -0
- data/ref/ruby/classes/VerilogParser.src/M000001.html +20 -20
- data/ref/ruby/classes/Vpi/Handle.html +89 -88
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +18 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +8 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +8 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +7 -6
- data/ref/ruby/classes/Vpi/Handle.src/M000043.html +31 -9
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +74 -31
- data/ref/ruby/classes/Vpi/Handle.src/M000045.html +17 -74
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +11 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000048.html +31 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000049.html +53 -52
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000050.html +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000051.html +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.html +15 -15
- data/ref/ruby/classes/Vpi/S_vpi_value.src/{M000036.html → M000033.html} +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +5 -5
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000035.html +5 -5
- data/ref/ruby/classes/Vpi.html +48 -19
- data/ref/ruby/classes/Vpi.src/M000028.html +28 -0
- data/ref/ruby/classes/Vpi.src/M000029.html +18 -0
- data/ref/ruby/classes/Vpi.src/M000030.html +25 -15
- data/ref/ruby/classes/Vpi.src/M000031.html +9 -5
- data/ref/ruby/classes/Vpi.src/M000032.html +9 -25
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/generate_test_rb.html +2 -1
- data/ref/ruby/files/bin/header_to_ruby_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +7 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_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 +1 -1
- 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 +7 -1
- data/ref/ruby/fr_method_index.html +34 -34
- data/samp/counter/counter_rspec_runner.rake +4 -0
- data/samp/counter/counter_xunit_runner.rake +4 -0
- data/samp/pipelined_alu/Hw5UnitModel.rb +3 -19
- data/samp/pipelined_alu/README +38 -13
- data/samp/pipelined_alu/TestHw5UnitModel.rb +9 -20
- data/samp/pipelined_alu/hw5_unit.v +1 -16
- data/samp/pipelined_alu/hw5_unit_test_runner.rake +4 -0
- data/samp/pipelined_alu/hw5_unit_test_spec.rb +3 -20
- data/samp/pipelined_alu/int_gen.rb +6 -20
- metadata +47 -43
- data/doc/LICENSE +0 -397
- data/doc/images/feed-icon.LICENSE +0 -2
- data/doc/images/feed-icon.svg +0 -18
- data/ref/ruby/classes/Integer.src/M000020.html +0 -25
- data/ref/ruby/classes/Integer.src/M000021.html +0 -30
- data/ref/ruby/classes/String.src/M000025.html +0 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000047.html +0 -24
- data/ref/ruby/classes/Vpi.src/M000033.html +0 -22
data/lib/ruby-vpi/runner.rb
CHANGED
@@ -1,29 +1,19 @@
|
|
1
|
-
# A template to simplify building and running examples. This file is meant to be
|
1
|
+
# A template to simplify building and running examples. This file is meant to be
|
2
|
+
# embedded in another Rakefile, which bears the responsibility of defining the
|
3
|
+
# following variables.
|
2
4
|
#
|
3
5
|
# = Required variables
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
as published by the Free Software Foundation; either version 2
|
16
|
-
of the License, or (at your option) any later version.
|
17
|
-
|
18
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
19
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
-
GNU General Public License for more details.
|
22
|
-
|
23
|
-
You should have received a copy of the GNU General Public License
|
24
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
25
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26
|
-
=end
|
6
|
+
#
|
7
|
+
# SIMULATOR_SOURCES:: Array of paths to source files needed by the simulator.
|
8
|
+
#
|
9
|
+
# SIMULATOR_TARGET:: Name of the Verilog module to be simulated.
|
10
|
+
#
|
11
|
+
# SIMULATOR_ARGUMENTS:: A hash containing keys for each simulator task (same as
|
12
|
+
# Rakefile task names) and values containing command-line
|
13
|
+
# arguments for each simulator.
|
14
|
+
#--
|
15
|
+
# Copyright 2006-2007 Suraj N. Kurapati
|
16
|
+
# See the file named LICENSE for details.
|
27
17
|
|
28
18
|
# check for required variables
|
29
19
|
raise ArgumentError, "All required variables must be defined." unless
|
@@ -52,7 +42,7 @@
|
|
52
42
|
end
|
53
43
|
|
54
44
|
# prepare hook for rb_load_file() in main.c
|
55
|
-
ENV['
|
45
|
+
ENV['RUBYVPI_BOOTSTRAP'] = SIMULATOR_TARGET + '.rb'
|
56
46
|
|
57
47
|
|
58
48
|
require 'rake/clean'
|
@@ -97,7 +87,7 @@ task :default do
|
|
97
87
|
end
|
98
88
|
|
99
89
|
|
100
|
-
desc "Simulate with
|
90
|
+
desc "Simulate with #{SIMULATORS[:cver].name}."
|
101
91
|
task :cver => :setup do
|
102
92
|
sh 'cver', SIMULATOR_ARGUMENTS[:cver], "+loadvpi=#{object_file_path(:cver)}:#{BOOTSTAP_FUNC}", expand_include_dir_options(:cver), SIMULATOR_SOURCES
|
103
93
|
end
|
@@ -105,7 +95,7 @@ end
|
|
105
95
|
CLOBBER.include 'verilog.log'
|
106
96
|
|
107
97
|
|
108
|
-
desc "Simulate with
|
98
|
+
desc "Simulate with #{SIMULATORS[:ivl].name}."
|
109
99
|
task :ivl => :setup do
|
110
100
|
cp object_file_path(:ivl), 'ruby-vpi.vpi'
|
111
101
|
sh 'iverilog', SIMULATOR_ARGUMENTS[:ivl], '-mruby-vpi', expand_include_dir_options(:ivl), SIMULATOR_SOURCES
|
@@ -115,7 +105,7 @@ end
|
|
115
105
|
CLEAN.include 'ruby-vpi.vpi', 'a.out'
|
116
106
|
|
117
107
|
|
118
|
-
desc "Simulate with
|
108
|
+
desc "Simulate with #{SIMULATORS[:vcs].name}."
|
119
109
|
task :vcs => :setup do
|
120
110
|
sh %w(vcs -R +v2k +vpi), SIMULATOR_ARGUMENTS[:vcs], '-load', "#{object_file_path(:vcs)}:#{BOOTSTAP_FUNC}", expand_include_dir_options(:vcs), SIMULATOR_SOURCES
|
121
111
|
end
|
@@ -123,7 +113,7 @@ end
|
|
123
113
|
CLEAN.include 'csrc', 'simv*'
|
124
114
|
|
125
115
|
|
126
|
-
desc "Simulate with
|
116
|
+
desc "Simulate with #{SIMULATORS[:vsim].name}."
|
127
117
|
task :vsim => :setup do
|
128
118
|
sh 'vlib work'
|
129
119
|
sh 'vlog', expand_include_dir_options(:vsim), SIMULATOR_SOURCES
|
@@ -132,3 +122,12 @@ end
|
|
132
122
|
|
133
123
|
CLEAN.include 'work'
|
134
124
|
CLOBBER.include 'transcript'
|
125
|
+
|
126
|
+
|
127
|
+
desc "Simulate with #{SIMULATORS[:ncsim].name}."
|
128
|
+
task :ncsim => :setup do
|
129
|
+
sh 'ncverilog', SIMULATOR_ARGUMENTS[:ncsim], "+loadvpi=#{object_file_path(:ncsim)}:#{BOOTSTAP_FUNC}", '+access+rwc', expand_include_dir_options(:ncsim), SIMULATOR_SOURCES
|
130
|
+
end
|
131
|
+
|
132
|
+
CLEAN.include 'INCA_libs'
|
133
|
+
CLOBBER.include 'ncverilog.log', 'ncsim.log'
|
@@ -1,24 +1,8 @@
|
|
1
|
-
# A template to simplify running multiple tests for an examples. This file is
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
This file is part of Ruby-VPI.
|
7
|
-
|
8
|
-
Ruby-VPI is free software; you can redistribute it and/or
|
9
|
-
modify it under the terms of the GNU General Public License
|
10
|
-
as published by the Free Software Foundation; either version 2
|
11
|
-
of the License, or (at your option) any later version.
|
12
|
-
|
13
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
14
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
GNU General Public License for more details.
|
17
|
-
|
18
|
-
You should have received a copy of the GNU General Public License
|
19
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
20
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
21
|
-
=end
|
1
|
+
# A template to simplify running multiple tests for an examples. This file is
|
2
|
+
# meant to be embedded in another Rakefile.
|
3
|
+
#--
|
4
|
+
# Copyright 2006-2007 Suraj N. Kurapati
|
5
|
+
# See the file named LICENSE for details.
|
22
6
|
|
23
7
|
# supress errors about nonexistent tasks
|
24
8
|
task :default
|
@@ -1,23 +1,7 @@
|
|
1
1
|
# A library for parsing Verilog source code.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
This file is part of Ruby-VPI.
|
6
|
-
|
7
|
-
Ruby-VPI is free software; you can redistribute it and/or
|
8
|
-
modify it under the terms of the GNU General Public License
|
9
|
-
as published by the Free Software Foundation; either version 2
|
10
|
-
of the License, or (at your option) any later version.
|
11
|
-
|
12
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
13
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
GNU General Public License for more details.
|
16
|
-
|
17
|
-
You should have received a copy of the GNU General Public License
|
18
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
19
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
20
|
-
=end
|
2
|
+
#--
|
3
|
+
# Copyright 2006-2007 Suraj N. Kurapati
|
4
|
+
# See the file named LICENSE for details.
|
21
5
|
|
22
6
|
class VerilogParser
|
23
7
|
attr_reader :modules, :constants, :includes
|
@@ -104,7 +88,8 @@ class VerilogParser
|
|
104
88
|
end
|
105
89
|
|
106
90
|
class String
|
107
|
-
# Converts this string containing Verilog code into syntactically correct Ruby
|
91
|
+
# Converts this string containing Verilog code into syntactically correct Ruby
|
92
|
+
# code.
|
108
93
|
def verilog_to_ruby
|
109
94
|
content = self.dup
|
110
95
|
|