The Quartus Altera models should also be extracted to d:/quartus_II_2.2/libraries. The current zip file with these libraries is in U:/installed_software/altera/quartus/modelsim_oem_56a_q22sp1_models.zip
In this example, the project directory is Y:/TDC/altera_symbol_test/model_test and the top level design is top_model_test.
In Quartus
Assignments-EDA Tool Settings:
Simulation: Modelsim (VHDL Output from Quartus)
Timing Analysis: Custom VHDL

After compilation, there will be a folder in the project directory called simulation/modelsim. In this directory, there will be two files, top_model_test.vho and top_model_test_vhd.sdo.
The most important thing to understand about Modelsim is the work directory. This is by default, the directory from which you call Modelsim, if you were using a dos window. If you start Modelsim from the Start menu in windows, the work directory is the d:\modeltech_5.6d\examples directory. When you invoke Modelsim from Design Architect, the work directory is your home directory (the location of My Documents.) Neither of these directories work well for us because we want the location to be on a drive that is shared by both the unix and windows machines. So, we need to set the working directory for ourselves.
We can either set up a communal workspace and map the work library to it or everyone can set up their own and map to it. It really doesn't matter. For the rest of these instructions, I am just going to set up a single directory called work inside the Quartus project directory.
Design Architect schematic: Y:/TDC/altera_symbol_test
Quartus model_test: Y:/TDC/altera_symbol_test/model_test
Quartus and3: Y:/TDC/altera_symbol_test/and3
Modelsim work directory:
Y:/TDC/altera_symbol_test/model_test/simulation/modelsim/work
model_test symbol location: Y:/TDC/altera_symbol_test/top_model_test
and3 symbol location: Y:/TDC/altera_symbol_test/top_and3
Notice that in this project there are two different Quartus projects that are going to be part of the Design Architect schematic. It would be nice to be able to have a work directory for each Quartus project, but I'm not sure that this will work. As, you can only specify one work directory in the modelsim.ini file. So, for this example, all compiled items will end up in the directory called work in the model_test project home.
You will also need to specify where the stratix library is. Do this
by mapping the name stratix to the location of the files.
vmap stratix d:/quartus_II_2.2/libraries/altera/vhdl/stratix

Compile the project

Set these options

File Name: Y:/TDC/altera_symbol_test/model_test/simulation/modelsim/top_model_test.vho Look at the shell window to see that it finished without any errors.

Next, generate the symbol with File-Generate-Symbol
Choose Source: Entity
Modelsim InitFile: d:/modeltech_5.6d/modelsim.ini You may have a
modelsim.ini in your home (U:/users/...) directory, which may or may
not work. The file you want to put here is the one that has the newly
created work directory in it. The correct one should look something
like:
[Library]
std = $MODEL_TECH/../std
ieee = $MODEL_TECH/../ieee
verilog = $MODEL_TECH/../verilog
vital2000 = $MODEL_TECH/../vital2000
std_developerskit = $MODEL_TECH/../std_developerskit
synopsys = $MODEL_TECH/../synopsys
qspro_fixed_lib =
S:/MGC_EN2002/MGC_HOME/pkgs/vsim_qspro/5.6/qspro_fixed_lib
stratix = d:/quartus_II_2.2/libraries/altera/vhdl/stratix
work = Y:/TDC/altera_symbol_test/model_test/simulation/modelsim/work
Library Logical Name: work
Entity Name: top_model_test
Default Architecture: Press the Choose Arch... button and pick the one
that appears. Note that if nothing appears and there is an error
message in the shell window, the environment variable NCDIR is probably
not set properly.
Directory: Y:/TDC/altera_symbol_test
Inside of this directory, a directory called top_model_test will be
created and a file called top_model_test.mgc_component.attr will be
created.

The new symbol appears

Check the symbol and save it. This completes the symbol creation.
Here is what the test schematic looks like:

Be sure to check and save it.
From the Design Manager, start QSPro on your schematic. Take all the
defaults from the QSPro window that comes up. You should now be able to
simulate your schematic. If you have any problems here, it's most
likely due to using a different modelsim.ini file than the one which
has the correct location of the work directory. This is why I deleted
any modelsim.ini file, except the one in the modelsim installation
directory.
Here are some quick instructions for using QSPro:
1. After QSPro is open, do Open Sheet and select your
schematic.
2. Setup-Open New Window-Trace
3. Select all the signals that you want to trace and click on the
TRACE button.
4. Unselect all the signals (F2) and select just one that you
want to put a force on.
5. Click ADD FORCE or ADD CLOCK to put a force on the wire
6. Repeat steps 4 and 5 for each signal that you want to put a
force on.
7. Click RUN and put a value in for the clock, the units are
ns. (Don't put any units in the time window.)
QSPro
Problems
After upgrading some software, we had problems starting the QSPro
program. The error message would be about the file
tcl83.dll. There are many copies of this file on the computer, as
it is supplied by Altera for Quartus software, Modeltech for Modelsim
software and Mentor Graphics for Nutc and FPGAdvantage software.
The workaround for the problem was to edit the PATH environment
variable so that d:\modeltech_5.6d\win32 was first. Once this was
done, QSPro worked fine.
If you change your Quartus design, you will need to recompile the .vho file, but do not need to generate a new symbol file unless the pins change.
Everything in this example was done in windows, but it will all work in unix with a few simple changes. First, make sure to check references. Most likely, you'll need to change everything from Y: to $DESIGNS. (I should have set it up this way in the beginning, but I forgot to use $DESIGNS.) Second, copy the default modelsim.ini (in /net/edg/disk3/modeltech.5.6d/modelsim.ini) to your home directory (/users/maryh). Then in an xterm, map the stratix and work (and any other required) directories with the following command:
vmap stratix /net/edg/disk3/modeltech.5.6d/altera/vhdl/stratix
vmap work
/net/designs/TDC/altera_symbol_test/model_test/simulation/modelsim/work
Everything else works as in windows.
Mary Heintz
June 10, 2003
Update: September 24, 2003