Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitwise reductions on signals with >1 packed dimension generates incorrect code #227

Closed
veripoolbot opened this issue Mar 23, 2010 · 5 comments
Closed

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Mar 23, 2010


Author Name: Byron Bradley (@bbradley)
Original Redmine Issue: 227 from https://www.veripool.org
Original Date: 2010-03-23
Original Assignee: Byron Bradley (@bbradley)


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.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 24, 2010


Original Redmine Comment
Author Name: Byron Bradley (@bbradley)
Original Date: 2010-03-24T22:32:25Z


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().
@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Apr 10, 2010


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-04-10T01:09:11Z


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.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Apr 22, 2010


Original Redmine Comment
Author Name: Byron Bradley (@bbradley)
Original Date: 2010-04-22T11:55:14Z


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.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Apr 22, 2010


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-04-22T13:41:04Z


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...

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Aug 9, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-08-09T02:06:55Z


This was resolved back in 3.802.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.