Resolv do not propogate inputs that do not change.
This commit is contained in:
parent
4ba195282d
commit
466ab5c2c7
|
|
@ -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.23 2005/04/13 06:34:20 steve Exp $"
|
||||
#ident "$Id: resolv.cc,v 1.24 2005/06/15 00:47:15 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "resolv.h"
|
||||
|
|
@ -64,6 +64,9 @@ void resolv_functor::recv_vec8(vvp_net_ptr_t port, vvp_vector8_t bit)
|
|||
unsigned pdx = port.port();
|
||||
vvp_net_t*ptr = port.ptr();
|
||||
|
||||
if (val_[pdx].eeq(bit))
|
||||
return;
|
||||
|
||||
val_[pdx] = bit;
|
||||
|
||||
vvp_vector8_t out (bit);
|
||||
|
|
@ -90,6 +93,9 @@ void resolv_functor::recv_vec8(vvp_net_ptr_t port, vvp_vector8_t bit)
|
|||
|
||||
/*
|
||||
* $Log: resolv.cc,v $
|
||||
* Revision 1.24 2005/06/15 00:47:15 steve
|
||||
* Resolv do not propogate inputs that do not change.
|
||||
*
|
||||
* Revision 1.23 2005/04/13 06:34:20 steve
|
||||
* Add vvp driver functor for logic outputs,
|
||||
* Add ostream output operators for debugging.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,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.cc,v 1.31 2005/06/13 00:54:04 steve Exp $"
|
||||
#ident "$Id: vvp_net.cc,v 1.32 2005/06/15 00:47:15 steve Exp $"
|
||||
|
||||
# include "config.h"
|
||||
# include "vvp_net.h"
|
||||
|
|
@ -632,6 +632,22 @@ void vvp_vector8_t::set_bit(unsigned idx, vvp_scalar_t val)
|
|||
bits_[idx] = val;
|
||||
}
|
||||
|
||||
bool vvp_vector8_t::eeq(const vvp_vector8_t&that) const
|
||||
{
|
||||
if (size_ != that.size_)
|
||||
return false;
|
||||
|
||||
if (size_ == 0)
|
||||
return true;
|
||||
|
||||
for (unsigned idx = 0 ; idx < size_ ; idx += 1) {
|
||||
if (! bits_[idx] .eeq( that.bits_[idx] ))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream&out, const vvp_vector8_t&that)
|
||||
{
|
||||
out << "C8<";
|
||||
|
|
@ -1393,6 +1409,9 @@ vvp_bit4_t compare_gtge_signed(const vvp_vector4_t&a,
|
|||
|
||||
/*
|
||||
* $Log: vvp_net.cc,v $
|
||||
* Revision 1.32 2005/06/15 00:47:15 steve
|
||||
* Resolv do not propogate inputs that do not change.
|
||||
*
|
||||
* Revision 1.31 2005/06/13 00:54:04 steve
|
||||
* More unified vec4 to hex string functions.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.33 2005/06/14 00:42:06 steve Exp $"
|
||||
#ident "$Id: vvp_net.h,v 1.34 2005/06/15 00:47:15 steve Exp $"
|
||||
|
||||
# include "config.h"
|
||||
# include <stddef.h>
|
||||
|
|
@ -196,6 +196,7 @@ class vvp_scalar_t {
|
|||
unsigned strength0() const;
|
||||
unsigned strength1() const;
|
||||
|
||||
bool eeq(vvp_scalar_t that) const { return value_ == that.value_; }
|
||||
bool is_hiz() const { return value_ == 0; }
|
||||
|
||||
private:
|
||||
|
|
@ -233,6 +234,9 @@ class vvp_vector8_t {
|
|||
vvp_scalar_t value(unsigned idx) const;
|
||||
void set_bit(unsigned idx, vvp_scalar_t val);
|
||||
|
||||
// Test that the vectors are exactly equal
|
||||
bool eeq(const vvp_vector8_t&that) const;
|
||||
|
||||
vvp_vector8_t(const vvp_vector8_t&that);
|
||||
vvp_vector8_t& operator= (const vvp_vector8_t&that);
|
||||
|
||||
|
|
@ -756,6 +760,9 @@ class vvp_wide_fun_t : public vvp_net_fun_t {
|
|||
|
||||
/*
|
||||
* $Log: vvp_net.h,v $
|
||||
* Revision 1.34 2005/06/15 00:47:15 steve
|
||||
* Resolv do not propogate inputs that do not change.
|
||||
*
|
||||
* Revision 1.33 2005/06/14 00:42:06 steve
|
||||
* Accomodate fussy compilers.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue