diff --git a/vvp/vthread.cc b/vvp/vthread.cc index ce7b91d33..1b87cbc22 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -1018,7 +1018,7 @@ bool of_ASSIGN_V0X1(vthread_t thr, vvp_code_t cp) if (off >= (long)sig->size()) return true; else if (off < 0 ) { // We fell off the LSB end. - if ((unsigned)-off > wid ) return true; + if ((unsigned)-off >= wid ) return true; // Trim the bits before the LSB wid += off; bit -= off; @@ -1055,7 +1055,7 @@ bool of_ASSIGN_V0X1D(vthread_t thr, vvp_code_t cp) if (off >= (long)sig->size()) return true; else if (off < 0 ) { // We fell off the LSB end. - if ((unsigned)-off > wid ) return true; + if ((unsigned)-off >= wid ) return true; // Trim the bits before the LSB wid += off; bit -= off; @@ -1094,7 +1094,7 @@ bool of_ASSIGN_V0X1E(vthread_t thr, vvp_code_t cp) return true; } else if (off < 0 ) { // We fell off the LSB end. - if ((unsigned)-off > wid ) { + if ((unsigned)-off >= wid ) { thr->event = 0; thr->ecount = 0; return true;