Fix logic value returned for unambiguous HiZ1 strength.

If a strength aware net has an unambiguous HiZ1 strength, VVP treats
it as a logic '1'. It should be treated as a logic 'z'. An ambiguous
HiZ1/HiZ0 strength should also be treated as a logic 'z'.
This commit is contained in:
Martin Whitaker 2013-01-28 21:15:51 +00:00 committed by Cary R
parent 59ce217ce2
commit b176a6410d
1 changed files with 2 additions and 2 deletions

View File

@ -759,7 +759,7 @@ class vvp_scalar_t {
unsigned strength1() const;
bool eeq(vvp_scalar_t that) const { return value_ == that.value_; }
bool is_hiz() const { return value_ == 0; }
bool is_hiz() const { return (value_ & 0x77) == 0; }
private:
// This class and the vvp_vector8_t class are closely related,
@ -803,7 +803,7 @@ inline vvp_scalar_t::vvp_scalar_t(vvp_bit4_t val, unsigned str0, unsigned str1)
inline vvp_bit4_t vvp_scalar_t::value() const
{
if (value_ == 0) {
if ((value_ & 0x77) == 0) {
return BIT4_Z;
} else switch (value_ & 0x88) {
case 0x00: