From 42006ec5f1bc6132aad1304b8ea8bc1c9213c52a Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 29 Sep 1999 22:57:26 +0000 Subject: [PATCH] LT supports different width objects. --- vvm/vvm_func.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/vvm/vvm_func.h b/vvm/vvm_func.h index 58f1e2aa4..699b38397 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.11 1999/09/29 18:36:04 steve Exp $" +#ident "$Id: vvm_func.h,v 1.12 1999/09/29 22:57:26 steve Exp $" #endif # include "vvm.h" @@ -409,12 +409,20 @@ template vvm_bitset_t<1> vvm_binop_lt(const vvm_bitset_t&l, const vvm_bitset_t&r) { - assert(LW == RW); vvm_bitset_t<1> result; result[0] = V0; - for (unsigned idx = 0 ; idx < LW ; idx += 1) + const unsigned common = (LW < RW)? LW : RW; + for (unsigned idx = 0 ; idx < common ; idx += 1) result[0] = less_with_cascade(l[idx], r[idx], result[0]); + if (LW > RW) { + for (unsigned idx = RW ; idx < LW ; idx += 1) + result[0] = less_with_cascade(l[idx], V0, result[0]); + } else { + for (unsigned idx = LW ; idx < RW ; idx += 1) + result[0] = less_with_cascade(V0, r[idx], result[0]); + } + return result; } @@ -521,6 +529,9 @@ vvm_bitset_t vvm_ternary(vvm_bit_t c, const vvm_bitset_t&t, /* * $Log: vvm_func.h,v $ + * Revision 1.12 1999/09/29 22:57:26 steve + * LT supports different width objects. + * * Revision 1.11 1999/09/29 18:36:04 steve * Full case support *