mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Small bug fixes in $not, $neg, and $shiftx models
This commit is contained in:
parent
acd7a99aef
commit
c38283dbd0
3 changed files with 8 additions and 9 deletions
|
@ -108,13 +108,12 @@ parameter Y_WIDTH = 0;
|
|||
|
||||
input [A_WIDTH-1:0] A;
|
||||
output [Y_WIDTH-1:0] Y;
|
||||
wire [Y_WIDTH-1:0] tmp;
|
||||
|
||||
generate
|
||||
if (A_SIGNED) begin:BLOCK1
|
||||
assign tmp = $signed(A), Y = -tmp;
|
||||
assign Y = -$signed(A);
|
||||
end else begin:BLOCK2
|
||||
assign tmp = A, Y = -tmp;
|
||||
assign Y = -A;
|
||||
end
|
||||
endgenerate
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue