Quartus cannot run modelsim altera
I have Quartus set up to use a custom compile script for modelsim, which is called msim_compile.do and looks like. I then tried moving the package definition into another file packages/pkg_timer.sv, added that to my list of files at the top and all is great. package TimerPackage Īt first I had this at the top of my Timer.sv file, but then it only works if my files are compiled in the correct order, which with just one package is fine, I can just make sure Timer.sv is first in the list, but that sounds like bad practice. To allow passing this in from other modules I have the enum defined in a package. I want to use an enum here for clarity, so I can have ACTION_NONE and ACTION_TOGGLE. Quit Modelsim.I'm working a module, one parameter is a single bit input. At this point, I'm assuming that everything works as expected and we now want to program our chip.
This is just to show you how things actually work. You also should do much, much more simulating that what is here. You'll have to look very closely at your output to see that things are actually working as expected. You'll then have to play around with the zoom on the window to get it so that you can see the clock and the results. This is going to be much too short, so change the length to 10000 ps and click run. Then drag all the objects (button1, button4, led1, etc.) in the Objects window to the Wave window so that they will be plotted.Ĭlick the Run Simulation button to run the simulation for 100ps. Just make a clock on button1 to simulate pushing the button Map the ports from the dut to this testbench dut = device under test (same name as top project from Quartus) Create an implementation of the entityĪrchitecture testbench1 of test_counter_3bit is Here is the text for a very simple testbench. So create a new one, File -> New -> Source -> VHDL We need to create a testbench to use to simulate the project. It will be in the work library when finished. Work is the default name and is fine.Ĭompile the counter_3bit.vho file. Select the simulation/modelsim directory that is inside your project directory. Start Modelsim and do File -> Change Directory
We will use Modelsim-Altera to perform a functional simulation. Start the pin planner.ĭouble-click in the location to either select or type in the pins.Īfter assigning pins, recompile the project! Successful compilation will give this window. If you get errors, read through them to try to figure out the problem. Do not check the "Run gate-level simulation automatically after compilation" box.Ĭompile the project (click the purple triangle). Go to Assignments -> Settings and select Modelsim-Altera in the Tool name field. So we need to tell Quartus to generate the files needed by Modelsim. Later, we are going to use Modelsim to simulate our project. Use the 'Orthogonal Node Tool' to connect the parts so that your block diagram looks the same as the one below. The block diagram should now look something like this.
Repeat, but this time place two input pins. Find the tff, you'll want to place three in your block diagram. Click the Symbol Tool (located next to the A in the top bar of the block diagram) to bring up the symbol window. We need to place parts in our block diagram. Family: Max II, Device: EPM2210F324C3 and click FINISH.įile -> New and choose "Block Diagram/Schematic File" from the window that comes up. Hint, don't start the name with a number.Ĭhoose the device on our board. After starting Quartus, do File -> New Project Wizard