verilator/test_regress/t/t_case_enum_complete.v

30 lines
484 B
Systemverilog
Raw Normal View History

// DESCRIPTION: Verilator: SystemVerilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2022 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module t;
2026-03-08 23:26:40 +01:00
enum logic [2:0] {
S0,
S1,
S2
} state;
2026-03-08 23:26:40 +01:00
int v = 0;
2026-03-08 23:26:40 +01:00
initial begin
state = S1;
2026-03-08 23:26:40 +01:00
unique case (state)
S0, S2: $stop;
S1: v++;
endcase
unique case (state)
S2: $stop;
default: v++;
endcase
end
endmodule