Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#593 Conditional expression in signal range causes assert error

v0.9
closed-works-for-me
nobody
5
2009-01-13
2008-12-10
Trevor Williams
No

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

Code:

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}};
#10;
$finish;
end

Discussion

  • 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
     
    • status: open-works-for-me --> pending-works-for-me
     
  • 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.

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

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