2022-12-01 00:42:21 +00:00
|
|
|
// DESCRIPTION: Verilator: SystemVerilog Test module
|
|
|
|
//
|
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
|
|
|
// any use, without warranty, 2022 by Wilson Snyder.
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
module t;
|
|
|
|
|
|
|
|
enum logic [2:0] {S0, S1, S2} state;
|
|
|
|
|
2023-09-14 11:22:49 +00:00
|
|
|
int v = 0;
|
|
|
|
|
2022-12-01 00:42:21 +00:00
|
|
|
initial begin
|
|
|
|
state = S1;
|
|
|
|
|
|
|
|
unique case (state)
|
2023-09-14 11:22:49 +00:00
|
|
|
S0, S2: $stop;
|
|
|
|
S1: v++;
|
|
|
|
endcase
|
|
|
|
unique case (state)
|
2022-12-01 00:42:21 +00:00
|
|
|
S2: $stop;
|
2023-09-14 11:22:49 +00:00
|
|
|
default: v++;
|
2022-12-01 00:42:21 +00:00
|
|
|
endcase
|
|
|
|
end
|
|
|
|
endmodule
|