3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 01:54:10 +00:00

peepopt: Add assert of consistent shiftadd data

This commit is contained in:
phsauter 2023-11-06 16:35:00 +01:00
parent c3b8de54da
commit 3618294bac

View file

@ -85,10 +85,11 @@ endmatch
code
{
if (offset>0 && var_signed) {
log("I should not be here %x\n", var_signed);
reject;
}
// positive constant offset with a signed variable (index) cannot be handled
// the above filter should get rid of this case but 'offset' is calculated differently
// due to limitations of state-variables in pmgen
// it should only differ if previous passes create invalid data
log_assert(!(offset>0 && var_signed));
did_something = true;
log("shiftadd pattern in %s: shift=%s, add/sub=%s, offset: %d\n", \