Can I write on SystemVerilog two structs in one module and then make enum in each struct with same literal (“IDLE” for example)? Is another struct means another scope?
Must it work or not?
`timescale 1 ns/ 1 ns
module test013_LITERAL (
input A,
input B,
output C
);
struct{enum{IDLE,
SOME_STAGE_1} FSM;
logic some_register;
} first_machine;
struct{enum{IDLE,
SOME_STAGE_2} FSM;
logic some_register;
} second_machine;
assign C = A ^ B;
endmodule