diff options
| author | Andrew Waterman | 2015-08-25 17:24:16 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-08-25 17:24:16 -0700 |
| commit | 3d0ed2091a4b0028593a4d9dcb293303d03546e1 (patch) | |
| tree | 9409f6ead0390132d0aa3bceb7661c7b4af98eb0 /Makefile | |
| parent | 40bf74bfdf4d07f0d7171b77ae34004eb9c1fa11 (diff) | |
Fix Verilog backend for mixed signed-unsigned ops
Code like
add(UInt<1>(1), SInt<1>(1))
was resulting in Verilog like
$signed(1'h1) + $signed(1'sh1)
which is incorrect: it computes -2, not 0. The fix is to zero-extend the
unsigned operand, e.g.
$signed({1'b0,1'h1}) + $signed(1'sh1)
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
