2 module enum_simple(input clk, input rst);
4 enum {s0, s1, s2, s3} test_enum;
5 typedef enum logic [1:0] {
10 states_t enum_const = ts1;
12 always @(posedge clk) begin
20 else if (test_enum == s1)
22 else if (test_enum == s2)
24 else if (test_enum == s3)
27 assert(1'b0); //should be unreachable
32 else if (state == ts1)
34 else if (state == ts2)
37 assert(1'b0); //should be unreachable
42 assert(state != 2'h3);
45 assert(enum_const == ts1);