diff options
author | whitequark <whitequark@whitequark.org> | 2018-12-16 18:46:32 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2018-12-16 18:46:32 +0000 |
commit | ca866d384e666f27e2cd7bb80950d0a1dd7c0ebd (patch) | |
tree | 0977ea610066ce1ac20fee43df07bdb73edda37d /manual/.gitignore | |
parent | ddff75b60ab6b29bbc8425c7f5ac2e6ebbbf32a6 (diff) | |
download | yosys-ca866d384e666f27e2cd7bb80950d0a1dd7c0ebd.tar.gz yosys-ca866d384e666f27e2cd7bb80950d0a1dd7c0ebd.tar.bz2 yosys-ca866d384e666f27e2cd7bb80950d0a1dd7c0ebd.zip |
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
Diffstat (limited to 'manual/.gitignore')
0 files changed, 0 insertions, 0 deletions