Commit Graph

10 Commits

Author SHA1 Message Date
Emil J e0d3bbf3c3
Merge pull request #4452 from phsauter/shiftadd-underflow-fix
peepopt: avoid shift-amount underflow
2024-08-19 15:45:46 +02:00
Philippe Sauter 2f0f10cb87 peepopt: limit padding from shiftadd
The input to a shift operation is padded.
This reduced the final number of MUX cells
but during techmap it can create huge
temporary multiplexers in the log shifter.
This significantly increases runtime and resources.

A limit is added with a warning when it is used.
2024-06-14 15:33:03 +02:00
Philippe Sauter 74e504330a peepopt: fix sign check in shiftadd 2024-06-14 13:01:18 +02:00
phsauter 34b5c6d062 peepopt: avoid shift-amount underflow 2024-06-13 23:30:07 +02:00
Philippe Sauter cbdf9b2f9c peepopt: handle empty src-attribute in shiftadd 2024-01-31 13:07:01 +01:00
Philippe Sauter 7f8b6dd982 peepopt: delete unnecessary comment in shiftadd 2024-01-30 09:51:21 +01:00
Philippe Sauter 68a9aa7c29 peepopt: handle offset too large in `shiftadd`
If the offset is larger than the signal itself,
meaning the signal is completely shifted out,
it tried to extract a negative amount of bits from the old signal.

This RTL pattern is suspicious since it is a complicated way of
arriving at a constant value, so we warn the user.
2024-01-26 16:44:30 +01:00
phsauter 3618294bac peepopt: Add assert of consistent `shiftadd` data 2023-11-06 16:35:00 +01:00
phsauter 9ca57d9f13 peepopt: fix and refactor `shiftadd`
- moved all selection and filtering logic to the match block
- applied less-verbose code suggestions
- removed constraint on number of bits in shift-amount
- added check for possible wrap-arround in the operation
2023-11-06 14:01:37 +01:00
Philippe Sauter 72c6a01e67 peepopt: Add initial `shiftadd` pattern 2023-11-06 14:01:37 +01:00