3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-27 11:08:48 +00:00
yosys/tests/arch/common/shifter.v
2026-06-23 07:24:59 +02:00

17 lines
254 B
Verilog

module top(out, clk, in);
output [7:0] out;
input signed clk, in;
reg signed [7:0] out;
`ifndef NO_INIT
initial begin
out = 0;
end
`endif
always @(posedge clk)
begin
out <= out >> 1;
out[7] <= in;
end
endmodule