diff --git a/vvm/vvm.h b/vvm/vvm.h index 285befce1..2e1fc1f0d 100644 --- a/vvm/vvm.h +++ b/vvm/vvm.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm.h,v 1.7 1999/05/03 01:51:29 steve Exp $" +#ident "$Id: vvm.h,v 1.8 1999/06/07 03:40:22 steve Exp $" #endif # include @@ -71,6 +71,15 @@ inline vvm_bit_t operator ^ (vvm_bit_t l, vvm_bit_t r) return (r == V0)? V1 : V0; } +inline vvm_bit_t less_with_cascade(vvm_bit_t l, vvm_bit_t r, vvm_bit_t c) +{ + if (l == Vx) return Vx; + if (r == Vx) return Vx; + if (l > r) return V0; + if (l < r) return V1; + return c; +} + extern vvm_bit_t add_with_carry(vvm_bit_t l, vvm_bit_t r, vvm_bit_t&carry); inline vvm_bit_t not(vvm_bit_t l) @@ -268,6 +277,9 @@ template class vvm_signal_t : public vvm_monitor_t { /* * $Log: vvm.h,v $ + * Revision 1.8 1999/06/07 03:40:22 steve + * Implement the < binary operator. + * * Revision 1.7 1999/05/03 01:51:29 steve * Restore support for wait event control. * diff --git a/vvm/vvm_func.h b/vvm/vvm_func.h index fb0d9db43..a0ee446f5 100644 --- a/vvm/vvm_func.h +++ b/vvm/vvm_func.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm_func.h,v 1.5 1999/06/07 02:23:31 steve Exp $" +#ident "$Id: vvm_func.h,v 1.6 1999/06/07 03:40:22 steve Exp $" #endif # include "vvm.h" @@ -252,7 +252,13 @@ template vvm_bitset_t<1> vvm_binop_lt(const vvm_bitset_t&l, const vvm_bitset_t&r) { - assert(0); // Not implemented yet. + assert(LW == RW); + vvm_bitset_t<1> result; + result[0] = V0; + for (unsigned idx = 0 ; idx < LW ; idx += 1) + result[0] = less_with_cascade(l[idx], r[idx], result[0]); + + return result; } template @@ -277,6 +283,9 @@ vvm_bitset_t<1> vvm_binop_lor(const vvm_bitset_t&l, /* * $Log: vvm_func.h,v $ + * Revision 1.6 1999/06/07 03:40:22 steve + * Implement the < binary operator. + * * Revision 1.5 1999/06/07 02:23:31 steve * Support non-blocking assignment down to vvm. *