Lab 10 Files

These are the files for Lab 10 Spring 2007. All these files will be available at V:\ece385\Lab10\ on the ECE computers during the week of lab 9 demos.

Given Mem2IO Entity - Rename to "Mem2IO.vhd" after download.

Simulation Memory - Rename to "test_memory.vhd" after download.

Given Control Unit Skeleton - This file is a skeleton of the control unit, performing the instruction fetch and ADD operations. It is up to you to complete it to implement all the functions required for the processor. In addition, this entity was created to work with the full LC-3 datapath, and therefore may include signals that are not necessary for our simplified version, the SLC-3.2. You should identify these functions and remove them. Rename the file to "ISDU.vhd" after download.

Spring 2007 Test Programs Documentation - Details about the tests you will need to run on your CPU for the demo.

Spring 2007 Test Programs - This is the test code for Spring 2007. It is written in an assembly-like format that is made compatible with VHDL by including a special library file in your project (below). You can copy and paste the test vectors into your test_memory file to simulate the actual tests that we'll be running, or you can slimply use the file to satisfy your curiosity regarding how the test programs are coded.

Spring 2007 SLC3_2 VHDL Library - This library file contains the constants and functions necessary to translate the assembly-like instructions in the above file into std_logic_vectors that VHDL understands. Usage instructions are included in the file. Rename to "SLC3_2.vhd" after download.

Spring 2007 Test Programs Memory Image File - This is the memory image of the test programs that will be used this semester. Use the DE2 Control Panel (which will be made available at V:\ece385\Lab10\DE2_Control_Panel during demos) to program the SRAM with its contents.

To test your design, go through all the normal steps to design your circuit & program it on the board, but stop just short of actually hitting the Start button in the programmer. Go to File, Open, browse to the DE2 control panel directory (“\DE2_control_panel\” on the DE2 System CD, “V:\ece385\Lab10\DE2_control_panel\” on the ECE computers), select programming files for the file type, and select the file "DE2_USB_API.sof". A window will open asking what to do with the file; select Open a new programmer window listing this file. You will now have two programmer windows open, one for your project, and one for the DE2 control panel.

Program the board with the control panel file, and run the “DE2_Control_Panel.exe” program (located in the same directory as the programming file you just opened). Go to the Open menu and open the USB port. On the SRAM tab, check the box next to File Length, and click the Write a file to SRAM button. Select a file to program onto the SRAM (for the demonstration, this will be “V:\ece385\Lab10\Spring_2007_Test_Programs.ram”). (Alternatively, you can code in instructions individually using the Random Access fields, which is useful for testing just a few instructions at a time and for inspecting memory contents after a test, say, to verify your STR instruction.) Go to Open and close the USB port once the memory is programmed. You may now go back to Quartus and program the board with your circuit; the memory will retain the test code through the programming process.