Why we need to install Cygwin?
- We need X-win support to run virsims, which is a tool for view
waveforms and debugging our verilog code.
- With X-win, we can run graphic interface software such as xemacs.
It's more convenient for those don't familiar with unix.
- Cygwin is free.
Computer labs: Cygwinx is available on campus in CC2 -113
and CC2-104.
Installation:
- Download cygwin setup program here: http://www.cygwin.com/setup.exe
- When downloading the cygwin tools and you get to teh packages
screen, be sure to expand the +Net listing and select openssh and
openssl and then expand the +X11 listing and select WindowMaker
and xorg-x11-base. (You can choose other packages as you like, such
as xemacs in +Editors). Install.
-
Cygwin by default runs the bash shell locally on your machine.
It will start in the directory you specify with the HOME environment
variable. To set an environment variable on XP, Right-click My
Computer, choose Advanced, and then Environment Variables at the
bottom. In the User Variables section click new, then create a
HOME environment variable with the value of your user directory.
For example, I created a directory called c:\users\hgao and made
my HOME environment variable be c:\users\hgao. The process is
similar on Windows 2000 machines.
-
The bash shell reads a file called .bashrc in your HOME directory.
Edit your .bashrc file. Here is my .bashrc:
alias vi=vim
alias h=history
alias c=clear
alias more=less
alias sr=source
alias rm='rm -i'
alias ls='ls -F'
alias f=finger
alias ssh='ssh -2'
alias ssh1='ssh -1'
alias traceroute='tracert'
alias gmake='make'
alias wt='echo -n ""'
alias xwinclip='xwinclip >& /dev/null &'
export USER=hgao
PS1="hgao@gretzky \!> "
gretzky is my machine name and the \! will give you an increasing
number for every command you type.
-
Double-click the Cygwin icon.
- Now you are ready to "ssh monroe.cs.ucf.edu -l [id]"
as using putty. For X-win support, you need to do more.
- In Cygwin, type "cp /etc/X11/xinit/xinitrc ~/.xinitrc"
and edit your .xinitrc to add a line at the begining of the file:
xhost +monroe.cs.ucf.edu
To start the X server from the cygwin window, simply type startx
at the command line. A new window will pop up.
- Now ssh to monroe from this window. Once on monroe you may need
to set you DISPLAY environment variable to your home machine. To
find out your IP address, type ipconfig in a local window and you
will see it. For example, it might say your IP Address is 132.170.107.51.
Then on monroe you can type setenv DISPLAY 132.170.107.51:0. Then
when you start virsims or other windows they should display on your
windows machine in the Cygwin X window. You can test by typing xterm
on monroe and seeing if it brings up a window on your home machine.
X traffic arrives on port 6000 so if you are behind a firewall you
need to open port 6000 and if you are behind a NATD box or residential
gateway, you need to redirect port 6000 on the gateway (the public
IP) to port 6000 of your private IP address (your PC).
To use virsims:
- cd to your lab0 directory. The following instruction is using
lab0 as an example.
- You can view the waveforms created by your Verilog code by editing
demofulladder.v and uncommenting the first two lines in the initial
block. Then make and run simv as before. This now produces a trace
file in your directory called vcdplus.vcd. To launch the VCS wave
viewer type:
virsims
This will bring up a VirSim toolbar. Choose waveform from this toolbar
to bring up the viewer. To load your trace file, choose Files->Open
from the File menu, then highlight the vcdplus.vpd file in the Files
window and hit OK. Back in the viewer, choose Window->Hierarchy
to bring up the signal selection window. Click on "main".
This was the top-level module name in your demofulladder.v file.
In the Signal Select window, choose the signals you want to add,
and then hit Add. Go ahead and add them all. You can X the window
when done. Back in the viewer you may wish to Zoom out 4 or 5 times
for better viewing. Check out your waveforms. This type of debugging
will become extremely useful as your Verilog designs get more complicated.
Via the File menu you can also Save your configuration so you don't
have to go through the signal selection process each time you start
VirSim.
Resources:
|