Verilator bug with shift, expression width and signedness #754
Labels
area: wrong runtime result
Issue involves an incorrect runtine result from Verilated model
resolution: fixed
Closed; fixed
Author Name: Clifford Wolf (@cliffordwolf)
Original Redmine Issue: 754 from https://www.veripool.org
Original Date: 2014-04-30
Original Assignee: Wilson Snyder (@wsnyder)
Verilator fb4928b seems to have troubles with the following expressions. It seems to correctly interpret -2'sd1 as the value 3, but then has problems identifying the correct bit width for the expression and sign extends it even though the result of << should be unsigned.
Crosscheck: Vivado 2013.4, XST 14.7, Xsim 2013.4 and Modelsim 10.1d implement this correctly.
Self-contained test case:
http://svn.clifford.at/handicraft/2014/verilatortest/test007.v
http://svn.clifford.at/handicraft/2014/verilatortest/test007.cc
http://svn.clifford.at/handicraft/2014/verilatortest/test007.sh
Verilog testbench for comparison:
http://svn.clifford.at/handicraft/2014/verilatortest/test007_tb.v
The text was updated successfully, but these errors were encountered: