Commentary and internal cleanups.
This commit is contained in:
parent
591075a8ed
commit
c682f1c16a
|
@ -24,14 +24,9 @@ BEGIN {
|
|||
}
|
||||
}
|
||||
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use Getopt::Long;
|
||||
use FindBin qw($RealBin $RealScript);
|
||||
use IO::File;
|
||||
use Pod::Usage;
|
||||
use Config;
|
||||
use Cwd qw(abs_path getcwd);
|
||||
|
||||
use strict;
|
||||
use vars qw ($Debug @Opt_Verilator_Sw);
|
||||
|
@ -1291,7 +1286,7 @@ the test_c directory in the distribution for an example.
|
|||
|
||||
=head1 EXAMPLE SYSTEMC EXECUTION
|
||||
|
||||
This is an example similar to the above, but using SystemPerl.
|
||||
This is an example similar to the above, but using SystemC.
|
||||
|
||||
mkdir test_our_sc
|
||||
cd test_our_sc
|
||||
|
@ -1328,16 +1323,6 @@ Now we run Verilator on our little example.
|
|||
|
||||
verilator -Wall --sp our.v
|
||||
|
||||
Then we convert the SystemPerl output to SystemC.
|
||||
|
||||
cd obj_dir
|
||||
export SYSTEMPERL=/path/to/where/systemperl/kit/came/from
|
||||
$SYSTEMPERL/sp_preproc --preproc *.sp
|
||||
|
||||
(You can also skip the above sp_preproc by getting pure SystemC from
|
||||
Verilator by replacing the verilator --sp flag in the previous step with
|
||||
-sc.)
|
||||
|
||||
We then can compile it
|
||||
|
||||
make -j -f Vour.mk Vour__ALL.a
|
||||
|
@ -2180,8 +2165,8 @@ Specifies the module the comment appears in may be inlined into any modules
|
|||
that use this module. This is useful to speed up simulation time with some
|
||||
small loss of trace visibility and modularity. Note signals under inlined
|
||||
submodules will be named I<submodule>__DOT__I<subsignal> as C++ does not
|
||||
allow "." in signal names. SystemPerl when tracing such signals will
|
||||
replace the __DOT__ with the period.
|
||||
allow "." in signal names. When tracing such signals the tracing routines
|
||||
will replace the __DOT__ with the period.
|
||||
|
||||
=item /*verilator isolate_assignments*/
|
||||
|
||||
|
@ -3459,10 +3444,6 @@ flag.
|
|||
Note you can also call ->trace on multiple Verilated objects with the same
|
||||
trace file if you want all data to land in the same output file.
|
||||
|
||||
Note also older versions of Verilator used the SystemPerl package and
|
||||
SpTraceVcdC class. This still works, but is depreciated as it requires
|
||||
strong coupling between the Verilator and SystemPerl versions.
|
||||
|
||||
#include "verilated_vcd_c.h"
|
||||
...
|
||||
int main(int argc, char **argv, char **env) {
|
||||
|
@ -3541,7 +3522,7 @@ coverage. Both require the SystemPerl package to be installed but do not
|
|||
require use of the SystemPerl output mode.
|
||||
|
||||
First, run verilator with the --coverage option. If you're using your own
|
||||
makefile, compile the model with the GCC flag -DSP_COVERAGE (if using
|
||||
makefile, compile the model with the GCC flag -DVM_COVERAGE (if using
|
||||
Verilator's, it will do this for you.)
|
||||
|
||||
Run your tests in different directories. Each test will create a
|
||||
|
|
|
@ -354,11 +354,6 @@ string V3Error::lineStr (const char* filename, int lineno) {
|
|||
return out.str();
|
||||
}
|
||||
|
||||
void V3Error::incWarnings() {
|
||||
s_warnCount++;
|
||||
// We don't exit on a lot of warnings.
|
||||
}
|
||||
|
||||
void V3Error::incErrors() {
|
||||
s_errCount++;
|
||||
if (errorCount() == v3Global.opt.errorLimit()) { // Not >= as would otherwise recurse
|
||||
|
@ -366,12 +361,6 @@ void V3Error::incErrors() {
|
|||
}
|
||||
}
|
||||
|
||||
void V3Error::abortIfErrors() {
|
||||
if (errorCount()) {
|
||||
abortIfWarnings();
|
||||
}
|
||||
}
|
||||
|
||||
void V3Error::abortIfWarnings() {
|
||||
bool exwarn = v3Global.opt.warnFatal() && warnCount();
|
||||
if (errorCount() && exwarn) {
|
||||
|
|
|
@ -216,9 +216,9 @@ class V3Error {
|
|||
static int errorOrWarnCount() { return errorCount()+warnCount(); }
|
||||
// METHODS
|
||||
static void incErrors();
|
||||
static void incWarnings();
|
||||
static void incWarnings() { s_warnCount++; }
|
||||
static void init();
|
||||
static void abortIfErrors();
|
||||
static void abortIfErrors() { if (errorCount()) abortIfWarnings(); }
|
||||
static void abortIfWarnings();
|
||||
static void suppressThisWarning(); // Suppress next %Warn if user has it off
|
||||
static void pretendError(V3ErrorCode code, bool flag) { s_pretendError[code]=flag; }
|
||||
|
|
|
@ -9,14 +9,19 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
|
||||
$Self->{vlt} or $Self->skip("Verilator only test");
|
||||
|
||||
$Self->_run(fails=>1,
|
||||
cmd=>["perl","../bin/verilator",
|
||||
"--help"],
|
||||
logfile=>"$Self->{obj_dir}/t_help.log",
|
||||
tee=>0,
|
||||
);
|
||||
|
||||
file_grep ("$Self->{obj_dir}/t_help.log", qr/DISTRIBUTION/i);
|
||||
foreach my $prog (
|
||||
"../bin/verilator",
|
||||
"../bin/verilator_difftree",
|
||||
"../bin/verilator_profcfunc",
|
||||
) {
|
||||
$Self->_run(fails=>1,
|
||||
cmd=>["perl",$prog,
|
||||
"--help"],
|
||||
logfile=>"$Self->{obj_dir}/t_help.log",
|
||||
tee=>0,
|
||||
);
|
||||
file_grep ("$Self->{obj_dir}/t_help.log", qr/DISTRIBUTION/i);
|
||||
}
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
|
@ -26,8 +26,8 @@ SYSTEMC_TESTING ?= $(SYSTEMC)$(SYSTEMC_INCLUDE)
|
|||
|
||||
######################################################################
|
||||
ifneq ($(SYSTEMC_TESTING),)
|
||||
test_default: precopy prep preproc compile run
|
||||
test_debug: precopy prep_dbg preproc compile run
|
||||
test_default: precopy prep compile run
|
||||
test_debug: precopy prep_dbg compile run
|
||||
else
|
||||
test_default: nosc
|
||||
test_debug: nosc
|
||||
|
@ -44,9 +44,6 @@ prep:
|
|||
prep_dbg:
|
||||
$(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS)
|
||||
|
||||
preproc:
|
||||
cd obj_dir ; $(MAKE) -j 1 -f ../Makefile_obj preproc
|
||||
|
||||
compile:
|
||||
cd obj_dir ; $(MAKE) -j 3 -f ../Makefile_obj
|
||||
|
||||
|
|
Loading…
Reference in New Issue