yosys/tests/ice40/shifter.v

23 lines
284 B
Coq
Raw Normal View History

2019-08-30 01:45:33 -05:00
module top (
out,
clk,
in
);
output [7:0] out;
input signed clk, in;
reg signed [7:0] out = 0;
always @(posedge clk)
begin
`ifndef BUG
out <= out >> 1;
out[7] <= in;
`else
out <= out << 1;
out[7] <= in;
`endif
end
endmodule