diff --git a/bin/verilator b/bin/verilator index 365a4949c..29c2d2115 100755 --- a/bin/verilator +++ b/bin/verilator @@ -182,7 +182,9 @@ sub run { warn "%Error: $command\n"; } if ($status & 127) { - if (($status & 127) == 8 || ($status & 127) == 11) { # SIGFPA or SIGSEGV + if (($status & 127) == 4 # SIGILL + || ($status & 127) == 8 # SIGFPA + || ($status & 127) == 11) { # SIGSEGV warn "%Error: Verilator internal fault, sorry. Consider trying --debug --gdbbt\n" if !$Debug; } elsif (($status & 127) == 6) { # SIGABRT warn "%Error: Verilator aborted. Consider trying --debug --gdbbt\n" if !$Debug; diff --git a/include/verilated.cpp b/include/verilated.cpp index 12da6a49a..3b7e4ae81 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -308,7 +308,7 @@ WDataOutP VL_POW_WWQ(int obits, int lbits, int rbits, WDataOutP owp, WDataInP lw WData rhsw[2]; VL_SET_WQ(rhsw, rhs); return VL_POW_WWW(obits,lbits,rbits,owp,lwp,rhsw); } -QData VL_POW_QQW(int obits, int, int rbits, QData lhs, WDataInP rwp) { +QData VL_POW_QQW(int, int, int rbits, QData lhs, WDataInP rwp) { // Skip check for rhs == 0, as short-circuit doesn't save time if (VL_UNLIKELY(lhs==0)) return 0; QData power = lhs; diff --git a/test_regress/t/t_dpi_import_c.cpp b/test_regress/t/t_dpi_import_c.cpp index 8f5a7b7d0..62955cf4d 100644 --- a/test_regress/t/t_dpi_import_c.cpp +++ b/test_regress/t/t_dpi_import_c.cpp @@ -88,11 +88,11 @@ extern "C" { //====================================================================== -unsigned char dpii_f_bit (unsigned char i) { return SV_MASK(1) & ~i; } -svBitVecVal dpii_f_bit8 (const svBitVecVal *i) { return SV_MASK(8) & ~*i; } -svBitVecVal dpii_f_bit9 (const svBitVecVal *i) { return SV_MASK(9) & ~*i; } -svBitVecVal dpii_f_bit16(const svBitVecVal *i) { return SV_MASK(16) & ~*i; } -svBitVecVal dpii_f_bit17(const svBitVecVal *i) { return SV_MASK(17) & ~*i; } +unsigned char dpii_f_bit (unsigned char i) { return VL_MASK_I(1) & ~i; } +svBitVecVal dpii_f_bit8 (const svBitVecVal *i) { return VL_MASK_I(8) & ~*i; } +svBitVecVal dpii_f_bit9 (const svBitVecVal *i) { return VL_MASK_I(9) & ~*i; } +svBitVecVal dpii_f_bit16(const svBitVecVal *i) { return VL_MASK_I(16) & ~*i; } +svBitVecVal dpii_f_bit17(const svBitVecVal *i) { return VL_MASK_I(17) & ~*i; } svBitVecVal dpii_f_bit32(const svBitVecVal *i) { return ~*i; } long long dpii_f_bit33(const svBitVecVal *i) { return ((1ULL<<33)-1) & ~((long long)(i[1])<<32ULL | i[0]); } long long dpii_f_bit64(const svBitVecVal *i) { return ~((long long)(i[1])<<32ULL | i[0]); } @@ -106,7 +106,7 @@ const char* dpii_f_string (const char* i) { return i; } double dpii_f_real (double i) { return i+1.5; } float dpii_f_shortreal(float i) { return i+1.5; } -void dpii_v_bit (unsigned char i, unsigned char *o) { *o = SV_MASK(1) & ~i; } +void dpii_v_bit (unsigned char i, unsigned char *o) { *o = VL_MASK_I(1) & ~i; } void dpii_v_int (int i, int *o) { *o = ~i; } void dpii_v_uint (unsigned int i, unsigned int *o) { *o = ~i; } void dpii_v_byte (char i, char *o) { *o = ~i; } @@ -139,7 +139,7 @@ void dpii_v_bit64(const svBitVecVal* i, svBitVecVal* o) { void dpii_v_bit95(const svBitVecVal* i, svBitVecVal* o) { o[0] = ~i[0]; o[1] = ~i[1]; - o[2] = SV_MASK(95-64) & ~i[2]; + o[2] = VL_MASK_I(95-64) & ~i[2]; } void dpii_v_bit96(const svBitVecVal* i, svBitVecVal* o) { o[0] = ~i[0];