Getting Started with ModelSim and Xilinx ISE tools
ModelSim – Create the work area 1. Start ModelSim: Start → All Programs → Engineering → Modelsim 6.5b. 2. Create a new directory for your ModelSim project files and change to that directory. 1. Use File → Change Directory... to change the current directory. 2. Use File → New → Folder to create a new directory. 3. (Alternatively, you can type “cd” and “mkdir” at the console to do the same things.) 3. Create a new
ModelSim – Compiling and simulating 1. Compile the source files. Click Compile → Compile …. Select all HDL source files to compile in the window and then click Compile. Close the compile window by clicking Done. 1. If there are any errors, open up the source file and go to the line number indicated in the error message. Fix each error and recompile. 2. Start the simulation by clicking Simulate → Start Simulation …. 1. Expand library work and select your test bench module. 2. Click Optimization Options... and select Apply full visibility to all modules (full debug). Click Ok. 3. Click Ok again to then start the simulation. 3. In the instances window (on the left of the screen), right click on the test bench module name and click Add → To Wave → All items in region. 4. Restart and rerun the simulation by typing in the console window “restart; run 1 us” (this will run for 1 us. You can change this to run for longer or shorter times.) 5. With the waveform viewer window active (just click on it to activate it), then zoom full the window. This can be done one of several different ways: 1. Strokes – Hold down the middle mouse button and drag the mouse to the upper left direction and release. 2. Toolbar – Click the Zoom Full toolbar icon. 3. Keyboard key – Hit the “F” shortcut key. 4. Menu – Click Wave → Zoom → Zoom Full. 6. The waveform viewer window (by default) shows the extended name of each signal. This can be toggled to show the shortened name by looking for the icons at the bottom-left of the waveform viewer window. The top-left icon (when hovering the mouse of it) should read Toggle leaf names ↔ full names. Click on this icon. 7. Change the radix of some signals, such as buses, to hex or decimal value by right-clicking on the signal and clicking Radix →
Xilinx ISE tools – Synthesizing your module 1. Above the hierarchy window, select the Implementation view. 2. In the Hierarchy window, select your top-level module. If it is not already set as the top-level, then right-click on it and click Set as Top Module. 3. In the Processes window, double-click on Synthesize to synthesize the module to hardware. (This will create an RTL schematic of the hardware description.) 4. When it is done, you can view the synthesis report by right-clicking on Synthesize, and clicking on View Text Report. Sections of interest are: 1. Device utilization summary – (number of slice registers, slice luts, etc.) 2. Timing summary – (estimated maximum clock frequency)