ruby-vpi 17.0.0 → 18.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +8 -6
- data/Rakefile +4 -4
- data/doc/common.css +6 -9
- data/doc/common.inc +3 -3
- data/doc/common.tpl +14 -6
- data/doc/history.html +152 -44
- data/doc/history.inc +55 -3
- data/doc/history.yaml +62 -2
- data/doc/intro.inc +20 -16
- data/doc/manual.doc +23 -9
- data/doc/manual.html +232 -200
- data/doc/memo.doc +7 -6
- data/doc/memo.html +28 -17
- data/doc/readme.doc +1 -1
- data/doc/readme.html +51 -35
- data/doc/rss.xml +96 -70
- data/ext/Rakefile +24 -11
- data/ext/swig_vpi.h +1 -1
- data/ext/swig_wrap.cin +17 -42
- data/lib/ruby-vpi/pli.tab +1 -0
- data/lib/ruby-vpi/runner.rb +34 -10
- data/lib/ruby-vpi/vpi.rb +483 -438
- 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/RDoc.html +5 -5
- data/ref/ruby/classes/RDoc.src/{M000058.html → M000061.html} +0 -0
- data/ref/ruby/classes/String.html +24 -24
- data/ref/ruby/classes/String.src/M000022.html +23 -5
- data/ref/ruby/classes/String.src/M000023.html +28 -5
- data/ref/ruby/classes/String.src/M000024.html +5 -23
- data/ref/ruby/classes/String.src/M000025.html +5 -28
- data/ref/ruby/classes/Vpi/Handle.html +94 -49
- data/ref/ruby/classes/Vpi/Handle.src/M000035.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000036.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000037.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000038.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000039.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000040.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000041.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000042.html +4 -4
- data/ref/ruby/classes/Vpi/Handle.src/M000043.html +7 -7
- data/ref/ruby/classes/Vpi/Handle.src/M000044.html +7 -7
- data/ref/ruby/classes/Vpi/Handle.src/M000045.html +8 -8
- data/ref/ruby/classes/Vpi/Handle.src/M000046.html +36 -30
- data/ref/ruby/classes/Vpi/Handle.src/M000047.html +72 -67
- data/ref/ruby/classes/Vpi/Handle.src/M000048.html +6 -17
- data/ref/ruby/classes/Vpi/Handle.src/M000049.html +19 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000050.html +5 -5
- data/ref/ruby/classes/Vpi/Handle.src/M000051.html +16 -10
- data/ref/ruby/classes/Vpi/Handle.src/M000053.html +5 -18
- data/ref/ruby/classes/Vpi/Handle.src/M000054.html +11 -76
- data/ref/ruby/classes/Vpi/Handle.src/M000056.html +31 -0
- data/ref/ruby/classes/Vpi/Handle.src/M000057.html +40 -0
- data/ref/ruby/classes/Vpi/S_vpi_time.html +16 -16
- data/ref/ruby/classes/Vpi/S_vpi_time.src/{M000055.html → M000058.html} +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000059.html +19 -0
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000032.html +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000033.html +4 -4
- data/ref/ruby/classes/Vpi/S_vpi_value.src/M000034.html +4 -4
- data/ref/ruby/classes/Vpi.html +0 -7
- data/ref/ruby/classes/Vpi.src/M000029.html +14 -14
- data/ref/ruby/classes/Vpi.src/M000030.html +25 -24
- data/ref/ruby/classes/Vpi.src/M000031.html +6 -6
- data/ref/ruby/created.rid +1 -1
- data/ref/ruby/files/bin/convert_rb.html +1 -1
- data/ref/ruby/files/bin/generate_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/erb_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/float_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/integer_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rake_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rcov_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/rdoc_rb.html +1 -1
- data/ref/ruby/files/lib/ruby-vpi/runner_boot_loader_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/util_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 +8 -1
- data/ref/ruby/files/lib/ruby-vpi_rb.html +1 -1
- data/ref/ruby/fr_method_index.html +19 -16
- data/samp/register_file/register_file.v +1 -1
- data/samp/register_file/register_file_spec.rb +9 -5
- metadata +42 -38
- data/ref/ruby/classes/Vpi/S_vpi_time.src/M000056.html +0 -19
data/ext/swig_wrap.cin
CHANGED
@@ -1529,24 +1529,23 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1529
1529
|
#define SWIGTYPE_p_f_p_struct_t_cb_data__int swig_types[2]
|
1530
1530
|
#define SWIGTYPE_p_int swig_types[3]
|
1531
1531
|
#define SWIGTYPE_p_p_char swig_types[4]
|
1532
|
-
#define
|
1533
|
-
#define
|
1534
|
-
#define
|
1535
|
-
#define
|
1536
|
-
#define
|
1537
|
-
#define
|
1538
|
-
#define
|
1539
|
-
#define
|
1540
|
-
#define
|
1541
|
-
#define
|
1542
|
-
#define
|
1543
|
-
#define
|
1544
|
-
#define
|
1545
|
-
#define
|
1546
|
-
#define
|
1547
|
-
|
1548
|
-
static
|
1549
|
-
static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0};
|
1532
|
+
#define SWIGTYPE_p_s_vpi_value_value swig_types[5]
|
1533
|
+
#define SWIGTYPE_p_short swig_types[6]
|
1534
|
+
#define SWIGTYPE_p_t_cb_data swig_types[7]
|
1535
|
+
#define SWIGTYPE_p_t_vpi_delay swig_types[8]
|
1536
|
+
#define SWIGTYPE_p_t_vpi_error_info swig_types[9]
|
1537
|
+
#define SWIGTYPE_p_t_vpi_strengthval swig_types[10]
|
1538
|
+
#define SWIGTYPE_p_t_vpi_systf_data swig_types[11]
|
1539
|
+
#define SWIGTYPE_p_t_vpi_time swig_types[12]
|
1540
|
+
#define SWIGTYPE_p_t_vpi_value swig_types[13]
|
1541
|
+
#define SWIGTYPE_p_t_vpi_vecval swig_types[14]
|
1542
|
+
#define SWIGTYPE_p_t_vpi_vlog_info swig_types[15]
|
1543
|
+
#define SWIGTYPE_p_unsigned_char swig_types[16]
|
1544
|
+
#define SWIGTYPE_p_unsigned_int swig_types[17]
|
1545
|
+
#define SWIGTYPE_p_unsigned_short swig_types[18]
|
1546
|
+
#define SWIGTYPE_p_void swig_types[19]
|
1547
|
+
static swig_type_info *swig_types[21];
|
1548
|
+
static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0};
|
1550
1549
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1551
1550
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1552
1551
|
|
@@ -6086,24 +6085,6 @@ fail:
|
|
6086
6085
|
}
|
6087
6086
|
|
6088
6087
|
|
6089
|
-
SWIGINTERN VALUE
|
6090
|
-
vlog_startup_routines_get(VALUE self) {
|
6091
|
-
VALUE _val;
|
6092
|
-
|
6093
|
-
_val = SWIG_NewPointerObj(SWIG_as_voidptr(vlog_startup_routines), SWIGTYPE_p_p_f___void, 0 );
|
6094
|
-
return _val;
|
6095
|
-
}
|
6096
|
-
|
6097
|
-
|
6098
|
-
SWIGINTERN VALUE
|
6099
|
-
vlog_startup_routines_set(VALUE self, VALUE _val) {
|
6100
|
-
SWIG_exception_fail(SWIG_ArgError(SWIG_AttributeError), "in variable '""read-only vlog_startup_routines""' of type '""void (*[])()""'");
|
6101
|
-
return _val;
|
6102
|
-
fail:
|
6103
|
-
return Qnil;
|
6104
|
-
}
|
6105
|
-
|
6106
|
-
|
6107
6088
|
|
6108
6089
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
6109
6090
|
|
@@ -6112,7 +6093,6 @@ static swig_type_info _swigt__p_f_p_char__int = {"_p_f_p_char__int", "int (*)(ch
|
|
6112
6093
|
static swig_type_info _swigt__p_f_p_struct_t_cb_data__int = {"_p_f_p_struct_t_cb_data__int", "int (*)(struct t_cb_data *)|PLI_INT32 (*)(struct t_cb_data *)", 0, 0, (void*)0, 0};
|
6113
6094
|
static swig_type_info _swigt__p_int = {"_p_int", "int *|PLI_INT32 *", 0, 0, (void*)0, 0};
|
6114
6095
|
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **|PLI_BYTE8 **", 0, 0, (void*)0, 0};
|
6115
|
-
static swig_type_info _swigt__p_p_f___void = {"_p_p_f___void", "void (**)()", 0, 0, (void*)0, 0};
|
6116
6096
|
static swig_type_info _swigt__p_s_vpi_value_value = {"_p_s_vpi_value_value", "s_vpi_value_value *", 0, 0, (void*)0, 0};
|
6117
6097
|
static swig_type_info _swigt__p_short = {"_p_short", "short *|PLI_INT16 *", 0, 0, (void*)0, 0};
|
6118
6098
|
static swig_type_info _swigt__p_t_cb_data = {"_p_t_cb_data", "struct t_cb_data *|p_cb_data", 0, 0, (void*)0, 0};
|
@@ -6135,7 +6115,6 @@ static swig_type_info *swig_type_initial[] = {
|
|
6135
6115
|
&_swigt__p_f_p_struct_t_cb_data__int,
|
6136
6116
|
&_swigt__p_int,
|
6137
6117
|
&_swigt__p_p_char,
|
6138
|
-
&_swigt__p_p_f___void,
|
6139
6118
|
&_swigt__p_s_vpi_value_value,
|
6140
6119
|
&_swigt__p_short,
|
6141
6120
|
&_swigt__p_t_cb_data,
|
@@ -6158,7 +6137,6 @@ static swig_cast_info _swigc__p_f_p_char__int[] = { {&_swigt__p_f_p_char__int,
|
|
6158
6137
|
static swig_cast_info _swigc__p_f_p_struct_t_cb_data__int[] = { {&_swigt__p_f_p_struct_t_cb_data__int, 0, 0, 0},{0, 0, 0, 0}};
|
6159
6138
|
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
|
6160
6139
|
static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
|
6161
|
-
static swig_cast_info _swigc__p_p_f___void[] = { {&_swigt__p_p_f___void, 0, 0, 0},{0, 0, 0, 0}};
|
6162
6140
|
static swig_cast_info _swigc__p_s_vpi_value_value[] = { {&_swigt__p_s_vpi_value_value, 0, 0, 0},{0, 0, 0, 0}};
|
6163
6141
|
static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
|
6164
6142
|
static swig_cast_info _swigc__p_t_cb_data[] = { {&_swigt__p_t_cb_data, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -6181,7 +6159,6 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
6181
6159
|
_swigc__p_f_p_struct_t_cb_data__int,
|
6182
6160
|
_swigc__p_int,
|
6183
6161
|
_swigc__p_p_char,
|
6184
|
-
_swigc__p_p_f___void,
|
6185
6162
|
_swigc__p_s_vpi_value_value,
|
6186
6163
|
_swigc__p_short,
|
6187
6164
|
_swigc__p_t_cb_data,
|
@@ -7101,8 +7078,6 @@ SWIGEXPORT void Init_vpi(void) {
|
|
7101
7078
|
rb_define_module_function(mVpi, "vpi_mcd_flush", _wrap_vpi_mcd_flush, -1);
|
7102
7079
|
rb_define_module_function(mVpi, "vpi_control", _wrap_vpi_control, -1);
|
7103
7080
|
rb_define_module_function(mVpi, "vpi_handle_by_multi_index", _wrap_vpi_handle_by_multi_index, -1);
|
7104
|
-
rb_define_singleton_method(mVpi, "vlog_startup_routines", vlog_startup_routines_get, 0);
|
7105
|
-
rb_define_singleton_method(mVpi, "vlog_startup_routines=", vlog_startup_routines_set, 1);
|
7106
7081
|
rb_define_const(mVpi, "Vlog_relay_ruby", SWIG_NewFunctionPtrObj((void *)vlog_relay_ruby, SWIGTYPE_p_f_p_struct_t_cb_data__int));
|
7107
7082
|
}
|
7108
7083
|
|
@@ -0,0 +1 @@
|
|
1
|
+
acc=read_write,write_net,force:*
|
data/lib/ruby-vpi/runner.rb
CHANGED
@@ -26,7 +26,7 @@ require 'ruby-vpi/util'
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# auto-detect and set default parameters
|
29
|
-
runnerPath = caller.
|
29
|
+
runnerPath = caller.grep(/runner.rake/).first.rstrip_from(':')
|
30
30
|
@target = File.basename(runnerPath).rstrip_from('_')
|
31
31
|
|
32
32
|
task :setup
|
@@ -55,6 +55,9 @@ require 'ruby-vpi/util'
|
|
55
55
|
ENV['RUBYVPI_BOOT_LOADER'] = File.join(File.dirname(__FILE__), 'runner_boot_loader.rb')
|
56
56
|
ENV['RUBYVPI_BOOT_TARGET'] = @target
|
57
57
|
|
58
|
+
# check if the machine is 64-bit
|
59
|
+
@archIs64 = -1.size == 8
|
60
|
+
|
58
61
|
|
59
62
|
require 'rake/clean'
|
60
63
|
require 'ruby-vpi'
|
@@ -66,7 +69,7 @@ LOADER_FUNC = 'vlog_startup_routines_bootstrap'
|
|
66
69
|
|
67
70
|
# Returns the path to the Ruby-VPI object file for the given simulator.
|
68
71
|
def object_file_path aSimId # :nodoc:
|
69
|
-
path = File.join(OBJECT_PATH, aSimId.
|
72
|
+
path = File.expand_path File.join(OBJECT_PATH, "#{aSimId}.so")
|
70
73
|
|
71
74
|
unless File.exist? path
|
72
75
|
raise "Object file #{path.inspect} is missing. Rebuild Ruby-VPI."
|
@@ -76,7 +79,7 @@ def object_file_path aSimId # :nodoc:
|
|
76
79
|
end
|
77
80
|
|
78
81
|
# Returns an array of include-directory options.
|
79
|
-
def
|
82
|
+
def expand_incdir_options aSimId # :nodoc:
|
80
83
|
prefix = aSimId == :ivl ? '-I' : '+incdir+'
|
81
84
|
@incdirs.map {|i| prefix + i}
|
82
85
|
end
|
@@ -91,7 +94,11 @@ end
|
|
91
94
|
|
92
95
|
desc "Simulate with #{RubyVPI::SIMULATORS[:cver].name}."
|
93
96
|
task :cver => :setup do
|
94
|
-
sh 'cver',
|
97
|
+
sh 'cver',
|
98
|
+
"+loadvpi=#{object_file_path(:cver)}:#{LOADER_FUNC}",
|
99
|
+
SIMULATOR_ARGUMENTS[:cver],
|
100
|
+
expand_incdir_options(:cver),
|
101
|
+
@sources
|
95
102
|
end
|
96
103
|
|
97
104
|
CLOBBER.include 'verilog.log'
|
@@ -100,7 +107,10 @@ CLOBBER.include 'verilog.log'
|
|
100
107
|
desc "Simulate with #{RubyVPI::SIMULATORS[:ivl].name}."
|
101
108
|
task :ivl => :setup do
|
102
109
|
cp object_file_path(:ivl), 'ruby-vpi.vpi'
|
103
|
-
sh
|
110
|
+
sh %w[iverilog -mruby-vpi],
|
111
|
+
SIMULATOR_ARGUMENTS[:ivl],
|
112
|
+
expand_incdir_options(:ivl),
|
113
|
+
@sources
|
104
114
|
sh 'vvp -M. a.out'
|
105
115
|
end
|
106
116
|
|
@@ -109,7 +119,13 @@ CLEAN.include 'ruby-vpi.vpi', 'a.out'
|
|
109
119
|
|
110
120
|
desc "Simulate with #{RubyVPI::SIMULATORS[:vcs].name}."
|
111
121
|
task :vcs => :setup do
|
112
|
-
sh %w
|
122
|
+
sh %w[vcs -R +v2k +vpi +cli],
|
123
|
+
'-P', File.join(File.dirname(__FILE__), 'pli.tab'),
|
124
|
+
'-load', "#{object_file_path(:vcs)}:#{LOADER_FUNC}",
|
125
|
+
('-full64' if @archIs64),
|
126
|
+
SIMULATOR_ARGUMENTS[:vcs],
|
127
|
+
expand_incdir_options(:vcs),
|
128
|
+
@sources
|
113
129
|
end
|
114
130
|
|
115
131
|
CLEAN.include 'csrc', 'simv*'
|
@@ -118,17 +134,25 @@ CLEAN.include 'csrc', 'simv*'
|
|
118
134
|
desc "Simulate with #{RubyVPI::SIMULATORS[:vsim].name}."
|
119
135
|
task :vsim => :setup do
|
120
136
|
sh 'vlib work'
|
121
|
-
sh 'vlog',
|
122
|
-
sh
|
137
|
+
sh 'vlog', expand_incdir_options(:vsim), @sources
|
138
|
+
sh %w[vsim -do run\ -all],
|
139
|
+
'-pli', object_file_path(:vsim),
|
140
|
+
'-c', @target,
|
141
|
+
SIMULATOR_ARGUMENTS[:vsim]
|
123
142
|
end
|
124
143
|
|
125
|
-
CLEAN.include 'work'
|
144
|
+
CLEAN.include 'work', 'vsim.wlf'
|
126
145
|
CLOBBER.include 'transcript'
|
127
146
|
|
128
147
|
|
129
148
|
desc "Simulate with #{RubyVPI::SIMULATORS[:ncsim].name}."
|
130
149
|
task :ncsim => :setup do
|
131
|
-
sh
|
150
|
+
sh %w[ncverilog +access+rwc +plinowarn],
|
151
|
+
"+loadvpi=#{object_file_path(:ncsim)}:#{LOADER_FUNC}",
|
152
|
+
('+nc64bit' if @archIs64),
|
153
|
+
SIMULATOR_ARGUMENTS[:ncsim],
|
154
|
+
expand_incdir_options(:ncsim),
|
155
|
+
@sources
|
132
156
|
end
|
133
157
|
|
134
158
|
CLEAN.include 'INCA_libs'
|