Forum Discussion
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- Thanks for the prompt responses. I'm aware Quartus II does not support simulation and that I need work through ModelSim. I am running ModelSim Altera Starter Edition 10.3c but not seeing exactly how a testbench and associated FPGA design would be simply simulated in a similar fashion as I have been doing so in Xilinx ISE, clearly other steps to get to a working simulation are required. --- Quote End --- You're used to the Xilinx tools' integration of the simulation tool into the entire suite. Altera (and the other guys, too) doesn't do that. (Well, there's Native Link but ignore it for the moment.) I'm pretty sure that there are simple ModelSim tutorials online somewhere. But anyways: Start ModelSim AE standalone. Create a new project (File | New ... Project). Put the project somewhere. It'll ask you if you want to create a new file, or add an existing file, and create a simulation. Click "close." You'll see a window with the title "Project - "E:/Path/To/My/Project" on the top, and it'll have two tabs, "Library'" and "Project." Since the project is new, the Project tab is empty. Right-click in there and choose "add to project." options include "new file," "existing file," and others. If you've got sources you want to simulate, choose "existing file." Mouse around to your files. At some point you will have added all of your sources, including the test bench, and it will be time to simulate. first, ensure that all of the files are in the correct compilation order: right-click in the project area, choose Compile, then Compile order. Then compile everything. Finally. create a simulation configuration: right-click then Add to Project then Simulation Configuration. give it a name. In the "design" tab, look for the "work" library. Click the + to expand it. Look for the entity corresponding to your test bench. Click its + to expand, and select the test bench architecture. Click save. to run the simulation, doubleclick on the simulation configuration. Watch the transcript window, you'll see messages and such. When it's done, you should see a list of instances, objects and processes, as well as a WAVE window. (If you don't see the wave window, choose View -> Wave from the main menu. to add signals to the wave view, click on the instances you see in the sim view. You might need to click a + or two to expand. Then select signals in the Objects window. Click and drag to the wave view, or right-click and choose "add to wave." run the simulation by typing VSIM 3> run 1000 us in the transcript window. The VSIM 3> is a prompt. You can make the time anything you wish. Save the list of signals in the wave view by clicking in the wave view, then choosing File -> Save Format .. from the main menu. Give the file a name. (The .do extension means that it is saved as a macro, which is the standard thing.) To restart a simulation if you need to recompile sources, choose Simulate -> End Simulation from the main menu. Rerun the simulation by doubleclicking on the simulation configuration. Reload your saved signals into the wave view by typing: VSIM 10>do wave.do or whatever you called the waveform list macro file. good luck.