LT supports different width objects.

This commit is contained in:
steve 1999-09-29 22:57:26 +00:00
parent db7044850a
commit 42006ec5f1
1 changed files with 14 additions and 3 deletions

View File

@ -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 <unsigned LW, unsigned RW>
vvm_bitset_t<1> vvm_binop_lt(const vvm_bitset_t<LW>&l,
const vvm_bitset_t<RW>&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<W> vvm_ternary(vvm_bit_t c, const vvm_bitset_t<W>&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
*