ruby-vpi 15.0.2 → 16.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/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/Rakefile
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
# = Environment variables
|
|
2
2
|
# CFLAGS:: Arguments to the compiler.
|
|
3
3
|
# LDFLAGS:: Arguments to the linker.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This file is part of Ruby-VPI.
|
|
8
|
-
|
|
9
|
-
Ruby-VPI is free software; you can redistribute it and/or
|
|
10
|
-
modify it under the terms of the GNU General Public License
|
|
11
|
-
as published by the Free Software Foundation; either version 2
|
|
12
|
-
of the License, or (at your option) any later version.
|
|
13
|
-
|
|
14
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
|
15
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
GNU General Public License for more details.
|
|
18
|
-
|
|
19
|
-
You should have received a copy of the GNU General Public License
|
|
20
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
|
21
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
22
|
-
=end
|
|
4
|
+
#--
|
|
5
|
+
# Copyright 2006-2007 Suraj N. Kurapati
|
|
6
|
+
# See the file named LICENSE for details.
|
|
23
7
|
|
|
24
8
|
CFLAGS, LDFLAGS = ENV['CFLAGS'], ENV['LDFLAGS']
|
|
25
9
|
|
|
@@ -36,245 +20,238 @@ $:.unshift PROJECT_LIBS
|
|
|
36
20
|
require 'ruby-vpi'
|
|
37
21
|
require 'ruby-vpi/rake'
|
|
38
22
|
|
|
23
|
+
task :default => :build
|
|
39
24
|
|
|
40
|
-
include RubyVpi::Config
|
|
41
|
-
PROJECT_SSH_URL = "snk@rubyforge.org:/var/www/gforge-projects/#{PROJECT_ID}"
|
|
42
|
-
|
|
43
|
-
load 'doc/history.rb'
|
|
44
|
-
head = @history.first
|
|
45
|
-
PROJECT_VERSION = head['Version']
|
|
46
|
-
PROJECT_BIRTHDAY = head['Date']
|
|
47
25
|
|
|
26
|
+
# load project information
|
|
27
|
+
include RubyVpi::Config
|
|
28
|
+
PROJECT_SSH_URL = "snk@rubyforge.org:/var/www/gforge-projects/#{PROJECT_ID}"
|
|
48
29
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
end
|
|
30
|
+
load 'doc/history.rb'
|
|
31
|
+
head = @history.first
|
|
32
|
+
PROJECT_VERSION = head['Version']
|
|
33
|
+
PROJECT_BIRTHDAY = head['Date']
|
|
54
34
|
|
|
55
|
-
# uploads the given sources to the given destination URL
|
|
56
|
-
def upload aDestUrl, *aSources
|
|
57
|
-
sh 'rsync', '-avz', '--delete', aSources, aDestUrl
|
|
58
|
-
end
|
|
59
35
|
|
|
36
|
+
# utility
|
|
60
37
|
|
|
38
|
+
# Returns a temporary, unique path ready for use. No file exists at the
|
|
39
|
+
# returned path.
|
|
40
|
+
def generate_temp_path
|
|
41
|
+
rm_f path = Tempfile.new($$).path
|
|
42
|
+
path
|
|
43
|
+
end
|
|
61
44
|
|
|
62
|
-
|
|
45
|
+
# uploads the given sources to the given destination URL
|
|
46
|
+
def upload aDestUrl, *aSources
|
|
47
|
+
sh 'rsync', '-avz', '--delete', aSources, aDestUrl
|
|
48
|
+
end
|
|
63
49
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
# propogate cleaning tasks recursively to lower levels
|
|
51
|
+
[:clean, :clobber].each do |t|
|
|
52
|
+
task t do
|
|
53
|
+
files = FileList['**/Rakefile'].exclude('_darcs')
|
|
54
|
+
files.shift # avoid infinite loop on _this_ file
|
|
68
55
|
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
# allows propogation to lower levels when gem not installed
|
|
57
|
+
ENV['RUBYLIB'] = PROJECT_LIBS
|
|
71
58
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
files.each do |f|
|
|
60
|
+
cd File.dirname(f) do
|
|
61
|
+
sh 'rake', t.to_s
|
|
62
|
+
end
|
|
75
63
|
end
|
|
76
64
|
end
|
|
77
65
|
end
|
|
78
|
-
end
|
|
79
66
|
|
|
80
67
|
|
|
68
|
+
# extension
|
|
81
69
|
|
|
82
|
-
|
|
70
|
+
desc "Builds object files for all simulators."
|
|
71
|
+
task :build
|
|
83
72
|
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
directory 'obj'
|
|
74
|
+
CLOBBER.include 'obj'
|
|
86
75
|
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
SIMULATORS.each_pair do |id, sim|
|
|
77
|
+
taskName = "build_#{id}"
|
|
89
78
|
|
|
79
|
+
desc "Builds object files for #{sim.name}."
|
|
80
|
+
task taskName => ['obj', 'ext'] do
|
|
81
|
+
src = "#{PROJECT_ID}.so"
|
|
82
|
+
dst = "#{PROJECT_ID}.#{id}.so"
|
|
90
83
|
|
|
91
|
-
|
|
92
|
-
taskName = "build_#{sim.id}"
|
|
84
|
+
dst = File.expand_path(File.join('obj', dst))
|
|
93
85
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
unless File.exist? dst
|
|
87
|
+
cd 'ext' do
|
|
88
|
+
ENV['CFLAGS'] = "#{CFLAGS} #{sim.compiler_args}"
|
|
89
|
+
ENV['LDFLAGS'] = "#{LDFLAGS} #{sim.linker_args}"
|
|
98
90
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
ENV['CFLAGS'] = "#{CFLAGS} #{sim.compiler_args}"
|
|
104
|
-
ENV['LDFLAGS'] = "#{LDFLAGS} #{sim.linker_args}"
|
|
105
|
-
|
|
106
|
-
sh 'rake'
|
|
107
|
-
mv src, dst
|
|
108
|
-
sh 'rake clean'
|
|
91
|
+
sh 'rake'
|
|
92
|
+
mv src, dst
|
|
93
|
+
sh 'rake clean'
|
|
94
|
+
end
|
|
109
95
|
end
|
|
110
96
|
end
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
task :build => taskName
|
|
114
|
-
end
|
|
115
|
-
|
|
116
97
|
|
|
117
|
-
|
|
118
|
-
## documentation
|
|
119
|
-
|
|
120
|
-
desc 'Generate user documentation.'
|
|
121
|
-
task :doc do |t|
|
|
122
|
-
cd t.name do
|
|
123
|
-
sh 'rake'
|
|
98
|
+
task :build => taskName
|
|
124
99
|
end
|
|
125
|
-
end
|
|
126
100
|
|
|
127
101
|
|
|
128
|
-
|
|
129
|
-
CLOBBER.include 'ref'
|
|
130
|
-
|
|
131
|
-
desc 'Generate reference documentation.'
|
|
132
|
-
file 'ref' => ['ref/c', 'ref/ruby']
|
|
102
|
+
# documentation
|
|
133
103
|
|
|
104
|
+
desc 'Generate user documentation.'
|
|
105
|
+
task :doc do |t|
|
|
106
|
+
cd t.name do
|
|
107
|
+
sh 'rake'
|
|
108
|
+
end
|
|
109
|
+
end
|
|
134
110
|
|
|
135
|
-
directory 'ref/ruby'
|
|
136
|
-
CLOBBER.include 'ref/ruby'
|
|
137
111
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
t.rdoc_dir = t.name
|
|
141
|
-
t.title = "#{PROJECT_NAME}: #{PROJECT_SUMMARY}"
|
|
142
|
-
t.options.concat %w(--charset utf-8 --line-numbers)
|
|
143
|
-
t.rdoc_files.include '{bin,lib/**}/*.rb'
|
|
144
|
-
end
|
|
112
|
+
directory 'ref'
|
|
113
|
+
CLOBBER.include 'ref'
|
|
145
114
|
|
|
115
|
+
desc 'Generate reference documentation.'
|
|
116
|
+
file 'ref' => ['ref/c', 'ref/ruby']
|
|
146
117
|
|
|
147
|
-
directory 'ref/c'
|
|
148
|
-
CLOBBER.include 'ref/c'
|
|
149
118
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
# doxygen outputs to this temporary destination
|
|
153
|
-
tempDest = 'ext/html'
|
|
119
|
+
directory 'ref/ruby'
|
|
120
|
+
CLOBBER.include 'ref/ruby'
|
|
154
121
|
|
|
155
|
-
|
|
156
|
-
|
|
122
|
+
desc 'Generate reference for Ruby.'
|
|
123
|
+
Rake::RDocTask.new 'ref/ruby' do |t|
|
|
124
|
+
t.rdoc_dir = t.name
|
|
125
|
+
t.title = "#{PROJECT_NAME}: #{PROJECT_SUMMARY}"
|
|
126
|
+
t.options.concat %w(--charset utf-8 --line-numbers)
|
|
127
|
+
t.rdoc_files.include '{bin,lib/**}/*.rb'
|
|
157
128
|
end
|
|
158
129
|
|
|
159
|
-
mv FileList[tempDest + '/*'].to_a, t.name
|
|
160
|
-
rmdir tempDest
|
|
161
|
-
end
|
|
162
130
|
|
|
131
|
+
directory 'ref/c'
|
|
132
|
+
CLOBBER.include 'ref/c'
|
|
163
133
|
|
|
164
|
-
desc 'Generate
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
PROJECT_DETAIL,
|
|
169
|
-
"* " + PROJECT_URL,
|
|
170
|
-
"---",
|
|
171
|
-
format_history_entry(@history.first)
|
|
172
|
-
].join "\n\n"
|
|
134
|
+
desc 'Generate reference for C.'
|
|
135
|
+
file 'ref/c' do |t|
|
|
136
|
+
# doxygen outputs to this temporary destination
|
|
137
|
+
tempDest = 'ext/html'
|
|
173
138
|
|
|
174
|
-
|
|
175
|
-
|
|
139
|
+
cd File.dirname(tempDest) do
|
|
140
|
+
sh "doxygen"
|
|
141
|
+
end
|
|
176
142
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
pipe.close_write
|
|
180
|
-
puts pipe.read
|
|
143
|
+
mv FileList[tempDest + '/*'].to_a, t.name
|
|
144
|
+
rmdir tempDest
|
|
181
145
|
end
|
|
182
|
-
end
|
|
183
|
-
|
|
184
146
|
|
|
185
147
|
|
|
186
|
-
|
|
148
|
+
# distribution
|
|
187
149
|
|
|
188
|
-
desc "Prepare for distribution."
|
|
189
|
-
task :dist => ['ext', 'ref', :doc] do |t|
|
|
190
|
-
|
|
191
|
-
|
|
150
|
+
desc "Prepare for distribution."
|
|
151
|
+
task :dist => ['ext', 'ref', :doc] do |t|
|
|
152
|
+
cd 'ext' do
|
|
153
|
+
sh 'rake swig'
|
|
154
|
+
end
|
|
192
155
|
end
|
|
193
|
-
end
|
|
194
|
-
|
|
195
156
|
|
|
196
|
-
desc 'Publish documentation to website.'
|
|
197
|
-
task :web => [:web_ref, :web_doc]
|
|
157
|
+
desc 'Publish documentation to website.'
|
|
158
|
+
task :web => [:web_ref, :web_doc]
|
|
198
159
|
|
|
199
|
-
desc "Publish reference documentation."
|
|
200
|
-
task :web_ref => 'ref' do |t|
|
|
201
|
-
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
desc "Publish user documentation."
|
|
205
|
-
task :web_doc => 'doc' do |t|
|
|
206
|
-
upload PROJECT_SSH_URL, *t.prerequisites
|
|
207
|
-
end
|
|
160
|
+
desc "Publish reference documentation."
|
|
161
|
+
task :web_ref => 'ref' do |t|
|
|
162
|
+
upload PROJECT_SSH_URL, *t.prerequisites
|
|
163
|
+
end
|
|
208
164
|
|
|
209
|
-
desc
|
|
210
|
-
task :
|
|
211
|
-
|
|
212
|
-
end
|
|
165
|
+
desc "Publish user documentation."
|
|
166
|
+
task :web_doc => 'doc' do |t|
|
|
167
|
+
upload PROJECT_SSH_URL, *t.prerequisites
|
|
168
|
+
end
|
|
213
169
|
|
|
170
|
+
desc 'Connect to website FTP.'
|
|
171
|
+
task :ftp do
|
|
172
|
+
sh 'lftp', "sftp://#{PROJECT_SSH_URL}"
|
|
173
|
+
end
|
|
214
174
|
|
|
215
|
-
desc
|
|
216
|
-
task :
|
|
217
|
-
|
|
218
|
-
end
|
|
175
|
+
desc 'Generate release announcement.'
|
|
176
|
+
task :ann => 'doc/history.rb' do |t|
|
|
177
|
+
require t.prerequisites[0]
|
|
219
178
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
s.summary = PROJECT_SUMMARY
|
|
223
|
-
s.description = PROJECT_DETAIL
|
|
224
|
-
s.homepage = PROJECT_URL
|
|
225
|
-
s.version = PROJECT_VERSION
|
|
179
|
+
$: << File.join(File.dirname(__FILE__), 'doc', 'lib')
|
|
180
|
+
require 'doc_proxy'
|
|
226
181
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
182
|
+
text = [
|
|
183
|
+
PROJECT_DETAIL,
|
|
184
|
+
"* See #{PROJECT_URL} for details.",
|
|
185
|
+
"---",
|
|
186
|
+
@history.first
|
|
187
|
+
].join "\n\n"
|
|
232
188
|
|
|
233
|
-
|
|
234
|
-
|
|
189
|
+
IO.popen('w3m -T text/html -dump -cols 60', 'w+') do |pipe|
|
|
190
|
+
pipe.write text.to_html
|
|
191
|
+
pipe.close_write
|
|
192
|
+
puts pipe.read
|
|
193
|
+
end
|
|
194
|
+
end
|
|
235
195
|
|
|
236
|
-
s.files = FileList['**/*'].exclude('_darcs')
|
|
237
|
-
s.autorequire = PROJECT_ID
|
|
238
|
-
s.extensions << 'gem_extconf.rb'
|
|
239
196
|
|
|
240
|
-
|
|
241
|
-
tools = FileList['bin/*.rb']
|
|
197
|
+
# packaging
|
|
242
198
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
199
|
+
desc "Generate release packages."
|
|
200
|
+
task :release => [:clobber, :dist] do
|
|
201
|
+
sh 'rake package'
|
|
202
|
+
end
|
|
246
203
|
|
|
247
|
-
|
|
248
|
-
|
|
204
|
+
spec = Gem::Specification.new do |s|
|
|
205
|
+
s.name = s.rubyforge_project = PROJECT_ID
|
|
206
|
+
s.summary = PROJECT_SUMMARY
|
|
207
|
+
s.description = PROJECT_DETAIL
|
|
208
|
+
s.homepage = PROJECT_URL
|
|
209
|
+
s.version = PROJECT_VERSION
|
|
210
|
+
|
|
211
|
+
s.add_dependency 'rake', '>= 0.7.0'
|
|
212
|
+
s.add_dependency 'rspec', '>= 0.7.0'
|
|
213
|
+
s.add_dependency 'rcov', '>= 0.7.0'
|
|
214
|
+
s.add_dependency 'xx' # needed by rcov
|
|
215
|
+
s.add_dependency 'ruby-debug', '>= 0.5.2'
|
|
216
|
+
|
|
217
|
+
s.requirements << "POSIX threads library"
|
|
218
|
+
s.requirements << "C language compiler"
|
|
219
|
+
|
|
220
|
+
s.files = FileList['**/*'].exclude('_darcs')
|
|
221
|
+
s.autorequire = PROJECT_ID
|
|
222
|
+
s.extensions << 'gem_extconf.rb'
|
|
223
|
+
s.executables = FileList['bin/*.rb'].map {|f| File.basename f}
|
|
224
|
+
end
|
|
249
225
|
|
|
250
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
|
251
|
-
|
|
252
|
-
end
|
|
226
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
|
227
|
+
pkg.need_tar = true
|
|
228
|
+
end
|
|
253
229
|
|
|
254
230
|
|
|
255
|
-
|
|
256
|
-
task :gem_config_inst do |t|
|
|
257
|
-
# make documentation available to gem_server
|
|
258
|
-
gemDir = File.dirname(__FILE__)
|
|
259
|
-
gemName = File.basename(gemDir)
|
|
260
|
-
docDir = File.join('..', '..', 'doc', gemName)
|
|
231
|
+
# installation
|
|
261
232
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
233
|
+
desc "Configures the gem during installation."
|
|
234
|
+
task :gem_config_inst do |t|
|
|
235
|
+
# make documentation available to gem_server
|
|
236
|
+
gemDir = File.dirname(__FILE__)
|
|
237
|
+
gemName = File.basename(gemDir)
|
|
238
|
+
docDir = File.join('..', '..', 'doc', gemName)
|
|
265
239
|
|
|
240
|
+
mkdir_p docDir
|
|
241
|
+
ln_s gemDir, File.join(docDir, 'rdoc')
|
|
242
|
+
end
|
|
266
243
|
|
|
267
244
|
|
|
268
|
-
|
|
245
|
+
# testing
|
|
269
246
|
|
|
270
|
-
desc "Ensure that examples work with $SIMULATOR"
|
|
271
|
-
task :test => :build do
|
|
272
|
-
|
|
273
|
-
|
|
247
|
+
desc "Ensure that examples work with $SIMULATOR"
|
|
248
|
+
task :test => :build do
|
|
249
|
+
# ensures that current sources are tested instead of the installed gem
|
|
250
|
+
ENV['RUBYLIB'] = PROJECT_LIBS
|
|
274
251
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
252
|
+
FileList['samp/*/'].each do |s|
|
|
253
|
+
cd s do
|
|
254
|
+
sh 'rake', ENV['SIMULATOR'] || 'cver'
|
|
255
|
+
end
|
|
278
256
|
end
|
|
279
257
|
end
|
|
280
|
-
end
|
data/bin/generate_test.rb
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
# Generates Ruby-VPI tests from Verilog 2001 module declarations.
|
|
2
|
+
#
|
|
2
3
|
# * The standard input stream is read if no input files are specified.
|
|
3
|
-
#
|
|
4
|
+
#
|
|
5
|
+
# * The first input signal in a module's declaration is assumed to be the
|
|
6
|
+
# clocking signal.
|
|
7
|
+
#
|
|
4
8
|
#
|
|
5
9
|
# = Progress indicators
|
|
10
|
+
#
|
|
6
11
|
# module:: A Verilog module has been identified.
|
|
12
|
+
#
|
|
7
13
|
# create:: A file is being created because it does not exist.
|
|
14
|
+
#
|
|
8
15
|
# skip:: A file is being skipped because it is already up to date.
|
|
9
|
-
#
|
|
16
|
+
#
|
|
17
|
+
# update:: A file will be updated because it is out of date. A text merging
|
|
18
|
+
# tool (see MERGER) will be launched to transfer content from the old
|
|
19
|
+
# file (*.old) and the new file (*.new) to the out of date file. If a
|
|
20
|
+
# text merging tool is not specified, then you will have to do the
|
|
21
|
+
# merging by hand.
|
|
22
|
+
#
|
|
10
23
|
#
|
|
11
24
|
# = Environment variables
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Ruby-VPI is free software; you can redistribute it and/or
|
|
21
|
-
modify it under the terms of the GNU General Public License
|
|
22
|
-
as published by the Free Software Foundation; either version 2
|
|
23
|
-
of the License, or (at your option) any later version.
|
|
24
|
-
|
|
25
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
|
26
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
-
GNU General Public License for more details.
|
|
29
|
-
|
|
30
|
-
You should have received a copy of the GNU General Public License
|
|
31
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
|
32
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
33
|
-
=end
|
|
25
|
+
#
|
|
26
|
+
# MERGER:: A command that invokes a text merging tool with three arguments: (1)
|
|
27
|
+
# old file, (2) new file, (3) output file. The tool's output should be
|
|
28
|
+
# written to the output file.
|
|
29
|
+
#
|
|
30
|
+
#--
|
|
31
|
+
# Copyright 2006 Suraj N. Kurapati
|
|
32
|
+
# See the file named LICENSE for details.
|
|
34
33
|
|
|
34
|
+
require 'ruby-vpi' # for project info
|
|
35
35
|
require 'ruby-vpi/verilog_parser'
|
|
36
36
|
require 'fileutils'
|
|
37
37
|
require 'digest/md5'
|
|
@@ -42,7 +42,8 @@ def notify *args # :nodoc:
|
|
|
42
42
|
printf "%8s %s\n", *args
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
# Writes the given contents to the file at the given path. If the given path
|
|
45
|
+
# Writes the given contents to the file at the given path. If the given path
|
|
46
|
+
# already exists, then a backup is created before invoking the merging tool.
|
|
46
47
|
def write_file aPath, aContent # :nodoc:
|
|
47
48
|
if File.exist? aPath
|
|
48
49
|
oldDigest = Digest::MD5.digest(File.read(aPath))
|
|
@@ -22,17 +22,11 @@ SIMULATOR_TARGET = '<%= aOutputInfo.verilogBenchName %>'
|
|
|
22
22
|
# :cver => %w[these are also separate arguments],
|
|
23
23
|
#
|
|
24
24
|
SIMULATOR_ARGUMENTS = {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
<% RubyVpi::Config::SIMULATORS.each_pair do |id, sim| %>
|
|
26
|
+
# <%= sim.name %>
|
|
27
|
+
:<%= id %> => '',
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
:ivl => '',
|
|
30
|
-
|
|
31
|
-
# Synopsys VCS
|
|
32
|
-
:vcs => '',
|
|
33
|
-
|
|
34
|
-
# Mentor Modelsim
|
|
35
|
-
:vsim => '',
|
|
29
|
+
<% end %>
|
|
36
30
|
}
|
|
37
31
|
|
|
38
32
|
# This task is invoked _before_ the simulator runs.
|
data/bin/header_to_ruby.rb
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
# Transforms Verilog header files into Ruby.
|
|
2
2
|
# * The standard input stream is read if no input files are specified.
|
|
3
3
|
# * Output is written to the standard output stream.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
This file is part of Ruby-VPI.
|
|
9
|
-
|
|
10
|
-
Ruby-VPI is free software; you can redistribute it and/or
|
|
11
|
-
modify it under the terms of the GNU General Public License
|
|
12
|
-
as published by the Free Software Foundation; either version 2
|
|
13
|
-
of the License, or (at your option) any later version.
|
|
14
|
-
|
|
15
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
|
16
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
-
GNU General Public License for more details.
|
|
19
|
-
|
|
20
|
-
You should have received a copy of the GNU General Public License
|
|
21
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
|
22
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
23
|
-
=end
|
|
4
|
+
#--
|
|
5
|
+
# Copyright 2006 Suraj N. Kurapati
|
|
6
|
+
# See the file named LICENSE for details.
|
|
24
7
|
|
|
25
8
|
if File.basename($0) == File.basename(__FILE__)
|
|
26
9
|
# parse command-line options
|
data/doc/README
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
The *.doc files in this directory are plain-text files!
|
|
2
|
+
|
|
3
|
+
To transform them into XHTML, you need the following software:
|
|
4
|
+
|
|
5
|
+
Rake: http://docs.rubyrake.org/
|
|
6
|
+
|
|
7
|
+
RedCloth: http://whytheluckystiff.net/ruby/redcloth/
|
|
8
|
+
|
|
9
|
+
Coderay: http://coderay.rubychan.de/
|
|
10
|
+
|
|
11
|
+
Once you have the above software, simply run the "rake" command.
|
data/doc/Rakefile
CHANGED
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Ruby-VPI is free software; you can redistribute it and/or
|
|
7
|
-
modify it under the terms of the GNU General Public License
|
|
8
|
-
as published by the Free Software Foundation; either version 2
|
|
9
|
-
of the License, or (at your option) any later version.
|
|
10
|
-
|
|
11
|
-
Ruby-VPI is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU General Public License
|
|
17
|
-
along with Ruby-VPI; if not, write to the Free Software Foundation,
|
|
18
|
-
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
19
|
-
=end
|
|
1
|
+
# Generates the documentation in HTML format.
|
|
2
|
+
#--
|
|
3
|
+
# Copyright 2006 Suraj N. Kurapati
|
|
4
|
+
# See the file named LICENSE for details.
|
|
20
5
|
|
|
21
6
|
require 'rake/clean'
|
|
22
7
|
|
|
@@ -43,9 +28,11 @@ FileList['*.doc'].each do |src|
|
|
|
43
28
|
|
|
44
29
|
desc "Process file #{src.inspect}."
|
|
45
30
|
file dst => [src, 'common.tpl', *deps] do |t|
|
|
31
|
+
String.reset_anchors
|
|
32
|
+
|
|
46
33
|
content = DocProxy.new.instance_eval do
|
|
47
34
|
# default output configuration
|
|
48
|
-
|
|
35
|
+
insert_toc = true
|
|
49
36
|
page_title = nil
|
|
50
37
|
|
|
51
38
|
# load the documentation's helper
|
|
@@ -56,7 +43,7 @@ FileList['*.doc'].each do |src|
|
|
|
56
43
|
# evaluate the documentation file
|
|
57
44
|
template = ERB.new(File.read(src))
|
|
58
45
|
content = template.result(binding)
|
|
59
|
-
|
|
46
|
+
toc, content = post_process(content)
|
|
60
47
|
|
|
61
48
|
# fit result into common HTML format
|
|
62
49
|
template = ERB.new(File.read(t.prerequisites[1]))
|