Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15479 Discussions

Instantiate VHDL Generics with Verilog code (for testbench)

Altera_Forum
Honored Contributor II
2,164 Views

Hello everybody. 

 

When I instanciate inputs and outpus of a verilog code with verilog testbench I use following structure: 

 

name_module MUT( .input_1(input_1), 

.input_2(input_2), 

.output_1(output_1), 

.output_2(output_2) 

); 

And I instanciate params with this strucure: 

 

defparam MUT.name_param = value. 

 

But I have a problem when module under test is vhdl code and testbench is verilog code. ModelSim fail when I use defparam for instanciate generics vhdl

 

in conclusion: 

somebody can say me the instruction for instanciate generics vhdl with verligo testbench? 

 

Thanks
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
799 Views

Hi, 

 

Just use the normal verilog method  

<module_name> # ( <verilog parameters/vhdl generics> ) <instance_name> ( );  

 

You don't need to use defparam.
Altera_Forum
Honored Contributor II
799 Views

Defparam is explicitly forbidden in the Modelsim User Manual for instantiating VHDL inside a Verilog testbench: 

 

 

--- Quote Start ---  

 

Generic Associations 

Generic associations are provided via the module instance parameter value list. List the values 

in the same order that the generics appear in the entity. Parameter assignment to generics is not 

case sensitive. 

 

The defparam statement is not allowed for setting generic values. 

 

--- Quote End ---  

Reply