There will be 6 regular programming labs required for all. On the first two labs only, you may work with a partner. Work on the other 4 regular labs must be your own (this means no cheating, copying, contracting, consulting, …). In this series of labs you will “build” a simple processor from the ground up, including support for interrupts and virtual memory for interaction with software. You will program in C to make the learning curve smoother and your work more productive. Yet, the labs will take time.
One critical aspect of these labs is that you are responsible for testing them well. Write good and comprehensive tests and don’t settle for the very minimal functionality tests we will provide you. When grading, we use a comprehensive array of tests, but we do not make those available to you. Writing good tests requires understanding the architecture well and is a crucial part of the learning experience. Borrowing, copying, consulting, … on the tests is also cheating.
Graduate students (those registered for EE382N.1) will likely be required to do one additional lab.
- Useful Links
- General Submission Instructions
- Labs
- Lab 0 (Due 9/1/2015 | last updated: 8/5/2015)
- Lab 1 (Due 9/15/2015 | last updated: 9/1/2015)
- Lab 2 (Due 9/22/2015 | last updated: 9/8/2015)
- Lab 3 (Due 10/6/2015 | last updated: 9/22/2015)
- Lab 4 (Due 10/27/2015 | last updated: 10/7/2015)
- Lab 5 (Due 11/20/2015 | last updated: 11/10/2015)
- Lab 6 (Due 12/4/2015 | last updated: 11/20/2015)
- Graduate Lab (Due 12/11/2015 | last updated: 10/20/2015)
Useful Links
- Getting Started with gcc
- How to port code from Windows to Unix
- Note about Security of your files
- Remotely access Unix machines with VNC
- Visual Studio: Compiling your code with ANSI C
- Secure Shell (SSH) client for windows
- WinSCP A Secure Copy client for windows - Useful if you want to copy files to/from your unix account.
- Emacs editor tutorial and reference card
- Vim editor tutorial and reference card
- “The C Programming Language” by Kernighan and Ritchie. This is an excellent book on the C language.
- C/C++ Reference has some useful information about the functions available in the standard C library.
- http://www.ee.surrey.ac.uk/Teaching/Unix/ http://www.ee.surrey.ac.uk/Teaching/Unix/ A quick tutorial on the Unix environment
- GDB, a command-line debugger for linux. To use GDB, be sure to include the “-g” flag when you compile with gcc.
- LC-3b Handouts
General Submission Instructions
You will find detailed instructions within each lab assignment. General instructions below.
Labs
Lab 0 (Due 9/1/2015 | last updated: 8/5/2015)
Lab 1 (Due 9/15/2015 | last updated: 9/1/2015)
Lab 2 (Due 9/22/2015 | last updated: 9/8/2015)
Lab 3 (Due 10/6/2015 | last updated: 9/22/2015)
- Lab 3 Shell Code
- An example of a simulator run
- The control store template as a Excel and PDF.
Lab 4 (Due 10/27/2015 | last updated: 10/7/2015)
- Lab 4 Shell Code
- Important note: Make sure your Lab 3 implementation is correct before starting Lab 4. You may use the submit-ee360n command on grader to test your Lab 3 program (after slip days). Submit the lc3bsim3.c and ucode3 files first with submit-ee360n -late, then run submit-ee360n -lategrade. Run submit-ee360n to see all available options. Passing all the tests does not mean that your Lab 3 is correct! An incorrect program may just happen to behave correctly on our test cases. It is your responsibility to ensure that your Lab 3 is correct. See this for more details.
- The control store template as a Excel and PDF.
- You can use the following xfig files or pdf files to show the changes you made to the datapath, state diagram and microsequencer. You can modify the xfig files using the xfig drawing program installed on LRC UNIX/Linux machines. Please note that you can submit hand drawn diagrams (You may use the pdf files), if you are not comfortable using xfig.
Lab 5 (Due 11/20/2015 | last updated: 11/10/2015)
- Lab 5 Shell Code
- Important note: Make sure your Lab 4 implementation is correct before starting Lab 5. You may use the submit-ee360n command on grader to test your Lab 4 program (after slip days). See this for more details.
- The control store template as a Excel and PDF.
- You can use the following xfig files or pdf files to show the changes you made to the datapath, state diagram and microsequencer. You can modify the xfig files using the xfig drawing program installed on LRC UNIX/Linux machines. Please note that you can submit hand drawn diagrams (You may use the pdf files), if you are not comfortable using xfig.
Lab 6 (Due 12/4/2015 | last updated: 11/20/2015)
- Lab 6 Shell Code
- Sample simulator runs to help you in debugging your simulator (Each of the hex files were simulated cycle by cycle using the “run 1″ command and an “idump” was performed after each cycle. *.dump files show the cycle by cycle output of idump. *.state files summarize the contents of the pipeline latches. *.timeline shows a timeline of the execution of the program in the pipeline):
Note that these test cases are not meant to be exhaustive. You should write your own test cases to make sure that your simulator is working for every instruction and program.
- The new control store template Excel .
Graduate Lab (Due 12/11/2015 | last updated: 10/20/2015)
- This lab assignment is intended for those who registered for the graduate version of this course (EE 382N.1). It accounts for 4% of your total grade.
- Undergraduate students are welcome to form groups and work on this assignment if you’d like to learn about computer architecture research tools, but you will not receive a grade for this assignment.