1 / 11

ModelSim Tutorial for CSE 535

ModelSim Tutorial for CSE 535. Michael Attig ( mea1@arl.wustl.edu ). What is it?. ModelSim allows you to simulate VHDL code We will use ModelSim extensively to test and verify our designs. Spending the extra time to simulate your design can saves hours of in-lab testing.

gguzman
Download Presentation

ModelSim Tutorial for CSE 535

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ModelSim Tutorial for CSE 535 • Michael Attig (mea1@arl.wustl.edu)

  2. What is it? • ModelSim allows you to simulate VHDL code • We will use ModelSim extensively to test and verify our designs. • Spending the extra time to simulate your design can saves hours of in-lab testing.

  3. Step 1 – Setting up Library Directory • Open a Cygwin Window • Engineering  FPGA Tools  Cygwin • Enter the ‘sim’ directory • Type ‘vlib work’

  4. Step 2 – Compiling Your Design • Type ‘make compile’ to compile your vhd files

  5. Step 3 – Simulating Your Design • Type ‘vsim testbench’ to Simulate the testbench • The main ModelSim window will appear. • You can type the name of the window you would like to open (i.e. ‘view signals’), or view * for all windows • Alternatively, you can select what to view from the View Menu

  6. Step 4 – Add Signals to Wave Window • Highlight the Snort App Entity in the main window • The signals for this entity will appear in signals window • From the Signals Add Menu, choose Wave  Signals in Region – This adds the signals found within this particular entity

  7. Step 5 – Running the Simulation • With an input_IP.DAT file in your sim directory, you can now type ‘run 5000’ • The simulator will now generate the waveforms for the design.

  8. Step 6 – Typical Modifications – Signal Radix • To aid you in simulating, it is sometimes necessary to change the radix of your signals • Right click the signal, highlight radix, and select hexadecimal • You can do this for multiple signals at a time

  9. Typical Modifications – Inserting Dividers • Dividers help you decipher which signals belong to which module. • When you insert signals from many entities into the wave window, dividers can help. • To Insert a Divider, in the Insert menu of the wave window, click on Divider

  10. Typical Modifications – Signal Names • When you have many levels of entities, you don’t always want to see their path • You can just view the signal name • In the Tools Menu, select ‘Window Preferences’ • Change the Display Signal Path to 1 instead of 0 Change to 1

  11. Saving a Wave List • After you’ve set up your waveform list, you can save it so next time you simulate it can be reloaded. • In the File menu, select ‘Save Format’ • This will be saved as a .do file. • To reload this when restarting ModelSim, in the main window, type do <filename>.do

More Related