COMP3211

From CSESoc Wiki
Jump to: navigation, search

This is a student wiki for COMP3211 Computer Architecture. Last updated: 16s1

Disclaimer: If in doubt about anything, consult actual course staff/tutors! Course also may change in the future.

First off, the first lab asks you to read the COMP3211 Simulation Tutorial. Well, you should definitely do this (or at least skim through it)!

Downloading the tools on your own computer

(1) ModelSim-Altera Starter Edition. You will be using this for simulation. It's on the course website, but you can also get it from the Altera website. The lab machines were running version 6.6d at time of writing, although newer versions should be fine too.

Some students choose to use ModelSim on Linux. Follow the steps outlined here.

(2) To write the actual VHDL, Xilinx ISE is available on the lab machines. Version 11.1 from the course website should work (on 64-bit systems: run \bin\nt\xsetup.exe directly as Administrator). You basically just need any good text editor. Feel free to even just continue using Quartus II (as from COMP3222).

The latest and final version of Xilinx ISE 14.7 needs to be patched for 64-bit (32-bit Project Navigator may work), and is not compatible with ModelSim-Altera Starter Edition, so stick to older versions.

Drawing the datapath

To transfer your pencil & paper block diagram to digital format, you’re going to need some diagramming software.

Pick your poison; please add to this list if you discover a worthy (and free!) app:

  • Draw.io
  • PowerPoint

How to save your customisations to the waveforms view

To build your own waveform view, you can manually write ModelSim commands to add every desired signal to the waveform, one by one, but this is very slow. These commands are then typically saved in a file named wave.do, which should be called by your main ModelSim Compile Script, probably named run.do. See that Simulation Tutorial if you don't know what run.do is.

Alternatively, with your design loaded and simulated in ModelSim, you can drag and drop signals onto the Waves Window pane. Then, making sure that the Waves Window pane is currently selected, hit CTRL+S. This will prompt a dialog to save the commands for your customised waveform view (i.e. wave.do).

(You drag signals from the Objects pane - make sure your UUT is selected)

Tips

  • The order of signals can also be rearranged in the Wave pane.
  • Signals can also be grouped together, or labelled (Properties>Display name).

Loading memory from file

The COMP3211 Simulation Tutorial gives an example in Chapter 3. The text files from disk are to be loaded within the memory unit vhdl file(s), not by the actual testbench if that's what you were thinking.

I uninstalled Xilinx ISE 11, and now I can't install MSI files

The uninstaller breaks Windows by removing the %TEMP% and %TMP% system environment variables. This causes MSI files opened from Windows Explorer to throw errors 2502, 2503. Save the following as fix.reg and run it to restore the variables. Then restart the Windows Installer Service by running net stop MSIServer followed by net start MSIServer in an elevated command prompt, or simply restart the PC.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"TEMP"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,54,00,45,00,4d,00,50,00,00,00
"TMP"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,\
  25,00,5c,00,54,00,45,00,4d,00,50,00,00,00