diff options
Diffstat (limited to 'tests/arch/common/shifter.v')
-rw-r--r-- | tests/arch/common/shifter.v | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/tests/arch/common/shifter.v b/tests/arch/common/shifter.v index cace3b588..06e63c9af 100644 --- a/tests/arch/common/shifter.v +++ b/tests/arch/common/shifter.v @@ -1,11 +1,17 @@ -module top(out, clk, in);
- output [7:0] out;
- input signed clk, in;
- reg signed [7:0] out = 0;
-
- always @(posedge clk)
- begin
- out <= out >> 1;
- out[7] <= in;
- end
-endmodule
+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 |