# Student wiki

Tasks

This page is meant for recording student experiences on tool related problems you faced and how you solved them. You cannot post homework solutions here! Use the course login and password to edit this page.

If you faced a tricky problem with the tools or if you have discovered a tip post it here. I have included one entry to get this going. This is a student driven page. Neither I nor Asim will be adding anything to this page.

### 1.  How do I edit this wiki? !!

1. Hit the edit bottom on top right hand corner. If prompted for a password, use the course login and password.
2. You will see a text box with the "source" of the page in what is called wiki markup. The wiki we are using is called pmwiki. You will see tips on formatting on the bottom of the screen.
3. Go to the end of the text-box. Press ctrl-end or use the scroll bar.
4. Insert 3 exclamation points: `!!!` space and then the topic.
5. Press Enter.
6. Type the info
7. Hit the preview button. Scroll to bottom and you'll see a preview.
8. If you are satisfied hit save.

If you want to get fancy with the content you type, full description of Pmwiki's markup language is here.

### 2.  Bus values can be set only to 0 and 1. Cannot set 2, 3, 4 etc.

I set the times on the forces to be "absolute." When I did that, it basically erased the force that was at the times I was trying to run the forces at, and replaced them with the correct ones. I also exited quicksim and re-ran it, this also worked.

So this was my mistake earlier today and I just want to clarify. What actually happened is when I was trying to simulate the 4-1 mux on Quicksim, I was having difficulty getting the S(1:0) values to be something other than 0 or 1. It turns out what happens is (I think), that when you set 2 forces on an input at the same time, Quicksim leaves the force you set first at the time you desire (say 0 - 180 ns). Then, at 180 ns, it starts the next values (forces) you want. So in my case, when I was simulating it for 180 ns, it didn't show the values (forces) I had set for 2_11 or 2_10. So how do you get around this? If you "check" the absolute time box, it will overwrite the force at the times you specify. Or, you can close out quicksim, choose not to save, and restart quicksim, inputting the correct values this time. It will also "supposedly" (as in I read from my ECE/CS 352 Mentor Graphics Tutorial) work if you Reset the forces, which I believe is Simulation > Reset. Thus you can set bus values to be something larger than 1, as long as you have the proper number of bits to do so. -Matt Sinclair

### 3.  Non-editable Schematics

I ran into a problem where if I saved my file and then logged on later to edit it it would say that the file was non-editable and to change the edit setting...well I went to where the edit mode on/off select was and that didn't work. If you find yourself in the same boat what did work, however, was if you use this sequence:

cd mentor
cd <design you want to edit>
cd schematic
ls

you might see a file called something like sheet1.mgc_sheet1.lck...if you do there is your culprit.

just do a quick remove:
rm sheet1.mgc_sheet1.lck
when it asks if your sure hit y then enter and you should now be able to edit the file.

I'm not sure why my file got locked and if someone wants to share how that may have happened feel free...I had chosen editable when I set it up. Anyways hopefully this saves you from the couple of hours of frustration I experienced.-RR

### 4.  Font error with ssh -X

If you trying to remotely access the CS machines from a home machine using ssh -X and you get a font error, then it means you don't have the required fonts on your home machine.

There is a short term solution to this problem.

Copy over the files in `/s/mentor/MGC_HOME-2004/registry/fonts` to a directory say (/home/username/mentorfonts) on your local Linux machine. Then on your local Linux machine:

```prompt % xset fp+ /home/username/mentorfonts
prompt % ssh -X CSlogin@emperorXX.cs.wisc.edu

emperorXX() % dmgr
```

If you run into problems with this approach, I or Asim may be able to provide more help, but not guaranteed.

Benjamin Fortin adds that for MacOS

In case anyone asks, this process also works in Mac OS X 10.5 (Leopard). I put the fonts in ~/Library/Fonts/MentorFonts and used that location in the xset line (though that was oddly not in my path, so I had to specify /usr/X11/bin/xset). Also be sure to use X11, not the Terminal. If they're using Tiger (10.4), they'll probably need to use /usr/X11R6/bin/xset instead.)

Also see this. This link could potentially help address the problem if you are connecting from a Windows machine.

### 5.  How do I copy the font files for ssh to my local machine?

On your local machine, the command is:

```prompt% scp remote_username@emperorXX.cs.wisc.edu:/s/mentor/MGC_HOME-2004/registry/fonts/* home/local_username/mentorfonts
```

Where 'remote_username' is your cs login, XX is a number from 01 to 40, and 'local_username' is your local login name. This command also implies that the directory /home/local_username/mentorfonts has already been created.

### 6.  How do I create a tarball (*.tgz) file to hand in?

Either at a CS lab computer or at home using ssh use the following command:

```prompt% tar -cvzf file.tgz *
```

This will create an archive file called "file.tgz". When you run this command, all of the files and directories in the current directory are added to the archive, so make sure you only have the files you need to archive in this directory.

### 7.  vsim error: "#(vish-4014) No objects found matching..."

This error is known as a bug of ModelSim 6.2 and 6.3 when one wants to simulate a Verilog module. This bug occurs during the optimization process while the simulation mode is starting. The outcome is that you will not see some or all signals of that module and some other submodules (inputs, outputs, or/and internal signals) in the Objects window.

If you encounter this error, though it does not usually happen, then here are some solutions so far.

Set the variable VoptFlow in the modelsim.ini to 0.

or/and

Create a new project and add the Verilog files from the old project to this new one.

### 8.  Vcheck script

Copy the following into a file, filename.sh:

```#! /bin/csh -f
foreach d (*.v)
java Vcheck \$d > \$d.vcheck.out
end
```

Close the file and run chmod +x filename.sh. Then type ./filename.sh. This will Vcheck all the .v files in your current directory, assuming your Vcheck class files are also located there.

### 9.  How to print waveforms in Modelsim

From the File Menu;

```           Print postscript;
```

Option 1:

```    Choose the File-name radio button and type in a filename.
Call it wave.ps.
Then goto a shell prompt and:
prompt> lpr -P laser wave.ps
This will produce output on the printer laser: located in room 1359.

List of all available CS printers is here.
```
```    See attached screenshot.
```

Option 2:

```    Choose the Print-command radio button.
Fill in the textbox with the following string:
lpr -P laser

This will produce output on the printer laser: located in room 1359.

List of all available CS printers is here.
```

 Page last modified on March 03, 2009, visited 302 times