[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  Schedule::Load
  SVN::S4
  Synopsys-modes
  SystemPerl
  Verilog-Pli
  Voneline
  Vregs
General Info
  Papers

Issue #227

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

Added by Byron Bradley about 2 years ago. Updated about 2 years ago.

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.

0001-Mark-packed-dimensions-in-arrays.patch (12.3 kB) Byron Bradley, 03/24/2010 10:32 pm

0002-modify-AstVar-dimensions-to-return-a-pair.patch (3.9 kB) Byron Bradley, 03/24/2010 10:32 pm

0003-Support-reduction-operations-on-multiple-packed-dime.patch (12.4 kB) Byron Bradley, 03/24/2010 10:32 pm

0004-Fix-slices-over-non-reduction-unary-operations.patch (3 kB) Byron Bradley, 04/22/2010 11:55 am

History

Updated by Byron Bradley about 2 years ago

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

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