Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE/CoE 535 : Attig 1 ModelSim Tutorial for CSE 535 Michael Attig

Similar presentations


Presentation on theme: "CSE/CoE 535 : Attig 1 ModelSim Tutorial for CSE 535 Michael Attig"— Presentation transcript:

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

2 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 3 Step 1 – Setting up Library Directory Open a Cygwin Window –Engineering  FPGA Tools  Cygwin Enter the ‘sim’ directory Type ‘vlib work’

4 CSE/CoE 535 : Attig 4 Step 2 – Compiling Your Design Type ‘make compile’ to compile your vhd files

5 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 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 CSE/CoE 535 : Attig 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.do


Download ppt "CSE/CoE 535 : Attig 1 ModelSim Tutorial for CSE 535 Michael Attig"

Similar presentations


Ads by Google