Forum Discussion
Altera_Forum
Honored Contributor
7 years agoHi,
--- Quote Start --- Can I write on SystemVerilog two structs in one module and then make enum in each struct with the same literal ("IDLE" for example)? Is another struct means another scope? If not can anyone describe what structs are used for? If yes can anyone describe to me how to win ModelSim-Altera? --- Quote End --- You can use two structs in one module but you can`t use the same enumeration constants between two different enumeration types (since two structs have individual scope) inside two different structs. No two enum types can use the same enumeration constants between them If you want to use the same enumeration constants between two different enumeration types, you'll have to create unique prefixes or suffixes for them (for example IDLE_1) Best Regards Vikas Jathar (This message was posted on behalf of Intel Corporation)