Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

modlesim 6.6d

Altera_Forum
Honored Contributor II
2,587 Views

i am new to modlesim, i downloaded the latest version, i hope if someone tells me how to simulate vhdl program with modlesim in simple way

0 Kudos
19 Replies
Altera_Forum
Honored Contributor II
1,291 Views

Use these commands in the command window, or in a .do file: 

 

vcom <my_vhdl_file> 

vsim <my_entity> 

run 1ms
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

thanks for the reply,  

how can i enter some vlaues to my inputs to see the repose of the outputs in modlesim
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

You need to write a testbench in HDL.

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

is there any way we can force the inputs to be 1 or 0 and see the output, if not how to write testbench in HDL

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

you can only do inputs via a testbench. 

A testbench is just an HDL file, like any other, that instantiates your unit under test.
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

how to write this HDL file, is it done by the modlesim, or i have to create it, is there any information may help me in this

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

Its just a text file. What language is your design in?

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

if you mean the vhd file that i am simulating, it is already created and i am simulating it , or u mean different file beside the VHDL code program with extension vhd

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

the testbench is a completly separate VHDL file from your design - used only for the purpose of testing. Because it will not get synthesised, you can do all sorts of things you would otherwise not be allowed to do. 

 

For example, to generate a clock, you can do this: 

 

--100 MHz clock 

signal clk : std_logic := '1'; 

... 

clk <= not clk after 5 ns; 

 

you then create the other input signals however you want and connect them to the design under test, and then run the testbench in Modelsim. 

 

I think Quartus can create a testbench for you, but I usually just create them myself.
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

THE program written in VHDL codes by using quartusII

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

I suggest you ask more specific questions. You can write the testbench in quartus but you cannot compile it in there.

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

i think there is a way where we can force some inputs and see the outputs in modlesim

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

No there is not. 

 

The old quartus simulator allowed that, but that is not included in Quartus 10+
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

i can see it in modlesim after selecting new source , but do i need to write all the possible inputs

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

I suggest you focus your questions more clearly - it is not very clear what you are talking about.

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

my question is, as i have VHDL codes that are working fine and i simulated then in quartus ii, and i used the waveform file in quartus , it works fine 

i want to use modlesim to simulate the same vhdl code(program), so as i did in quartus i selected some values to the inputs and observed the output response.. 

is there a way i do the same in modlesim, putting some input values and see the outputs,
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

Like I said, the old quartus simulator supports what you are trying to do. You may be able to export this as a file Modelsim can understand, but usually you create another VHDL file as the testbench for modelsim. 

 

If you think they are working fine using the quartus simulator, why do you want to use modelsim?
0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

i want to work with modlesim, and try it,,, do u know to create this test bench for modlesim, is there automatic way

0 Kudos
Altera_Forum
Honored Contributor II
1,291 Views

You can also refer to the following user guide to create stimulus waveform using modelsim waveform editor. 

 

http://www.altera.com/literature/ug/ug_gs_msa_qii.pdf?gsa_pos=19&wt.oss_r=1&wt.oss=waveform editor 

 

For a design with complicated simulation, I would recommend you to create a testbench.
0 Kudos
Reply