SourceForge has been redesigned. Learn more.

#649 False "Repeat expression must be constant" error


I am using icarus verilog 0.8.5 (the release delviered with Ubuntu Hardy)

I have a very small verilog file, that's compiling with other verilog simulators, but that fails with icarus verilog.

I reduced the testfile to the absolute minimum.
The original file was part of legacy verilog.

The error seems only to occur if two unrelated lines
occur in the verilog file.
If either of them is commented, then iverilog passes.

To produce the bug:
iverilog repeat_error.v

To comment the first assign statement (no more bug):
iverilog repeat_error.v -DNO_BUG1

To comment the second assign statement (no more bug):
iverilog repeat_error.v -DNO_BUG2


  • Somebody

    Somebody - 2009-02-10

    the file reproducing the bug

  • Cary R.

    Cary R. - 2009-02-10

    Basically the same comment here as your previous report. This fails with the latest V0.8 from git, but appears to work perfectly with V0.9.devel. The second bug appears to be fixed in the latest V0.8 since -DNO_BUG1 compiles and runs without a waring. Because of this using the latest V0.8 you could work around the problem by breaking this into two steps. Do the repeat into a temporary and then shift that result. I did that and the code looks correct. Minus one since this can be worked around using the latest version of V0.8 and this will be closed when V0.9 is released.

    FYI V0.9.devel is very stable and MUCH more complete than V0.8, so if you want to do serious Verilog work you should really investigate using it instead.

  • Cary R.

    Cary R. - 2009-02-10
    • priority: 5 --> 4
  • Cary R.

    Cary R. - 2009-03-23
    • status: open --> closed-out-of-date
  • Cary R.

    Cary R. - 2009-03-23

    We have released a new stable version of Icarus Verilog (V0.9) that for normal usage replaces the version this report was filed against (V0.8). The reported bug does not exist in the V0.9 release and V0.8 will no longer be supported. We are closing this report and suggest that you upgrade to V0.9 as soon as possible.


Log in to post a comment.