diff --git a/vvp/resolv.cc b/vvp/resolv.cc index 930641822..16f5cb8df 100644 --- a/vvp/resolv.cc +++ b/vvp/resolv.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: resolv.cc,v 1.20 2005/01/09 20:11:16 steve Exp $" +#ident "$Id: resolv.cc,v 1.21 2005/02/13 05:26:30 steve Exp $" #endif # include "resolv.h" @@ -77,12 +77,22 @@ void resolv_functor::recv_vec8(vvp_net_ptr_t port, vvp_vector8_t bit) out = resolve(out, val_[idx]); } + if (! hiz_.is_hiz()) { + for (unsigned idx = 0 ; idx < out.size() ; idx += 1) { + if (out.value(idx).is_hiz()) + out.set_bit(idx, hiz_); + } + } + vvp_send_vec8(ptr->out, out); } /* * $Log: resolv.cc,v $ + * Revision 1.21 2005/02/13 05:26:30 steve + * tri0 and tri1 resolvers must replace HiZ with 0/1 after resolution. + * * Revision 1.20 2005/01/09 20:11:16 steve * Add the .part/pv node and related functionality. * diff --git a/vvp/vvp_net.h b/vvp/vvp_net.h index f8c71e40f..31d22b6fb 100644 --- a/vvp/vvp_net.h +++ b/vvp/vvp_net.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#ident "$Id: vvp_net.h,v 1.15 2005/02/12 06:13:22 steve Exp $" +#ident "$Id: vvp_net.h,v 1.16 2005/02/13 05:26:30 steve Exp $" # include # include @@ -173,6 +173,8 @@ class vvp_scaler_t { // Get the vvp_bit4_t version of the value vvp_bit4_t value() const; + bool is_hiz() const { return value_ == 0; } + void dump(FILE*fd); private: @@ -573,6 +575,9 @@ class vvp_fun_signal : public vvp_net_fun_t { /* * $Log: vvp_net.h,v $ + * Revision 1.16 2005/02/13 05:26:30 steve + * tri0 and tri1 resolvers must replace HiZ with 0/1 after resolution. + * * Revision 1.15 2005/02/12 06:13:22 steve * Add debug dumps for vectors, and fix vvp_scaler_t make from BIT4_X values. *