whitequark
ca866d384e
write_verilog: handle the $shift cell.
The implementation corresponds to the following Verilog, which is
lifted straight from simlib.v:
module \\$shift (A, B, Y);
parameter A_SIGNED = 0;
parameter B_SIGNED = 0;
parameter A_WIDTH = 0;
parameter B_WIDTH = 0;
parameter Y_WIDTH = 0;
input [A_WIDTH-1:0] A;
input [B_WIDTH-1:0] B;
output [Y_WIDTH-1:0] Y;
generate
if (B_SIGNED) begin:BLOCK1
assign Y = $signed(B) < 0 ? A << -B : A >> B;
end else begin:BLOCK2
assign Y = A >> B;
end
endgenerate
endmodule
2018-12-16 18:46:32 +00:00
..
2018-11-12 09:27:33 +01:00
2018-07-20 23:51:06 -07:00
2018-12-08 06:21:31 +01:00
2018-10-05 09:41:30 +02:00
2018-09-21 20:43:49 +02:00
2018-07-20 23:51:06 -07:00
2018-07-20 23:51:06 -07:00
2018-08-15 14:05:38 +02:00
2018-07-20 23:51:06 -07:00
2018-07-20 23:51:06 -07:00
2018-12-10 03:43:07 +01:00
2018-10-15 13:54:12 -04:00
2018-07-20 23:51:06 -07:00
2018-07-20 23:51:06 -07:00
2018-12-16 18:46:32 +00:00