Unformatted text preview:

ECE 270 Lab Verification / Evaluation Form Experiment 13 Evaluation: IMPORTANT! You must complete this experiment during your scheduled lab period. All work for this experiment must be demonstrated to and verified by your lab instructor before the end of your scheduled lab period. STEP DESCRIPTION MAX SCORE Pre-lab 1 Augment printed copy of skeleton file 5 Pre-lab 2 Hand-assemble program and determine test data/results 4 Step 1 Demonstrate INA, OUT, HLT instruction sequence 3 Step 2 Demonstrate LDA, {ADD/SUB/AND}, STA sequence 6 Step 3 Demonstrate program execution 4 Step 4 Thought questions 3 TOTAL 25 Signature of Evaluator: ________________________________________________________ Academic Honesty Statement: “In signing this statement, I hereby certify that the work on this experiment is my own and that I have not copied the work of any other student (past or present) while completing this experiment. I understand that if I fail to honor this agreement, I will receive a score of ZERO for this experiment and be subject to possible disciplinary action.” Printed Name: _____________________ Class No. __ __ __ __ - __ Signature: ____________________________________ Date: _______ECE 270 - Experiment 13 Purdue IM:PACT Little Bits Lab Manual -1- © 2013 by D. G. Meyer The Raulmatic 714 Simple Computer Instructional Objectives: • To practice creating a simple computer Prelab Preparation: • Read this document in its entirety • Review the referenced Module 4 lecture material • Complete the pre-lab exercises Experiment Description: In lecture you have been introduced to the architecture and instruction set of a very simple computer. The internal organization and the basic functional units of this device have been discussed in detail. Several “extensions” to the basic machine have also been presented in class (e.g., input/output instructions, transfer of control instructions, a stack mechanism, and a subroutine linkage mechanism). The purpose of this experiment is to reinforce your understanding of basic computer organization and provide you with additional experience designing and testing CPLD-based digital systems. The version of the “simple computer” realized in this experiment will utilize 7-bit instructions and sport 14 memory (SRAM) locations – hence, the “714” designation. The 7-bit instructions will consist of a 3-bit opcode field and a 4-bit address. The ALU will be 4-bits wide, and utilize radix (2’s complement) arithmetic. The ALU will function according to the description in Table I and generate the standard condition codes described in the Module 4 lecture notes. Table I. ALU Function Table. ALE ALX ALY Mnemonic Function Performed CF NF ZF VF 0 d d - stay in the same state - - - - 1 0 0 ADD (A) ← (A)+(data bus) ↨ ↨ ↨ ↨ 1 0 1 SUB (A) ← (A)-(data bus) ↨ ↨ ↨ ↨ 1 1 0 AND (A) ← (A)∩(data bus) - ↨ ↨ - 1 1 1 LDA (A) ← (data bus) - ↨ ↨ - Unlike the simple computer described in the class notes, no buses per se will be used – instead, multiplexers will be used to route address, data, and control information to various parts of the machine. Also, instead of using latches to realize SRAM and the output port, edge-triggered D flip-flops will be used (since that is the “native” memory element available on the CPLD). Also unlike the machine described in class, the Raulmatic 714 will feature a “memory edit” mode: when selected, the edit mode will allow the user to enter their program and data into SRAM using the DIP switch. A significant part of this experiment will therefore involve entering different programs into memory, executing them, and noting the results obtained.ECE 270 - Experiment 13 Purdue IM:PACT Little Bits Lab Manual -2- © 2013 by D. G. Meyer The instruction set supported by the Raulmatic 714 is listed in Table II. Note that, unlike the instruction set described in the course notes, the input and output instructions (INA and OUT) do not have an address field. Also note that when data is loaded from or stored to memory, only the lower four bits are utilized (for the STA instruction, the upper three bits stored are always zero). Table II. Raulmatic 714 Instruction Set. OPCODE Mnemonic Function Performed 000 HLT halt execution (retain state) 001 LDA addr (A)←(addr) 010 ADD addr (A)←(A)+(addr) 011 SUB addr (A)←(A)-(addr) 100 AND addr (A)←(A)∩(addr) 101 STA addr (addr)←(A) 110 INA (A)←[DIP3..DIP0] 111 OUT [LED27..LED24]←(A) Pre-lab Step (1): Print out a copy of the skeleton file provided on the course website. Carefully study this file and fill in the lines of code that have been left “blank” (note – it should not be necessary to add or modify any declarations). Be prepared to turn in the “hand-annotated” printed copy of your skeleton file at the beginning of your lab period. Pre-lab Step (2): Hand-assemble the following program into Raulmatic 714 machine code. Write the machine code in both binary and hexadecimal format. Then, calculate the final result stored at location 1101 for different DIP switch input and “data” values entered into locations 1011 and 1100. Address Instruction Mnemonic Machine Code Binary Hex Binary Hex 0000 0 INA 0001 1 OUT 0010 2 STA 1101 0011 3 ADD 1100 0100 4 OUT 0101 5 SUB 1011 0110 6 OUT 0111 7 AND 1100 1000 8 OUT 1001 9 STA 1101 1010 A HLT 1011 B data 1100 C data 1101 D result Result stored at location 1101 for: [DIP3..DIP0] = ________ (1011) = ______________ (1100) = ______________ (1101) = ______________ Result stored at location 1101 for: [DIP3..DIP0] = ________ (1011) = ______________ (1100) = ______________ (1101) = ______________ECE 270 - Experiment 13 Purdue IM:PACT Little Bits Lab Manual -3- © 2013 by D. G. Meyer Step (1): After your Lab Instructor checks the work you submitted for Pre-lab Step 1, augment the skeleton file accordingly. Verify that you can load a program into memory using the “edit” mode and can execute that program in “run” mode. For this initial verification, enter a program consisting of the instructions INA, OUT, HLT. Demonstrate entry and execution of this program to your Lab Instructor.


View Full Document

Purdue ECE 27000 - Experiment 13

Download Experiment 13
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Experiment 13 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Experiment 13 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?