forked from github/verilator
Fix 32-bit OS VPI scan issue, bug615.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
parent
062eb85075
commit
2dd87b8384
3
Changes
3
Changes
@ -7,6 +7,9 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
**** Fix DETECTARRAY on packed structures, bug610. [Jeremy Bennett]
|
||||
|
||||
**** Fix 32-bit OS VPI scan issue, bug615. [Jeremy Bennett, Rich Porter]
|
||||
|
||||
|
||||
* Verilator 3.845 2013/02/04
|
||||
|
||||
*** Fix nested packed arrays and struct, bug600. [Jeremy Bennett]
|
||||
|
@ -839,7 +839,7 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
|
||||
case VLVT_UINT8 : snprintf(outStr, outStrSz+1, "%hhu", (unsigned int)*((CData*)(vop->varDatap()))); return;
|
||||
case VLVT_UINT16: snprintf(outStr, outStrSz+1, "%hu", (unsigned int)*((SData*)(vop->varDatap()))); return;
|
||||
case VLVT_UINT32: snprintf(outStr, outStrSz+1, "%u", (unsigned int)*((IData*)(vop->varDatap()))); return;
|
||||
case VLVT_UINT64: snprintf(outStr, outStrSz+1, "%lu", (unsigned long)*((QData*)(vop->varDatap()))); return;
|
||||
case VLVT_UINT64: snprintf(outStr, outStrSz+1, "%llu", (unsigned long long)*((QData*)(vop->varDatap()))); return;
|
||||
default:
|
||||
strcpy(outStr, "-1");
|
||||
_VL_VPI_ERROR(__FILE__, __LINE__, "%s: Unsupported format (%s) for %s, maximum limit is 64 bits",
|
||||
@ -1096,8 +1096,8 @@ vpiHandle vpi_put_value(vpiHandle object, p_vpi_value value_p,
|
||||
}
|
||||
} else if (value_p->format == vpiDecStrVal) {
|
||||
char remainder[16];
|
||||
unsigned long val;
|
||||
int success = sscanf(value_p->value.str, "%30lu%15s", &val, remainder);
|
||||
unsigned long long val;
|
||||
int success = sscanf(value_p->value.str, "%30llu%15s", &val, remainder);
|
||||
if (success < 1) {
|
||||
_VL_VPI_ERROR(__FILE__, __LINE__, "%s: Parsing failed for '%s' as value %s for %s",
|
||||
VL_FUNC, value_p->value.str, VerilatedVpiError::strFromVpiVal(value_p->format), vop->fullname());
|
||||
|
@ -54,9 +54,12 @@ sub printfll {
|
||||
my %names;
|
||||
foreach my $line (split /\n/, $grep) {
|
||||
next if $line !~ /%[a-z0-9]*ll/;
|
||||
next if $line !~ /\blong\S+long\b/; # Assume a cast
|
||||
print "$line\n";
|
||||
if ($line =~ /^([^:]+)/) {
|
||||
$names{$1} = 1;
|
||||
print "$line\n";
|
||||
} else {
|
||||
$names{UNKNOWN} = 1;
|
||||
}
|
||||
}
|
||||
if (keys %names) {
|
||||
|
Loading…
Reference in New Issue
Block a user