aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch/common/shifter.v
blob: 06e63c9af69319e24d53897b14694ce8d8113229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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