You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running this test code, Icarus Verilog returns:
00000000000000000000000000000000
However, when testing the same code with Jasper 2022.09, Jasper returns:
00000000000000000000000000011100
Our initial analysis suggests that the 'shift' variable was treated as signed and sign-extended, which resulted in a left shift amount that was too large, causing the final result to be zero.
According to the IEEE Standard for SystemVerilog 1800-2017:
The right operand is always treated as an unsigned number and has no effect on the signedness of the result.
Therefore, during the extension, 'shift' should be treated as unsigned, and the final shift amount should be 2'b10 (which is 2 in decimal). The correct result should be ’11100‘, not all zeros.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. This seems to be a general issue when loading a vector slice into an index register (a implementation detail of the icarus runtime).
Fix is in #1166. Still need to write a few regression test cases before this is ready to be merged.
When running this test code, Icarus Verilog returns:
However, when testing the same code with Jasper 2022.09, Jasper returns:
Our initial analysis suggests that the 'shift' variable was treated as signed and sign-extended, which resulted in a left shift amount that was too large, causing the final result to be zero.
According to the IEEE Standard for SystemVerilog 1800-2017:
Therefore, during the extension, 'shift' should be treated as unsigned, and the final shift amount should be 2'b10 (which is 2 in decimal). The correct result should be ’11100‘, not all zeros.
The text was updated successfully, but these errors were encountered: