Issue #227
Bitwise reductions on signals with >1 packed dimension generates incorrect code
| Status: | Assigned | Start date: | 03/23/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Byron Bradley | % Done: | 0% |
|
| Category: | WrongRuntimeResult | |||
| Target version: | - |
Description
Code such as:
logic [3:0][7:0][1:0] vld; assign vld_or = |vld;gets treated as a normal slice and generates incorrect code. I have this working and will submit patches tomorrow, just need to do some more verification. The changes are mostly to V3Slice with some small changes elsewhere to differentiate between packed and unpacked dimensions.
History
Updated by Byron Bradley about 2 years ago
- File 0001-Mark-packed-dimensions-in-arrays.patch added
- File 0002-modify-AstVar-dimensions-to-return-a-pair.patch added
- File 0003-Support-reduction-operations-on-multiple-packed-dime.patch added
Three patches attached:
- Add isPacked() to AstArrayDType().
- Modify AstVar::dimensions to return a pair of packed/unpacked dimensions.
- Support the reduction operators (or, and, xor, xnor) in V3Slice. This includes a bug-fix to the ordering of dimensions to insertImplicit().
Updated by Wilson Snyder about 2 years ago
- Status changed from New to Resolved
Sorry, must have been asleep when I saw the mail about this.
Applied for 3.802+. Only changes were to add a Changes line, and a couple of gcc lint warnings.
Updated by Byron Bradley about 2 years ago
- File 0004-Fix-slices-over-non-reduction-unary-operations.patch added
- Status changed from Resolved to Assigned
Sorry Wilson, this change caused a regression where you have non-reduction unary operators working on multiple dimensions such as:
logic [3:0][7:0][1:0] not_lhs; logic [3:0][7:0][1:0] not_rhs; assign not_lhs = ~not_rhs;Fix and test-case attached.
Updated by Wilson Snyder about 2 years ago
Applied, thanks.
If we start needing to do more things on AstRed* it's better to make them each a subclass of a new AstNodeRed or somesuch, which in turn is a AstNodeUniop. It's not worth it for this one use though.
BTW sorry I botched your name, I'm trying (and obviously failing to) train myself to always cut-and-paste names rather than type...
Also available in: Atom
![[logo]](/img/veripool_small.png)