diff --git a/Changes b/Changes index 5ff7557ed..2095c0bad 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix SystemC compiles with VPI, bug1081. [Arthur Kahlich] +**** Fix error on wide numbers that represent small msb/lsb, msg1991. [Mandy Xu] + * Verilator 3.886 2016-07-30 diff --git a/src/V3Number.cpp b/src/V3Number.cpp index 3f741e97c..fadbd91d9 100644 --- a/src/V3Number.cpp +++ b/src/V3Number.cpp @@ -605,7 +605,10 @@ string V3Number::displayed(FileLine*fl, const string& vformat) const { uint32_t V3Number::toUInt() const { UASSERT(!isFourState(),"toUInt with 4-state "<<*this); - UASSERT((width()<33 || (width()<65 && m_value[1]==0)), "Value too wide "<<*this); + // We allow wide numbers that represent values <= 32 bits + for (int i=1; i