mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Refactor DFG IndependentBits analysis to work for any vertex. (#6209)
This used to be restricted to variable vertices, but now can handle arbitrary circular vertices that represent packed values. It also converges faster than the earlier version. Prep for resolving loops through arrays.
This commit is contained in:
@@ -2242,6 +2242,13 @@ V3Number& V3Number::opBufIf1(const V3Number& ens, const V3Number& if1s) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Sets all bits in range to the given value
|
||||
V3Number& V3Number::opSetRange(uint32_t lsb, uint32_t width, char bitValue) {
|
||||
const uint32_t msb = lsb + width - 1;
|
||||
for (uint32_t i = lsb; i <= msb; ++i) setBit(i, bitValue);
|
||||
return *this;
|
||||
}
|
||||
|
||||
V3Number& V3Number::opAssign(const V3Number& lhs) { return opAssignNonXZ(lhs, false); }
|
||||
V3Number& V3Number::opAssignNonXZ(const V3Number& lhs, bool ignoreXZ) {
|
||||
// Note may be a width change during the assign.
|
||||
|
||||
Reference in New Issue
Block a user