[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
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #392

Can't unroll generate for with complicated incrementer/init/test

Added by Amir Gonnen over 1 year ago. Updated 3 months ago.

Status:Feature Start date:09/19/2011
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:Unsupported
Target version:-

Description

The following for loop:

genvar x;
...
for( x = 1; x < 24; x = ( x == 5 ) ? 10 : x + 1 )
Generates an error
Unsupported: Can't unroll generate for; missing add/sub for incrementer
For loop doesn't have genvar index, or is malformed

History

Updated by Wilson Snyder over 1 year ago

  • Category changed from Parser to Unsupported
  • Status changed from New to Assigned
  • Assignee set to Wilson Snyder

Yes, the unroller is currently pretty stupid. I'll get to this, but it is unlikely to be in the next month as it is a fairly large chunk of work.

Updated by Wilson Snyder over 1 year ago

BTW, using a temporary parameter may work (I'm not sure if a genvar temporary would or wouldn't.)

genvar y;
 generate for( y = 1; y < 24-5; y = y + 1 ) 
   parameter x = (y&lt;5) ? y : (y+5);  // 0..4, 10..

Updated by Wilson Snyder 3 months ago

  • Subject changed from Can't unroll generate for with complicated incrementer to Can't unroll generate for with complicated incrementer/init/test

Note the unroller also requires a simple initialization and condition.

If someone would like to try to patch this I can provide guidance; it should be a fairly easy starter project.

Also available in: Atom