From 1814c24a907b5894cfbff6b9567c0589e089c660 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 25 Oct 2013 19:55:04 +0100 Subject: [PATCH] Fix pullup/pulldown behaviour for tri1/tri0 nets. Currently vvp only applies the pullup/pulldown for tri1/tri0 nets when the net is not driven. The correct behaviour is to treat the pullup/ pulldown as an extra driver (with pull strength). --- vvp/resolv.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vvp/resolv.cc b/vvp/resolv.cc index 5bbaf184b..4aef59ef5 100644 --- a/vvp/resolv.cc +++ b/vvp/resolv.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2010,2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2013 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -170,8 +170,8 @@ void resolv_tri::recv_vec8_(unsigned port, const vvp_vector8_t&bit) if (! hiz_value_.is_hiz()) { for (unsigned idx = 0 ; idx < val_[base].size() ; idx += 1) { - if (val_[base].value(idx).is_hiz()) - val_[base].set_bit(idx, hiz_value_); + val_[base].set_bit(idx, resolve(val_[base].value(idx), + hiz_value_)); } }