forked from github/verilator
Internal coverage fixes
This commit is contained in:
parent
4db673b2ff
commit
82d8fe0c27
@ -268,7 +268,7 @@ static void _vl_svGetBitArrElemVecVal(svBitVecVal* d, const svOpenArrayHandle s,
|
|||||||
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(s);
|
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(s);
|
||||||
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
||||||
if (VL_UNLIKELY(!datap)) return;
|
if (VL_UNLIKELY(!datap)) return;
|
||||||
switch (varp->vltype()) {
|
switch (varp->vltype()) { // LCOV_EXCL_BR_LINE
|
||||||
case VLVT_UINT8: d[0] = *(reinterpret_cast<CData*>(datap)); return;
|
case VLVT_UINT8: d[0] = *(reinterpret_cast<CData*>(datap)); return;
|
||||||
case VLVT_UINT16: d[0] = *(reinterpret_cast<SData*>(datap)); return;
|
case VLVT_UINT16: d[0] = *(reinterpret_cast<SData*>(datap)); return;
|
||||||
case VLVT_UINT32: d[0] = *(reinterpret_cast<IData*>(datap)); return;
|
case VLVT_UINT32: d[0] = *(reinterpret_cast<IData*>(datap)); return;
|
||||||
@ -296,7 +296,7 @@ static void _vl_svGetLogicArrElemVecVal(svLogicVecVal* d, const svOpenArrayHandl
|
|||||||
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(s);
|
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(s);
|
||||||
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
||||||
if (VL_UNLIKELY(!datap)) return;
|
if (VL_UNLIKELY(!datap)) return;
|
||||||
switch (varp->vltype()) {
|
switch (varp->vltype()) { // LCOV_EXCL_BR_LINE
|
||||||
case VLVT_UINT8:
|
case VLVT_UINT8:
|
||||||
d[0].aval = *(reinterpret_cast<CData*>(datap));
|
d[0].aval = *(reinterpret_cast<CData*>(datap));
|
||||||
d[0].bval = 0;
|
d[0].bval = 0;
|
||||||
@ -339,7 +339,7 @@ static void _vl_svPutBitArrElemVecVal(const svOpenArrayHandle d, const svBitVecV
|
|||||||
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(d);
|
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(d);
|
||||||
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
||||||
if (VL_UNLIKELY(!datap)) return;
|
if (VL_UNLIKELY(!datap)) return;
|
||||||
switch (varp->vltype()) {
|
switch (varp->vltype()) { // LCOV_EXCL_BR_LINE
|
||||||
case VLVT_UINT8: *(reinterpret_cast<CData*>(datap)) = s[0]; return;
|
case VLVT_UINT8: *(reinterpret_cast<CData*>(datap)) = s[0]; return;
|
||||||
case VLVT_UINT16: *(reinterpret_cast<SData*>(datap)) = s[0]; return;
|
case VLVT_UINT16: *(reinterpret_cast<SData*>(datap)) = s[0]; return;
|
||||||
case VLVT_UINT32: *(reinterpret_cast<IData*>(datap)) = s[0]; return;
|
case VLVT_UINT32: *(reinterpret_cast<IData*>(datap)) = s[0]; return;
|
||||||
@ -361,7 +361,7 @@ static void _vl_svPutLogicArrElemVecVal(const svOpenArrayHandle d, const svLogic
|
|||||||
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(d);
|
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(d);
|
||||||
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
||||||
if (VL_UNLIKELY(!datap)) return;
|
if (VL_UNLIKELY(!datap)) return;
|
||||||
switch (varp->vltype()) {
|
switch (varp->vltype()) { // LCOV_EXCL_BR_LINE
|
||||||
case VLVT_UINT8: *(reinterpret_cast<CData*>(datap)) = s[0].aval; return;
|
case VLVT_UINT8: *(reinterpret_cast<CData*>(datap)) = s[0].aval; return;
|
||||||
case VLVT_UINT16: *(reinterpret_cast<SData*>(datap)) = s[0].aval; return;
|
case VLVT_UINT16: *(reinterpret_cast<SData*>(datap)) = s[0].aval; return;
|
||||||
case VLVT_UINT32: *(reinterpret_cast<IData*>(datap)) = s[0].aval; return;
|
case VLVT_UINT32: *(reinterpret_cast<IData*>(datap)) = s[0].aval; return;
|
||||||
@ -387,7 +387,7 @@ static svBit _vl_svGetBitArrElem(const svOpenArrayHandle s, int nargs, int indx1
|
|||||||
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(s);
|
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(s);
|
||||||
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
||||||
if (VL_UNLIKELY(!datap)) return 0;
|
if (VL_UNLIKELY(!datap)) return 0;
|
||||||
switch (varp->vltype()) {
|
switch (varp->vltype()) { // LCOV_EXCL_BR_LINE
|
||||||
case VLVT_UINT8: return (*(reinterpret_cast<CData*>(datap))) & 1;
|
case VLVT_UINT8: return (*(reinterpret_cast<CData*>(datap))) & 1;
|
||||||
default: // LCOV_EXCL_START // Errored earlier
|
default: // LCOV_EXCL_START // Errored earlier
|
||||||
_VL_SVDPI_WARN("%%Warning: DPI svOpenArrayHandle function unsupported datatype (%d).\n",
|
_VL_SVDPI_WARN("%%Warning: DPI svOpenArrayHandle function unsupported datatype (%d).\n",
|
||||||
@ -403,7 +403,7 @@ static void _vl_svPutBitArrElem(const svOpenArrayHandle d, svBit value, int narg
|
|||||||
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(d);
|
const VerilatedDpiOpenVar* varp = _vl_openhandle_varp(d);
|
||||||
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
void* datap = _vl_sv_adjusted_datap(varp, nargs, indx1, indx2, indx3);
|
||||||
if (VL_UNLIKELY(!datap)) return;
|
if (VL_UNLIKELY(!datap)) return;
|
||||||
switch (varp->vltype()) {
|
switch (varp->vltype()) { // LCOV_EXCL_BR_LINE
|
||||||
case VLVT_UINT8: *(reinterpret_cast<CData*>(datap)) = value; return;
|
case VLVT_UINT8: *(reinterpret_cast<CData*>(datap)) = value; return;
|
||||||
default: // LCOV_EXCL_START // Errored earlier
|
default: // LCOV_EXCL_START // Errored earlier
|
||||||
_VL_SVDPI_WARN("%%Warning: DPI svOpenArrayHandle function unsupported datatype (%d).\n",
|
_VL_SVDPI_WARN("%%Warning: DPI svOpenArrayHandle function unsupported datatype (%d).\n",
|
||||||
|
@ -166,8 +166,8 @@ public:
|
|||||||
sectionr = "";
|
sectionr = "";
|
||||||
}
|
}
|
||||||
UASSERT_OBJ(varp->valuep(), nodep, "No init for a param?");
|
UASSERT_OBJ(varp->valuep(), nodep, "No init for a param?");
|
||||||
// These should be static const values, however microsloth VC++ doesn't
|
// These should be static const values, however older MSVC++ did't
|
||||||
// support them. They also cause problems with GDB under GCC2.95.
|
// support them; should be ok now under C++11, need to refactor.
|
||||||
if (varp->isWide()) { // Unsupported for output
|
if (varp->isWide()) { // Unsupported for output
|
||||||
if (!init) {
|
if (!init) {
|
||||||
putsDecoration("// enum WData " + varp->nameProtect() + " //wide");
|
putsDecoration("// enum WData " + varp->nameProtect() + " //wide");
|
||||||
|
Loading…
Reference in New Issue
Block a user