Internals: Fix spacing of comments. No functional change.

This commit is contained in:
Wilson Snyder 2018-11-28 19:59:10 -05:00
parent 61e4b0a472
commit 8170391573
32 changed files with 499 additions and 493 deletions

View File

@ -30,7 +30,7 @@ use IO::File;
use Pod::Usage; use Pod::Usage;
use strict; use strict;
use vars qw ($Debug @Opt_Verilator_Sw); use vars qw($Debug @Opt_Verilator_Sw);
####################################################################### #######################################################################
####################################################################### #######################################################################
@ -57,7 +57,7 @@ foreach my $sw (@ARGV) {
push @Opt_Verilator_Sw, $sw; push @Opt_Verilator_Sw, $sw;
} }
Getopt::Long::config ("no_auto_abbrev","pass_through"); Getopt::Long::config("no_auto_abbrev","pass_through");
if (! GetOptions ( if (! GetOptions (
# Major operating modes # Major operating modes
"help" => \&usage, "help" => \&usage,
@ -108,7 +108,7 @@ if ($opt_gdb) {
." -ex 'bt'"); ." -ex 'bt'");
} else { } else {
# Normal, non gdb # Normal, non gdb
run (verilator_bin()." ".join(' ',@quoted_sw)); run(verilator_bin()." ".join(' ',@quoted_sw));
} }
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@ -4152,12 +4152,12 @@ trace file if you want all data to land in the same output file.
... ...
Verilated::traceEverOn(true); Verilated::traceEverOn(true);
VerilatedVcdC* tfp = new VerilatedVcdC; VerilatedVcdC* tfp = new VerilatedVcdC;
topp->trace (tfp, 99); topp->trace(tfp, 99);
tfp->open ("obj_dir/t_trace_ena_cc/simx.vcd"); tfp->open("obj_dir/t_trace_ena_cc/simx.vcd");
... ...
while (sc_time_stamp() < sim_time && !Verilated::gotFinish()) { while (sc_time_stamp() < sim_time && !Verilated::gotFinish()) {
main_time += #; main_time += #;
tfp->dump (main_time); tfp->dump(main_time);
} }
tfp->close(); tfp->close();
} }
@ -4188,8 +4188,8 @@ trace file if you want all data to land in the same output file.
... ...
Verilated::traceEverOn(true); Verilated::traceEverOn(true);
VerilatedVcdSc* tfp = new VerilatedVcdSc; VerilatedVcdSc* tfp = new VerilatedVcdSc;
topp->trace (tfp, 99); topp->trace(tfp, 99);
tfp->open ("obj_dir/t_trace_ena_cc/simx.vcd"); tfp->open("obj_dir/t_trace_ena_cc/simx.vcd");
... ...
sc_start(1); sc_start(1);
... ...

View File

@ -31,7 +31,7 @@ use Pod::Usage;
use Cwd qw(abs_path getcwd); use Cwd qw(abs_path getcwd);
use strict; use strict;
use vars qw ($Debug @Opt_Verilator_Sw); use vars qw($Debug @Opt_Verilator_Sw);
####################################################################### #######################################################################
####################################################################### #######################################################################
@ -54,7 +54,7 @@ foreach my $sw (@ARGV) {
push @Opt_Verilator_Sw, $sw; push @Opt_Verilator_Sw, $sw;
} }
Getopt::Long::config ("no_auto_abbrev","pass_through"); Getopt::Long::config("no_auto_abbrev","pass_through");
if (! GetOptions ( if (! GetOptions (
# Major operating modes # Major operating modes
"help" => \&usage, "help" => \&usage,
@ -67,7 +67,7 @@ if (! GetOptions (
} }
# Normal, non gdb # Normal, non gdb
run (verilator_coverage_bin() run(verilator_coverage_bin()
." ".join(' ',@Opt_Verilator_Sw)); ." ".join(' ',@Opt_Verilator_Sw));
#---------------------------------------------------------------------- #----------------------------------------------------------------------

View File

@ -10,7 +10,7 @@ use Getopt::Long;
use IO::File; use IO::File;
use Pod::Usage; use Pod::Usage;
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
#====================================================================== #======================================================================
@ -37,7 +37,7 @@ my $Opt_B;
my $Opt_Lineno = 1; my $Opt_Lineno = 1;
autoflush STDOUT 1; autoflush STDOUT 1;
autoflush STDERR 1; autoflush STDERR 1;
Getopt::Long::config ("no_auto_abbrev"); Getopt::Long::config("no_auto_abbrev");
if (! GetOptions ( if (! GetOptions (
"help" => \&usage, "help" => \&usage,
"debug" => \&debug, "debug" => \&debug,
@ -54,9 +54,9 @@ defined $Opt_B or die "%Error: No new diff filename\n";
-e $Opt_B or die "%Error: No new diff filename found: $Opt_B\n"; -e $Opt_B or die "%Error: No new diff filename found: $Opt_B\n";
if (-d $Opt_A && -d $Opt_B) { if (-d $Opt_A && -d $Opt_B) {
diff_dir ($Opt_A, $Opt_B); diff_dir($Opt_A, $Opt_B);
} elsif (-f $Opt_A && -f $Opt_B) { } elsif (-f $Opt_A && -f $Opt_B) {
diff_file ($Opt_A, $Opt_B); diff_file($Opt_A, $Opt_B);
} else { } else {
die "%Error: Mix of files and dirs\n"; die "%Error: Mix of files and dirs\n";
} }
@ -85,7 +85,7 @@ sub diff_dir {
diff_file($a,$b); diff_file($a,$b);
$any = 1; $any = 1;
} }
$any or warn ("%Warning: No .tree files found that have similar base names:\n " $any or warn("%Warning: No .tree files found that have similar base names:\n "
.join("\n ", sort keys %files),"\n"); .join("\n ", sort keys %files),"\n");
} }
@ -103,8 +103,8 @@ sub diff_file {
my $verCvt = (($vera < 0x3900 && $verb >= 0x3900) my $verCvt = (($vera < 0x3900 && $verb >= 0x3900)
|| ($vera >= 0x3900 && $verb < 0x3900)); || ($vera >= 0x3900 && $verb < 0x3900));
filter ($a, $tmp_a, $verCvt); filter($a, $tmp_a, $verCvt);
filter ($b, $tmp_b, $verCvt); filter($b, $tmp_b, $verCvt);
system("diff -u $tmp_a $tmp_b"); system("diff -u $tmp_a $tmp_b");
unlink $tmp_a; unlink $tmp_a;
unlink $tmp_b; unlink $tmp_b;
@ -169,7 +169,7 @@ sub filter {
sub usage { sub usage {
pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT); pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT);
exit (1); exit(1);
} }
sub debug { sub debug {

View File

@ -9,7 +9,7 @@ use warnings;
use Getopt::Long; use Getopt::Long;
use IO::File; use IO::File;
use Pod::Usage; use Pod::Usage;
use vars qw ($Debug); use vars qw($Debug);
$Debug = 0; $Debug = 0;
my $Opt_File; my $Opt_File;
@ -44,7 +44,7 @@ exit(0);
sub usage { sub usage {
pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT); pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT);
exit (1); exit(1);
} }
sub parameter { sub parameter {

View File

@ -11,7 +11,7 @@ use IO::File;
use Pod::Usage; use Pod::Usage;
eval { use Data::Dumper; $Data::Dumper::Indent = 1; }; # Debug, ok if missing eval { use Data::Dumper; $Data::Dumper::Indent = 1; }; # Debug, ok if missing
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
#====================================================================== #======================================================================
@ -23,7 +23,7 @@ $Debug = 0;
my $Opt_File; my $Opt_File;
autoflush STDOUT 1; autoflush STDOUT 1;
autoflush STDERR 1; autoflush STDERR 1;
Getopt::Long::config ("no_auto_abbrev"); Getopt::Long::config("no_auto_abbrev");
if (! GetOptions ( if (! GetOptions (
"help" => \&usage, "help" => \&usage,
"debug" => \&debug, "debug" => \&debug,
@ -40,7 +40,7 @@ profcfunc($Opt_File);
sub usage { sub usage {
pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT); pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT);
exit (1); exit(1);
} }
sub debug { sub debug {

View File

@ -58,7 +58,7 @@ VerilatedImp VerilatedImp::s_s;
//=========================================================================== //===========================================================================
// User definable functions // User definable functions
#ifndef VL_USER_FINISH // Define this to override this function #ifndef VL_USER_FINISH ///< Define this to override this function
void vl_finish(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE { void vl_finish(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE {
if (0 && hier) {} if (0 && hier) {}
VL_PRINTF("- %s:%d: Verilog $finish\n", filename, linenum); // Not VL_PRINTF_MT, already on main thread VL_PRINTF("- %s:%d: Verilog $finish\n", filename, linenum); // Not VL_PRINTF_MT, already on main thread
@ -71,7 +71,7 @@ void vl_finish(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE
} }
#endif #endif
#ifndef VL_USER_STOP // Define this to override this function #ifndef VL_USER_STOP ///< Define this to override this function
void vl_stop(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE { void vl_stop(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE {
Verilated::gotFinish(true); Verilated::gotFinish(true);
Verilated::flushCall(); Verilated::flushCall();
@ -79,7 +79,7 @@ void vl_stop(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE {
} }
#endif #endif
#ifndef VL_USER_FATAL // Define this to override this function #ifndef VL_USER_FATAL ///< Define this to override this function
void vl_fatal(const char* filename, int linenum, const char* hier, const char* msg) VL_MT_UNSAFE { void vl_fatal(const char* filename, int linenum, const char* hier, const char* msg) VL_MT_UNSAFE {
if (0 && hier) {} if (0 && hier) {}
Verilated::gotFinish(true); Verilated::gotFinish(true);
@ -158,7 +158,7 @@ vluint64_t _vl_dbg_sequence_number() VL_MT_SAFE {
vluint32_t VL_THREAD_ID() VL_MT_SAFE { vluint32_t VL_THREAD_ID() VL_MT_SAFE {
#ifdef VL_THREADED #ifdef VL_THREADED
// Alternative is to use std::this_thread::get_id, but that returns a hard-to-read number and is very slow // Alternative is to use std::this_thread::get_id, but that returns a hard-to-read number and is very slow
static std::atomic<vluint32_t> s_nextId (0); static std::atomic<vluint32_t> s_nextId(0);
static VL_THREAD_LOCAL vluint32_t t_myId = ++s_nextId; static VL_THREAD_LOCAL vluint32_t t_myId = ++s_nextId;
return t_myId; return t_myId;
#else #else
@ -673,10 +673,10 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA
} }
int needmore = width-digits; int needmore = width-digits;
if (needmore>0) { if (needmore>0) {
if (pctp && pctp[0] && pctp[1]=='0') { //%0 if (pctp && pctp[0] && pctp[1]=='0') { // %0
output.append(needmore,'0'); // Pre-pad zero output.append(needmore, '0'); // Pre-pad zero
} else { } else {
output.append(needmore,' '); // Pre-pad spaces output.append(needmore, ' '); // Pre-pad spaces
} }
} }
output += append; output += append;
@ -694,10 +694,10 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA
} }
int needmore = width-digits; int needmore = width-digits;
if (needmore>0) { if (needmore>0) {
if (pctp && pctp[0] && pctp[1]=='0') { //%0 if (pctp && pctp[0] && pctp[1]=='0') { // %0
output.append(needmore,'0'); // Pre-pad zero output.append(needmore, '0'); // Pre-pad zero
} else { } else {
output.append(needmore,' '); // Pre-pad spaces output.append(needmore, ' '); // Pre-pad spaces
} }
} }
output += append; output += append;
@ -715,7 +715,7 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA
VL_FATAL_MT(__FILE__,__LINE__,"","Unsupported VL_TIME_MULTIPLIER"); VL_FATAL_MT(__FILE__,__LINE__,"","Unsupported VL_TIME_MULTIPLIER");
} }
int needmore = width-digits; int needmore = width-digits;
if (needmore>0) output.append(needmore,' '); // Pre-pad spaces if (needmore>0) output.append(needmore, ' '); // Pre-pad spaces
output += tmp; output += tmp;
break; break;
} }
@ -818,9 +818,9 @@ static inline void _vl_vsss_read(FILE* fp, int& floc, WDataInP fromp, const std:
while (1) { while (1) {
int c = _vl_vsss_peek(fp, floc, fromp, fstr); int c = _vl_vsss_peek(fp, floc, fromp, fstr);
if (c==EOF || isspace(c)) break; if (c==EOF || isspace(c)) break;
if (acceptp!=NULL // String - allow anything if (acceptp // String - allow anything
&& NULL==strchr(acceptp, c)) break; && NULL==strchr(acceptp, c)) break;
if (acceptp!=NULL) c = tolower(c); // Non-strings we'll simplify if (acceptp) c = tolower(c); // Non-strings we'll simplify
*cp++ = c; *cp++ = c;
_vl_vsss_advance(fp, floc); _vl_vsss_advance(fp, floc);
} }
@ -838,7 +838,7 @@ static inline void _vl_vsss_based(WDataOutP owp, int obits, int baseLog2,
int lsb = 0; int lsb = 0;
for (int i=0, pos=static_cast<int>(posend)-1; i<obits && pos>=static_cast<int>(posstart); --pos) { for (int i=0, pos=static_cast<int>(posend)-1; i<obits && pos>=static_cast<int>(posstart); --pos) {
switch (tolower (strp[pos])) { switch (tolower (strp[pos])) {
case 'x': case 'z': case '?': //FALLTHRU case 'x': case 'z': case '?': // FALLTHRU
case '0': lsb += baseLog2; break; case '0': lsb += baseLog2; break;
case '1': _vl_vsss_setbit(owp,obits,lsb, baseLog2, 1); lsb+=baseLog2; break; case '1': _vl_vsss_setbit(owp,obits,lsb, baseLog2, 1); lsb+=baseLog2; break;
case '2': _vl_vsss_setbit(owp,obits,lsb, baseLog2, 2); lsb+=baseLog2; break; case '2': _vl_vsss_setbit(owp,obits,lsb, baseLog2, 2); lsb+=baseLog2; break;
@ -1552,7 +1552,7 @@ IData VL_VALUEPLUSARGS_INW(int rbits, const std::string& ld, WDataOutP rwp) VL_M
case 'o': case 'o':
_vl_vsss_based(rwp,rbits, 3, dp, 0, strlen(dp)); _vl_vsss_based(rwp,rbits, 3, dp, 0, strlen(dp));
break; break;
case 'h': //FALLTHRU case 'h': // FALLTHRU
case 'x': case 'x':
_vl_vsss_based(rwp,rbits, 4, dp, 0, strlen(dp)); _vl_vsss_based(rwp,rbits, 4, dp, 0, strlen(dp));
break; break;
@ -1561,9 +1561,9 @@ IData VL_VALUEPLUSARGS_INW(int rbits, const std::string& ld, WDataOutP rwp) VL_M
_vl_vsss_setbit(rwp,rbits,lsb, 8, dp[posp]); lsb+=8; _vl_vsss_setbit(rwp,rbits,lsb, 8, dp[posp]); lsb+=8;
} }
break; break;
case 'e': //FALLTHRU - Unsupported case 'e': // FALLTHRU - Unsupported
case 'f': //FALLTHRU - Unsupported case 'f': // FALLTHRU - Unsupported
case 'g': //FALLTHRU - Unsupported case 'g': // FALLTHRU - Unsupported
default: // Other simulators simply return 0 in these cases and don't error out default: // Other simulators simply return 0 in these cases and don't error out
return 0; return 0;
} }

View File

@ -1202,8 +1202,8 @@ static inline int _VL_CMP_W(int words, WDataInP lwp, WDataInP rwp) VL_MT_SAFE {
static inline IData VL_GTS_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE { static inline IData VL_GTS_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE {
// For lbits==32, this becomes just a single instruction, otherwise ~5. // For lbits==32, this becomes just a single instruction, otherwise ~5.
// GCC 3.3.4 sign extension bugs on AMD64 architecture force us to use quad logic // GCC 3.3.4 sign extension bugs on AMD64 architecture force us to use quad logic
vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); //Q for gcc vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); // Q for gcc
vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); //Q for gcc vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); // Q for gcc
return lhs_signed > rhs_signed; return lhs_signed > rhs_signed;
} }
static inline IData VL_GTS_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE { static inline IData VL_GTS_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE {
@ -1213,8 +1213,8 @@ static inline IData VL_GTS_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PUR
} }
static inline IData VL_GTES_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE { static inline IData VL_GTES_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE {
vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); //Q for gcc vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); // Q for gcc
vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); //Q for gcc vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); // Q for gcc
return lhs_signed >= rhs_signed; return lhs_signed >= rhs_signed;
} }
static inline IData VL_GTES_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE { static inline IData VL_GTES_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE {
@ -1224,8 +1224,8 @@ static inline IData VL_GTES_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PU
} }
static inline IData VL_LTS_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE { static inline IData VL_LTS_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE {
vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); //Q for gcc vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); // Q for gcc
vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); //Q for gcc vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); // Q for gcc
return lhs_signed < rhs_signed; return lhs_signed < rhs_signed;
} }
static inline IData VL_LTS_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE { static inline IData VL_LTS_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE {
@ -1235,8 +1235,8 @@ static inline IData VL_LTS_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PUR
} }
static inline IData VL_LTES_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE { static inline IData VL_LTES_III(int, int lbits, int, IData lhs, IData rhs) VL_PURE {
vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); //Q for gcc vlsint64_t lhs_signed = VL_EXTENDS_QQ(64, lbits, lhs); // Q for gcc
vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); //Q for gcc vlsint64_t rhs_signed = VL_EXTENDS_QQ(64, lbits, rhs); // Q for gcc
return lhs_signed <= rhs_signed; return lhs_signed <= rhs_signed;
} }
static inline IData VL_LTES_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE { static inline IData VL_LTES_IQQ(int, int lbits, int, QData lhs, QData rhs) VL_PURE {
@ -1695,13 +1695,17 @@ static inline IData VL_STREAML_FAST_III(int, int lbits, int, IData ld, IData rd_
} }
switch (rd_log2) { switch (rd_log2) {
case 0: case 0:
ret = ((ret >> 1) & VL_UL(0x55555555)) | ((ret & VL_UL(0x55555555)) << 1); // FALLTHRU ret = ((ret >> 1) & VL_UL(0x55555555))
| ((ret & VL_UL(0x55555555)) << 1); // FALLTHRU
case 1: case 1:
ret = ((ret >> 2) & VL_UL(0x33333333)) | ((ret & VL_UL(0x33333333)) << 2); // FALLTHRU ret = ((ret >> 2) & VL_UL(0x33333333))
| ((ret & VL_UL(0x33333333)) << 2); // FALLTHRU
case 2: case 2:
ret = ((ret >> 4) & VL_UL(0x0f0f0f0f)) | ((ret & VL_UL(0x0f0f0f0f)) << 4); // FALLTHRU ret = ((ret >> 4) & VL_UL(0x0f0f0f0f))
| ((ret & VL_UL(0x0f0f0f0f)) << 4); // FALLTHRU
case 3: case 3:
ret = ((ret >> 8) & VL_UL(0x00ff00ff)) | ((ret & VL_UL(0x00ff00ff)) << 8); // FALLTHRU ret = ((ret >> 8) & VL_UL(0x00ff00ff))
| ((ret & VL_UL(0x00ff00ff)) << 8); // FALLTHRU
case 4: case 4:
ret = ((ret >> 16) | (ret << 16)); ret = ((ret >> 16) | (ret << 16));
} }
@ -2287,4 +2291,4 @@ static inline void VL_CONSTLO_W_8X(int lsb, WDataOutP obase,
//====================================================================== //======================================================================
#endif /*_VERILATED_H_*/ #endif // Guard

View File

@ -129,4 +129,4 @@ public:
static void zero() VL_MT_SAFE; static void zero() VL_MT_SAFE;
}; };
#endif // guard #endif // Guard

View File

@ -80,4 +80,4 @@ static inline void VL_SET_SVLV_Q(int, svLogicVecVal* owp, QData ld) VL_MT_SAFE {
//====================================================================== //======================================================================
#endif // _VERILATED_DPI_H_ #endif // Guard

View File

@ -51,7 +51,7 @@ protected:
void* m_userthis; ///< Fake "this" for caller void* m_userthis; ///< Fake "this" for caller
vluint32_t m_code; ///< Starting code number vluint32_t m_code; ///< Starting code number
// CONSTRUCTORS // CONSTRUCTORS
VerilatedLxt2CallInfo (VerilatedLxt2Callback_t icb, VerilatedLxt2Callback_t fcb, VerilatedLxt2CallInfo(VerilatedLxt2Callback_t icb, VerilatedLxt2Callback_t fcb,
VerilatedLxt2Callback_t changecb, VerilatedLxt2Callback_t changecb,
void* ut, vluint32_t code) void* ut, vluint32_t code)
: m_initcb(icb), m_fullcb(fcb), m_changecb(changecb), m_userthis(ut), m_code(code) {}; : m_initcb(icb), m_fullcb(fcb), m_changecb(changecb), m_userthis(ut), m_code(code) {};

View File

@ -139,10 +139,10 @@ public:
void fullQuad(vluint32_t code, const vluint64_t newval, int bits) { chgQuad(code, newval, bits); } void fullQuad(vluint32_t code, const vluint64_t newval, int bits) { chgQuad(code, newval, bits); }
void fullArray(vluint32_t code, const vluint32_t* newval, int bits) { chgArray(code, newval, bits); } void fullArray(vluint32_t code, const vluint32_t* newval, int bits) { chgArray(code, newval, bits); }
void declTriBit (vluint32_t code, const char* name, int arraynum); void declTriBit(vluint32_t code, const char* name, int arraynum);
void declTriBus (vluint32_t code, const char* name, int arraynum, int msb, int lsb); void declTriBus(vluint32_t code, const char* name, int arraynum, int msb, int lsb);
void declTriQuad (vluint32_t code, const char* name, int arraynum, int msb, int lsb); void declTriQuad(vluint32_t code, const char* name, int arraynum, int msb, int lsb);
void declTriArray (vluint32_t code, const char* name, int arraynum, int msb, int lsb); void declTriArray(vluint32_t code, const char* name, int arraynum, int msb, int lsb);
void fullTriBit(vluint32_t code, const vluint32_t newval, const vluint32_t newtri); void fullTriBit(vluint32_t code, const vluint32_t newval, const vluint32_t newtri);
void fullTriBus(vluint32_t code, const vluint32_t newval, const vluint32_t newtri, int bits); void fullTriBus(vluint32_t code, const vluint32_t newval, const vluint32_t newtri, int bits);
void fullTriQuad(vluint32_t code, const vluint64_t newval, const vluint32_t newtri, int bits); void fullTriQuad(vluint32_t code, const vluint64_t newval, const vluint32_t newtri, int bits);

View File

@ -228,7 +228,8 @@ void VerilatedRestore::fill() VL_MT_UNSAFE_ONE {
break; break;
} }
} else { // got==0, EOF } else { // got==0, EOF
// Fill buffer from here to end with NULLs so reader's don't need to check eof each character. // Fill buffer from here to end with NULLs so reader's don't
// need to check eof each character.
while (m_endp < m_bufp+bufferSize()) *m_endp++ = '\0'; while (m_endp < m_bufp+bufferSize()) *m_endp++ = '\0';
break; break;
} }

View File

@ -248,4 +248,4 @@ inline VerilatedDeserialize& operator>>(VerilatedDeserialize& os, std::string& r
return os.read((void*)rhs.data(), len); return os.read((void*)rhs.data(), len);
} }
#endif // guard #endif // Guard

View File

@ -50,4 +50,4 @@ public:
//========================================================================= //=========================================================================
#endif // guard #endif // Guard

View File

@ -122,9 +122,9 @@ public:
class iterator { class iterator {
protected: protected:
// MEMBERS // MEMBERS
size_t m_bucketIdx; // Bucket this iterator points into. size_t m_bucketIdx; // Bucket this iterator points into
typename Bucket::iterator m_bit; // Bucket-local iterator. typename Bucket::iterator m_bit; // Bucket-local iterator
const vl_unordered_set* m_setp; // The containing set. const vl_unordered_set* m_setp; // The containing set
public: public:
// CONSTRUCTORS // CONSTRUCTORS

View File

@ -921,7 +921,7 @@ void VerilatedVpiError::selfTest() VL_MT_UNSAFE_ONE {
vpiHandle vpi_register_cb(p_cb_data cb_data_p) { vpiHandle vpi_register_cb(p_cb_data cb_data_p) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
// cppcheck-suppress nullPointer // cppcheck-suppress nullPointer
if (VL_UNLIKELY(!cb_data_p)) { if (VL_UNLIKELY(!cb_data_p)) {
_VL_VPI_WARNING(__FILE__, __LINE__, "%s : callback data pointer is null", VL_FUNC); _VL_VPI_WARNING(__FILE__, __LINE__, "%s : callback data pointer is null", VL_FUNC);
@ -963,7 +963,7 @@ PLI_INT32 vpi_remove_cb(vpiHandle object) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_remove_cb %p\n",object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_remove_cb %p\n",object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
VerilatedVpioCb* vop = VerilatedVpioCb::castp(object); VerilatedVpioCb* vop = VerilatedVpioCb::castp(object);
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!vop)) return 0; if (VL_UNLIKELY(!vop)) return 0;
if (vop->cb_datap()->reason == cbAfterDelay) { if (vop->cb_datap()->reason == cbAfterDelay) {
VerilatedVpiImp::cbTimedRemove(vop); VerilatedVpiImp::cbTimedRemove(vop);
@ -987,7 +987,7 @@ void vpi_get_systf_info(vpiHandle object, p_vpi_systf_data systf_data_p) {
vpiHandle vpi_handle_by_name(PLI_BYTE8* namep, vpiHandle scope) { vpiHandle vpi_handle_by_name(PLI_BYTE8* namep, vpiHandle scope) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!namep)) return NULL; if (VL_UNLIKELY(!namep)) return NULL;
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_handle_by_name %s %p\n",namep,scope);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_handle_by_name %s %p\n",namep,scope););
VerilatedVpioScope* voScopep = VerilatedVpioScope::castp(scope); VerilatedVpioScope* voScopep = VerilatedVpioScope::castp(scope);
@ -1024,7 +1024,7 @@ vpiHandle vpi_handle_by_index(vpiHandle object, PLI_INT32 indx) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_handle_by_index %p %d\n",object, indx);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_handle_by_index %p %d\n",object, indx););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
VerilatedVpioVar* varop = VerilatedVpioVar::castp(object); VerilatedVpioVar* varop = VerilatedVpioVar::castp(object);
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_LIKELY(varop)) { if (VL_LIKELY(varop)) {
if (varop->varp()->dims()<2) return 0; if (varop->varp()->dims()<2) return 0;
if (VL_LIKELY(varop->varp()->unpacked().left() >= varop->varp()->unpacked().right())) { if (VL_LIKELY(varop->varp()->unpacked().left() >= varop->varp()->unpacked().right())) {
@ -1049,7 +1049,7 @@ vpiHandle vpi_handle_by_index(vpiHandle object, PLI_INT32 indx) {
vpiHandle vpi_handle(PLI_INT32 type, vpiHandle object) { vpiHandle vpi_handle(PLI_INT32 type, vpiHandle object) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_handle %d %p\n",type,object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_handle %d %p\n",type,object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
switch (type) { switch (type) {
case vpiLeftRange: { case vpiLeftRange: {
VerilatedVpioVar* vop = VerilatedVpioVar::castp(object); VerilatedVpioVar* vop = VerilatedVpioVar::castp(object);
@ -1092,7 +1092,7 @@ vpiHandle vpi_handle_multi(PLI_INT32 type, vpiHandle refHandle1, vpiHandle refHa
vpiHandle vpi_iterate(PLI_INT32 type, vpiHandle object) { vpiHandle vpi_iterate(PLI_INT32 type, vpiHandle object) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_iterate %d %p\n",type,object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_iterate %d %p\n",type,object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
switch (type) { switch (type) {
case vpiMemoryWord: { case vpiMemoryWord: {
VerilatedVpioVar* vop = VerilatedVpioVar::castp(object); VerilatedVpioVar* vop = VerilatedVpioVar::castp(object);
@ -1130,7 +1130,7 @@ vpiHandle vpi_iterate(PLI_INT32 type, vpiHandle object) {
vpiHandle vpi_scan(vpiHandle object) { vpiHandle vpi_scan(vpiHandle object) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_scan %p\n",object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_scan %p\n",object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
VerilatedVpio* vop = VerilatedVpio::castp(object); VerilatedVpio* vop = VerilatedVpio::castp(object);
if (VL_UNLIKELY(!vop)) return NULL; if (VL_UNLIKELY(!vop)) return NULL;
return vop->dovpi_scan(); return vop->dovpi_scan();
@ -1142,7 +1142,7 @@ PLI_INT32 vpi_get(PLI_INT32 property, vpiHandle object) {
// Leave this in the header file - in many cases the compiler can constant propagate "object" // Leave this in the header file - in many cases the compiler can constant propagate "object"
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_get %d %p\n",property,object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_get %d %p\n",property,object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
switch (property) { switch (property) {
case vpiTimePrecision: { case vpiTimePrecision: {
return VL_TIME_PRECISION; return VL_TIME_PRECISION;
@ -1185,7 +1185,7 @@ PLI_BYTE8 *vpi_get_str(PLI_INT32 property, vpiHandle object) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_get_str %d %p\n",property,object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_get_str %d %p\n",property,object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
VerilatedVpio* vop = VerilatedVpio::castp(object); VerilatedVpio* vop = VerilatedVpio::castp(object);
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!vop)) return NULL; if (VL_UNLIKELY(!vop)) return NULL;
switch (property) { switch (property) {
case vpiName: { case vpiName: {
@ -1224,7 +1224,7 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
static VL_THREAD_LOCAL int outStrSz = sizeof(outStr)-1; static VL_THREAD_LOCAL int outStrSz = sizeof(outStr)-1;
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_get_value %p\n",object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_get_value %p\n",object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!value_p)) return; if (VL_UNLIKELY(!value_p)) return;
if (VerilatedVpioVar* vop = VerilatedVpioVar::castp(object)) { if (VerilatedVpioVar* vop = VerilatedVpioVar::castp(object)) {
// We used to presume vpiValue.format = vpiIntVal or if single bit vpiScalarVal // We used to presume vpiValue.format = vpiIntVal or if single bit vpiScalarVal
@ -1296,7 +1296,7 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
char val = (datap[i>>3]>>(i&7))&1; char val = (datap[i>>3]>>(i&7))&1;
outStr[bits-i-1] = val?'1':'0'; outStr[bits-i-1] = val?'1':'0';
} }
outStr[i]=0; // NULL terminate outStr[i] = '\0';
return; return;
} }
default: default:
@ -1346,7 +1346,7 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
} }
outStr[chars-i-1] = '0' + (val&7); outStr[chars-i-1] = '0' + (val&7);
} }
outStr[i]=0; // NULL terminate outStr[i] = '\0';
return; return;
} }
default: default:
@ -1405,7 +1405,7 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
} }
outStr[chars-i-1] = "0123456789abcdef"[static_cast<int>(val)]; outStr[chars-i-1] = "0123456789abcdef"[static_cast<int>(val)];
} }
outStr[i]=0; // NULL terminate outStr[i] = '\0';
return; return;
} }
default: default:
@ -1437,7 +1437,7 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
// other simulators replace [leading?] zero chars with spaces, replicate here. // other simulators replace [leading?] zero chars with spaces, replicate here.
outStr[i] = val?val:' '; outStr[i] = val?val:' ';
} }
outStr[i]=0; // NULL terminate outStr[i] = '\0';
return; return;
} }
default: default:
@ -1488,7 +1488,7 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value value_p,
p_vpi_time time_p, PLI_INT32 flags) { p_vpi_time time_p, PLI_INT32 flags) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_put_value %p %p\n",object, value_p);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_put_value %p %p\n",object, value_p););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!value_p)) { if (VL_UNLIKELY(!value_p)) {
_VL_VPI_WARNING(__FILE__, __LINE__, "Ignoring vpi_put_value with NULL value pointer"); _VL_VPI_WARNING(__FILE__, __LINE__, "Ignoring vpi_put_value with NULL value pointer");
return 0; return 0;
@ -1607,7 +1607,8 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value value_p,
val.half <<= idx.rem; val.half <<= idx.rem;
datap[idx.quot] |= val.byte[0]; // or in value datap[idx.quot] |= val.byte[0]; // or in value
if ((idx.quot+1) < bytes) { if ((idx.quot+1) < bytes) {
datap[idx.quot+1] = val.byte[1]; // this also resets all bits to 0 prior to or'ing above datap[idx.quot+1] = val.byte[1]; // this also resets
// all bits to 0 prior to or'ing above
} }
} }
// mask off non existant bits in the most significant byte // mask off non existant bits in the most significant byte
@ -1692,7 +1693,8 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value value_p,
if (i&1) { if (i&1) {
datap[i>>1] |= hex<<4; datap[i>>1] |= hex<<4;
} else { } else {
datap[i>>1] = hex; // this also resets all bits to 0 prior to or'ing above of the msb datap[i>>1] = hex; // this also resets all
// bits to 0 prior to or'ing above of the msb
} }
} }
// apply bit mask to most significant byte // apply bit mask to most significant byte
@ -1789,13 +1791,13 @@ void vpi_get_time(vpiHandle object, p_vpi_time time_p) {
PLI_UINT32 vpi_mcd_open(PLI_BYTE8 *filenamep) { PLI_UINT32 vpi_mcd_open(PLI_BYTE8 *filenamep) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
return VL_FOPEN_S(filenamep,"wb"); return VL_FOPEN_S(filenamep,"wb");
} }
PLI_UINT32 vpi_mcd_close(PLI_UINT32 mcd) { PLI_UINT32 vpi_mcd_close(PLI_UINT32 mcd) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
VL_FCLOSE_I(mcd); return 0; VL_FCLOSE_I(mcd); return 0;
} }
@ -1805,7 +1807,7 @@ PLI_BYTE8 *vpi_mcd_name(PLI_UINT32 mcd) {
PLI_INT32 vpi_mcd_printf(PLI_UINT32 mcd, PLI_BYTE8 *formatp, ...) { PLI_INT32 vpi_mcd_printf(PLI_UINT32 mcd, PLI_BYTE8 *formatp, ...) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
va_list ap; va_list ap;
va_start(ap,formatp); va_start(ap,formatp);
int chars = vpi_mcd_vprintf(mcd, formatp, ap); int chars = vpi_mcd_vprintf(mcd, formatp, ap);
@ -1815,7 +1817,7 @@ PLI_INT32 vpi_mcd_printf(PLI_UINT32 mcd, PLI_BYTE8 *formatp, ...) {
PLI_INT32 vpi_printf(PLI_BYTE8 *formatp, ...) { PLI_INT32 vpi_printf(PLI_BYTE8 *formatp, ...) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
va_list ap; va_list ap;
va_start(ap,formatp); va_start(ap,formatp);
int chars = vpi_vprintf(formatp, ap); int chars = vpi_vprintf(formatp, ap);
@ -1825,14 +1827,14 @@ PLI_INT32 vpi_printf(PLI_BYTE8 *formatp, ...) {
PLI_INT32 vpi_vprintf(PLI_BYTE8* formatp, va_list ap) { PLI_INT32 vpi_vprintf(PLI_BYTE8* formatp, va_list ap) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
return VL_VPRINTF(formatp, ap); return VL_VPRINTF(formatp, ap);
} }
PLI_INT32 vpi_mcd_vprintf(PLI_UINT32 mcd, PLI_BYTE8 *format, va_list ap) { PLI_INT32 vpi_mcd_vprintf(PLI_UINT32 mcd, PLI_BYTE8 *format, va_list ap) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
FILE* fp = VL_CVT_I_FP(mcd); FILE* fp = VL_CVT_I_FP(mcd);
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
// cppcheck-suppress nullPointer // cppcheck-suppress nullPointer
if (VL_UNLIKELY(!fp)) return 0; if (VL_UNLIKELY(!fp)) return 0;
int chars = vfprintf(fp, format, ap); int chars = vfprintf(fp, format, ap);
@ -1841,7 +1843,7 @@ PLI_INT32 vpi_mcd_vprintf(PLI_UINT32 mcd, PLI_BYTE8 *format, va_list ap) {
PLI_INT32 vpi_flush(void) { PLI_INT32 vpi_flush(void) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
Verilated::flushCall(); Verilated::flushCall();
return 0; return 0;
} }
@ -1849,7 +1851,7 @@ PLI_INT32 vpi_flush(void) {
PLI_INT32 vpi_mcd_flush(PLI_UINT32 mcd) { PLI_INT32 vpi_mcd_flush(PLI_UINT32 mcd) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
FILE* fp = VL_CVT_I_FP(mcd); FILE* fp = VL_CVT_I_FP(mcd);
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!fp)) return 1; if (VL_UNLIKELY(!fp)) return 1;
fflush(fp); fflush(fp);
return 0; return 0;
@ -1874,7 +1876,7 @@ PLI_INT32 vpi_chk_error(p_vpi_error_info error_info_p) {
PLI_INT32 vpi_free_object(vpiHandle object) { PLI_INT32 vpi_free_object(vpiHandle object) {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
return vpi_release_handle(object); // Deprecated return vpi_release_handle(object); // Deprecated
} }
@ -1882,7 +1884,7 @@ PLI_INT32 vpi_release_handle(vpiHandle object) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_release_handle %p\n",object);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_release_handle %p\n",object););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
VerilatedVpio* vop = VerilatedVpio::castp(object); VerilatedVpio* vop = VerilatedVpio::castp(object);
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
if (VL_UNLIKELY(!vop)) return 0; if (VL_UNLIKELY(!vop)) return 0;
vpi_remove_cb(object); // May not be a callback, but that's ok vpi_remove_cb(object); // May not be a callback, but that's ok
delete vop; delete vop;
@ -1891,7 +1893,7 @@ PLI_INT32 vpi_release_handle(vpiHandle object) {
PLI_INT32 vpi_get_vlog_info(p_vpi_vlog_info vlog_info_p) VL_MT_SAFE { PLI_INT32 vpi_get_vlog_info(p_vpi_vlog_info vlog_info_p) VL_MT_SAFE {
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
vlog_info_p->argc = Verilated::getCommandArgs()->argc; vlog_info_p->argc = Verilated::getCommandArgs()->argc;
vlog_info_p->argv = (PLI_BYTE8**)Verilated::getCommandArgs()->argv; vlog_info_p->argv = (PLI_BYTE8**)Verilated::getCommandArgs()->argv;
vlog_info_p->product = (PLI_BYTE8*)Verilated::productName(); vlog_info_p->product = (PLI_BYTE8*)Verilated::productName();
@ -1917,7 +1919,7 @@ PLI_INT32 vpi_put_userdata(vpiHandle obj, void *userdata) {
PLI_INT32 vpi_control(PLI_INT32 operation, ...) { PLI_INT32 vpi_control(PLI_INT32 operation, ...) {
VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_control %d\n",operation);); VL_DEBUG_IF_PLI(VL_DBG_MSGF("- vpi: vpi_control %d\n",operation););
VerilatedVpiImp::assertOneCheck(); VerilatedVpiImp::assertOneCheck();
_VL_VPI_ERROR_RESET(); // reset vpi error status _VL_VPI_ERROR_RESET();
switch (operation) { switch (operation) {
case vpiFinish: { case vpiFinish: {
VL_FINISH_MT(__FILE__,__LINE__,"*VPI*"); VL_FINISH_MT(__FILE__,__LINE__,"*VPI*");

View File

@ -49,5 +49,4 @@ public:
static void selfTest() VL_MT_UNSAFE_ONE; static void selfTest() VL_MT_UNSAFE_ONE;
}; };
#endif // Guard #endif // Guard

View File

@ -8,7 +8,7 @@ use IO::File;
use Pod::Usage; use Pod::Usage;
use Data::Dumper; $Data::Dumper::Indent=1; use Data::Dumper; $Data::Dumper::Indent=1;
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
#====================================================================== #======================================================================
@ -32,14 +32,14 @@ if (! GetOptions (
usage(); usage();
} }
dotread ($opt_filename); dotread($opt_filename);
cwrite("graph_export.cpp"); cwrite("graph_export.cpp");
#---------------------------------------------------------------------- #----------------------------------------------------------------------
sub usage { sub usage {
pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT); pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT);
exit (1); exit(1);
} }
sub debug { sub debug {

View File

@ -8,7 +8,7 @@ use IO::File;
use Pod::Usage; use Pod::Usage;
use Data::Dumper; $Data::Dumper::Indent=1; use Data::Dumper; $Data::Dumper::Indent=1;
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
#====================================================================== #======================================================================
@ -35,7 +35,7 @@ if (! GetOptions (
usage(); usage();
} }
dotread ($opt_filename); dotread($opt_filename);
circle($opt_circle) if $opt_circle; circle($opt_circle) if $opt_circle;
simplify(); simplify();
dotwrite(); dotwrite();
@ -44,7 +44,7 @@ dotwrite();
sub usage { sub usage {
pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT); pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT);
exit (1); exit(1);
} }
sub debug { sub debug {

View File

@ -8,7 +8,7 @@ use IO::File;
use IO::Dir; use IO::Dir;
use Pod::Usage; use Pod::Usage;
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
our $VERSION = '0.001'; our $VERSION = '0.001';
our $Opt_Widen = 1; our $Opt_Widen = 1;
@ -18,7 +18,7 @@ our $Opt_Widen = 1;
autoflush STDOUT 1; autoflush STDOUT 1;
autoflush STDERR 1; autoflush STDERR 1;
Getopt::Long::config ("no_auto_abbrev"); Getopt::Long::config("no_auto_abbrev");
if (! GetOptions ( if (! GetOptions (
"debug" => sub { $Debug = 1; }, "debug" => sub { $Debug = 1; },
"help" => sub { print "Version $VERSION\n"; "help" => sub { print "Version $VERSION\n";

View File

@ -7,7 +7,7 @@ use Cwd;
use IO::File; use IO::File;
use Pod::Usage; use Pod::Usage;
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
#====================================================================== #======================================================================
# main # main
@ -17,7 +17,7 @@ our $Opt_Jobs = calc_jobs();
autoflush STDOUT 1; autoflush STDOUT 1;
autoflush STDERR 1; autoflush STDERR 1;
Getopt::Long::config ("no_auto_abbrev"); Getopt::Long::config("no_auto_abbrev");
if (! GetOptions ( if (! GetOptions (
"debug" => sub { $Debug = 1; }, "debug" => sub { $Debug = 1; },
"<>" => sub { die "%Error: Unknown parameter: $_[0]\n"; }, "<>" => sub { die "%Error: Unknown parameter: $_[0]\n"; },

View File

@ -8,7 +8,7 @@ use IO::File;
use Pod::Usage; use Pod::Usage;
use Data::Dumper; $Data::Dumper::Indent=1; use Data::Dumper; $Data::Dumper::Indent=1;
use strict; use strict;
use vars qw ($Debug); use vars qw($Debug);
#====================================================================== #======================================================================
@ -31,7 +31,7 @@ if (! GetOptions (
usage(); usage();
} }
vread ($opt_filename); vread($opt_filename);
#print Dumper($Tree); #print Dumper($Tree);
vwrite(); vwrite();
@ -41,7 +41,7 @@ print '(query-replace-regexp "(\\([0-9a-z_]+\\))" "\\1" nil nil nil)',"\n";
sub usage { sub usage {
pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT); pod2usage(-verbose=>2, -exitval=>2, -output=>\*STDOUT);
exit (1); exit(1);
} }
sub debug { sub debug {