Modelsim problem - mixed VHDL,Verilog & VHO

M

Mark McDougall

I'm having problems getting a simulation running. Here's the recipe...

Quartus output VHO file - contains VHDL & Verilog components.
Testbench components - VHDL & Verilog components.

Note (and I *think* this is part of the problem) the VHO file contains a
certain verilog modle, whilst the testbench also contains an instance of
the same module, albeit with *different* parameter values.

Attempting to start the simulation under ModelSim ('vsim') loads a bunch
of structures from the library, and then halts with an error that just
does *not* make any sense at all!

The error is "irda_peripheral.v(155) The width (1) of VHDL port
'addr_cnt_out_2' does not match the width (5) of its Verilog connection
(3rd connection)".

This error occurs in the file that contains a 2nd instance of the
verilog module, and the 3rd connection is indeed a vector whose width is
specified with a parameter - which incidently differs from the value for
the instance inside the VHO file.

However:

* addr_cnt_out is internal to the VHO and not connected to the instance
in this file at all.
* neither of the parameters specify a width of '1' for the vector.

I suspect Modelsim is getting confused between the instance in the VHO
file and the instance in irda_peripheral.v and is having trouble wiring
up the ports?!?

Anyone else had a similar experience?

Regards,
 
M

Mike Treseler

Mark said:
I'm having problems getting a simulation running. Here's the recipe...
Quartus output VHO file - contains VHDL & Verilog components.
Testbench components - VHDL & Verilog components.

Maybe you need a mixed language license from Mentor.

-- Mike Treseler
 
M

Mark McDougall

Mike said:
Maybe you need a mixed language license from Mentor.

Already have, been running behavioural simulation with mixed-language
for yonks!

Regards,
 
M

Mark McDougall

I should probably also add, I have done successful post-PAR simulation
using VHO in the past on an ancestor of this very design! I didn't have
the verilog module that is seemingly causing my current problems...

Regards,
 
P

Paul Uiterlinden

Mark said:
I'm having problems getting a simulation running. Here's the
recipe...

Quartus output VHO file - contains VHDL & Verilog components.
Testbench components - VHDL & Verilog components.

Note (and I *think* this is part of the problem) the VHO file
contains a certain verilog modle, whilst the testbench also contains
an instance of the same module, albeit with *different* parameter
values.

Have a look in the ModelSim User's Manual, in chapter 'Compiling
Verilog Files'. There is a paragraph "Handling sub-modules with
common names". It mentions the special meaning of the vsim option
-L work:

"When you specify -L work first in the search library arguments you
are directing vsim to search for the instantiated module or UDP in
the library that contains the module that does the instantiation."

I'm not sure if this is exactly your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top