Lab 1: Getting Set Up
When you're done with this lab you will have done the following things:
- Install and test GIT
- Get SSH working
- Try out Xilinx
- Simulate a simple schematic in xilinx
Throughout this entire lab (and this course), this web site assumes you are using the RHIT-supplied image of Windows and that you've completed the prelab. If you are not using the RHIT-supplied image, the steps may be slightly different. Your instructor is available for help.
This work is due at the end of the lab period. Let's begin!
1. Install and test GIT
Some of you may have GIT installed. To check, click the windows button and type "git". If you see "Git Bash" show up, you have GIT installed, so you can skip to step 3.
- Download Git for your computer from the Git SCM website. (You will probably want to click on "Windows" to get the one for your laptop.)
Run the installer and follow the instructions. Choose the default settings.
Open windows File Explorer and find a place where you want to do all your CSSE132 work.
NOTE: do not put the files into OneDrive. Xilinx and OneDrive do not work very well together. We will use GIT to back up your files.Right-click on the background of your chosen folder and select "Git Bash Here".
Clone your repository using a command like this, replacing "username" with your RHIT username. NOTE: "username" appears twice; replace it both times. Use the
git clone
command:git clone ssh://username@gitter.csse.rose-hulman.edu/srv/repos/2021c-csse132-username.git
Use your RHIT password when asked for a password.
NOTE: GIT may ask you if you want to accept a key. Choose "yes". After doing this, you may have to close Git Bash and Re-Open it (go back to step 3).Once Git has completed cloning your repository, change into the repository directory using the
cd
command:cd 2021c-csse132-username/
HINT: you can type part of the command (like "cd 1819" and then hit tab to auto-complete the directory).
Type
ls
and hit enter to show the contents of your Git repository You should see something that looks like this:username@username-PC MINGW64 ~/Files/2021c-csse132-username (master) $ ls lab01/ username@username-PC MINGW64 ~/Files/2021c-csse132-username (master) $
In windows explorer, go into your git repository and into the
lab01
folder. Create a new text file called "test.txt" (you can do this by right-clicking, selecting "new" and then choosing "text document", then call it "test".Open the file in notepad.exe (double-click it), then write your name in the file. Save the file.
Back in the "git bash" window, go into the lab01 directory (type
cd lab01
and hit enter). Typels
and hit enter to see what is in that directory. You should see your new file!username@username-PC MINGW64 ~/Files/2021c-csse132-username/lab01 (master) $ ls test.txt xilinxSample/ username@username-PC MINGW64 ~/Files/2021c-csse132-username/lab01 (master) $
Now you must add this file to your git repository. To do this, type
git add test.txt
into git bash.Next, you must "commit" the file; this will save the current version of the file in git. Type
git commit -m "add new file for lab 1"
and then hit enter. You should see something like this:[master 9ec8bc9] add new file for lab 1 1 file changed, 1 insertion(+) create mode 100644 lab01/test.txt
Finally, you will upload or "push" it to the server. Type
git push
on the command line to send your file to the server. You should see something like this:username@username-PC MINGW64 ~/Files/2021c-csse132-username/lab01 (master) $ git push Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (4/4), 340 bytes | 340.00 KiB/s, done. Total 4 (delta 0), reused 0 (delta 0) To gitter.csse.rose-hulman.edu:/srv/repos/2021c-csse132-username 8d856ae..9ec8bc9 master -> master
Take a screenshot of the message returned from the git push
command and save it. At the end of this lab, you will upload
this screenshot to GradeScope for instructor verification.
2. Connecting to Another Computer
In this class, you will be working with a Linux (a variety of Unix) system via the SSH client you installed.
Open your SSH client, connect to the following server with the given username and password, and show your instructor that you got it to work!
server: bandit.labs.overthewire.org port: 2220 login name: bandit0 password: bandit0
If you're using git bash, this command should initiate the connection:
ssh bandit0@bandit.labs.overthewire.org -p2220
Once you're logged in, take a screenshot of the termimal at this moment and save it. At the end of this lab, you will upload this screenshot to GradeScope for instructor verification.
3. Xilinx Test Project
You should have installed Xilinx during the prelab. If you didn't, go follow the instructions in the prelab.
When you cloned your Git repository, you should have a lab01 folder. This contains a xilinxSample
directory that we're going to use.
NOTE: do not put the files into OneDrive. Xilinx and OneDrive do not work very well together.
Start up ISE Design Suite, and open the example project in your Git Repository's lab01/xilinxSample
directory. The project file is called mux16b8.xise
. If asked, you should create a working directory. You should also migrate the project if asked.
Synthesize it
The first step in using Xilinx is to synthesize your projects. This builds a "fake hardware" module for the simulator.
- Select the
mux16b8.sch
in the "Hiearchy" section of the "Design" tab. - In the "Processes" section of that tab, expand "Synthesize - XST" and double-click it.
- Watch it build! The process icon should turn green when it completes. If you get unexplained errors, select "Cleanup Project Files" from the "Project" menu and try again.
Simulate it
You've got your project synthesized, now you need to see if it passes the tests that came with it. This will check to make sure it works as expected.
- Select "Simulation" at the top of the "Design" tab.
- Make sure the drop-down right under the view selector is set to "Behavioral".
- Double-click on
mux16b_tb_0.v
in the "Hierarchy" section of the tab, and examine the file that comes up. There's a bunch of stuff in here that's probably new, don't worry, we'll get to this next week. - In the "Processes" section of the "Design" tab, expand the "ISim Simulator" entry and double-click "Simulate Behavioral Model". This will launch ISim.
- In the ISim window, zoom "To Full View" (in the view/zoom menu).
- Admire the waveforms. Ooh. Pretty.
That's it. Take a screenshot of the entire waveform panel and save it for GradeScope submission.
Finishing This Lab
When you're done with this lab, submit the three screenshots you've taken by uploading to GradeScope (link can be found in Moodle).
To make sure your git
submission has successfully reached the server, a quick way to check is using the following command:
git log --stat -1
Make sure you see your latest commit (e.g., adding test.txt
) appears in the output. Also, double-check if the first line of the log message includes origin/master in the parentheses. If not, try to git push again.