shell> cd ~
shell> mkdir ee552
shell> cd ee552
shell> mkdir lab1
shell> cd lab1
Now for Design Architect, we need to set some environment variables
so
type :
shell> setenv MGC_WD `pwd`
shell> setenv QUICKHDL $MGC_HOME/lib/quickhdl.ini
Note that `pwd` is enclosed in back quotes which should be above the
TAB key on your keyboard.
You might want to put "setenv QUICKHDL $MGC_HOME/lib/quickhdl.ini"
in your .login
file which is located as yourhomedir/.login
Because MGC_WD uses the pwd command, it will grab the current directory
(to see what
I mean type "pwd" in a shell window), so you want to be in your working
directory before you
type it in, so don't put it in your .login because it grabs your homedir
instead of your working
directory. Instead you can put this in a script that sits in
your project directory like this one,
once you have saved the script, you will need to make it executable
type:
shell> chmod 700 mymentorscript
QHSIM> force reset 1
If you are using a clock and you want to set your clock input to a repeating
signal use the syntax:
"force my_clock first_value first_delay, second_value second
delay -r clock_period", for example
QHSIM> force clock 0 0, 1 20 -r 40
This gives a signal that is initially '0' and changes to '1' after 20ns, repeating every 40ns.
Once you have forced your [input] signals to their initial values, you
can start the simulation by typing "run"
in the command window or click on the "RUN" button.
You will notice the simulation will only run for 100ns, this is the
default run length, you can change this by
clicking on the "Options" menu of the command window and select "Properties",
then change the "default
run" value to the length you desire. You can also change the
run length while using the "run" command by
using the syntax "run run_length", for example
QHSIM> run 500
This will run for 500 ns.
To load a new simulation without using Design Architect ("da"),
you can do so by clicking on the
"File" menu of the command window and select "Load New Design".
This will take you back to
the "Startup" window that you first saw when you started qhsim from
da.
Restarting a Simulation:
To restart a simulation which will clear your forced signals and waveforms,
you can type "restart -f"
in the command window. Alternatively you can click on the "File"
menu and select "Restart design" and
click "OK" after that.
Creating a WORK library:
If you haven't already, you will need to create a WORK library,
this is normally a directory in your project/lab directory.
Before you do this make sure you are in your working directory and
then type
shell> qhlib work
Do not use "mkdir" to create this directory, this directory has special properties which qhlib needs to set.
Compiling a file:
Once you have created the work directory, you can compile your file by typing:
shell> qvhcom myfile.vhd
if you are using VHDL93, you need to specify -93 as a compile option like this
shell> qvhcom -93 myfile.vhd
The compiler will automatically put your entity into the work directory (unlike "da" which needs explicit definition).
Simulating a design:
The simulator is started by typing
shell> qhsim
and it will come up similar to if you had started it from "da".
Because the simulator needs "X", you will need to be physically in front
of an X terminal with the correct options (such
as the DISPLAY environment variable) set. If it starts, complains
and then dies this is probably why.
If you want to work at home, you can login and use the command line tools with the exception of qhsim using a telnet or xterm.
If you have a high speed connection such as ISDN or a cable modem, look
at this appnote
from last year about setting
up a X server to run "da" from home. This appnote is aimed at
Windows users, but UNIX (or Linux, *BSD) users
should be able to glean something from this.
Working in other UNIX Labs
If you can't work in CEB 531 because it is in use or full, then you can work one of the other UNIX labs such as:
CEB 540 (Gecko Lab) : This lab has "da" locally available, but
your files from CEB 531 are not available here so you will need
to copy them across using FTP. You can also login into one of
the CEB 531 machines (cabXX.labs.ualberta.ca) and work
remotely using the command line tools including qhsim.
CAB 311 (Hinton Lab) : This lab does not have "da", but you can login
into CEB 531 and use the command line tools including qhsim.