Internals: Add opLogIf(f). No functional change. Merge from Jeremy Bennet.

This commit is contained in:
Wilson Snyder
2012-04-19 21:02:08 -04:00
parent 52024f4d80
commit 1b511dd130
3 changed files with 16 additions and 2 deletions
+12
View File
@@ -916,6 +916,18 @@ last:
return setSingleBits(outc);
}
V3Number& V3Number::opLogIf (const V3Number& lhs, const V3Number& rhs) {
// i op j, 1 bit return, max(L(lhs),L(rhs)) calculation, careful need to
// X/Z extend. Use opLogNot and opLogOr to do this for us.
return opLogOr(opLogNot(lhs), rhs);
}
V3Number& V3Number::opLogIff (const V3Number& lhs, const V3Number& rhs) {
// i op j, 1 bit return, max(L(lhs),L(rhs)) calculation, careful need to
// X/Z extend. Use opLogNot and opLogXor to do this for us.
return opLogNot(opXor(lhs, rhs));
}
V3Number& V3Number::opEq (const V3Number& lhs, const V3Number& rhs) {
// i op j, 1 bit return, max(L(lhs),L(rhs)) calculation, careful need to X/Z extend.
char outc = 1;