Add VL_VALUE_STRING_MAX_WORDS override (#3869)

Co-authored-by: Andrew Nolte <[email protected]>
This commit is contained in:
Andrew Nolte
2023-01-13 15:23:15 -05:00
committed by GitHub
co-authored by Andrew Nolte
parent 83f6b11235
commit e5eb7d8930
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1751,13 +1751,13 @@ void vl_get_value(const VerilatedVar* varp, void* varDatap, p_vpi_value valuep,
int i;
if (bits > t_outStrSz) {
// limit maximum size of output to size of buffer to prevent overrun.
bits = t_outStrSz;
VL_VPI_WARNING_(
__FILE__, __LINE__,
"%s: Truncating string value of %s for %s"
" as buffer size (%d, VL_VALUE_STRING_MAX_WORDS=%d) is less than required (%d)",
__func__, VerilatedVpiError::strFromVpiVal(valuep->format), fullname, t_outStrSz,
VL_VALUE_STRING_MAX_WORDS, bits);
bits = t_outStrSz;
}
for (i = 0; i < bits; ++i) {
const char val = (datap[i >> 3] >> (i & 7)) & 1;