#593 Conditional expression in signal range causes assert error


The following code segment causes the following error message:

Macintosh:~ trevorw$ iverilog test.v
test.v:6: assert: elab_expr.cc:2765: failed assertion use_wid > 0
sh: line 1: 5413 Done /Users/trevorw/install/lib/ivl/ivlpp -L -F/var/folders/OS/OSQFAgk5Fx8Xc-2eoudmtk+++TI/-Tmp-//ivrlg256bacd5 -f/var/folders/OS/OSQFAgk5Fx8Xc-2eoudmtk+++TI/-Tmp-//ivrlg56bacd5 -p/var/folders/OS/OSQFAgk5Fx8Xc-2eoudmtk+++TI/-Tmp-//ivrli56bacd5
5414 Abort trap | /Users/trevorw/install/lib/ivl/ivl -C/var/folders/OS/OSQFAgk5Fx8Xc-2eoudmtk+++TI/-Tmp-//ivrlh56bacd5 -C/Users/trevorw/install/lib/ivl/vvp.conf -- -


module main;

parameter A = 5;
parameter B = 10;

reg [((A > B)?(A-1):(B-1)):0] a;

initial begin
$dumpfile( "test.vcd" );
$dumpvars( 0, main );
a = {B{1'b0}};


  • Cary R.

    Cary R. - 2008-12-10
    • status: open --> open-works-for-me
  • Cary R.

    Cary R. - 2008-12-10

    This example is working using the latest development from git. Please test your original code using the latest git version and either provide a different example or close this report.

  • Cary R.

    Cary R. - 2008-12-12
    • milestone: 530321 --> v0.9
  • Trevor Williams

    Trevor Williams - 2008-12-12
    • status: open-works-for-me --> pending-works-for-me
  • Trevor Williams

    Trevor Williams - 2008-12-12

    I am changing the status of this bug to pending to indicate that I expect it to be fixed in the next release of Icarus Verilog but that I have not personally verified its status. I have no plans to work with git at the moment. I will change the status to Closed after I have verified it with the next release.

  • Cary R.

    Cary R. - 2008-12-12

    OK, that's fine. I don't know if we will be doing another snapshot before we release V0.9.0 with is the start of the release candidates for the V0.9 branch.

  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

  • SourceForge Robot

    • status: pending-works-for-me --> closed-works-for-me

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks