yosys/tests/arch/common/shifter.v

18 lines
258 B
Verilog
Raw Normal View History

2021-06-09 05:16:33 -05:00
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
2021-06-09 05:16:33 -05:00
always @(posedge clk)
begin
out <= out >> 1;
out[7] <= in;
end
endmodule