Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Verilog] Modelsim problem of enum in simulation

Status
Not open for further replies.

sqx

Member level 1
Joined
Sep 21, 2018
Messages
34
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
347
For system verilog, I use "typedef enum {WAIT, WATCH, ASSERT} STATE;" in both module and testbench. The compiling is passed but when starting simulation, here comes the error:

** Error: (vsim-3906) F:/modelsim_projects/4/test_cd.v(23): Connection type 'test_cd_v_unit.enum int ' is incompatible with 'fsm_cd_v_unit.enum int ' for port (state): Enum types must match.

In both module and testbench, I use "STATE state, n_state; " for the definition of input and output. I think nothing is wrong but how can I make the simulation working?
 

Thanks! I defined STATE in a .vh file and included this file in both module an testbench, but Modelsim still created 2 unit packages. How can I fix this problem?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top