2013-01-17 02:58:48 +01:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
|
|
|
|
// We see Verilator assumes a 1-bit parameter is a scalar rather than a 1-bit
|
|
|
|
|
// long vector. This causes the following code to fail.
|
|
|
|
|
//
|
|
|
|
|
// Other event drive simulators accept this.
|
|
|
|
|
//
|
2026-01-27 02:24:34 +01:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain.
|
|
|
|
|
// SPDX-FileCopyrightText: 2013 Jeremy Bennett
|
2020-03-21 16:24:24 +01:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
2013-01-17 02:58:48 +01:00
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
module t (
|
|
|
|
|
input clk
|
|
|
|
|
);
|
2013-01-17 02:58:48 +01:00
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
// At this point it is ambiguous whether a is scalar or vector
|
|
|
|
|
parameter A = 1'b0;
|
|
|
|
|
wire b = A[0];
|
|
|
|
|
// Note however b[0] is illegal.
|
2013-01-17 02:58:48 +01:00
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
always @(posedge clk) begin
|
|
|
|
|
if (b == 1'b0) begin
|
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
|
$finish;
|
|
|
|
|
end
|
|
|
|
|
else begin
|
|
|
|
|
$stop;
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-01-17 02:58:48 +01:00
|
|
|
|
|
|
|
|
endmodule
|