Cpr E 281 FINAL PROJECT ELECTRICAL AND COMPUTER ENGINEERING IOWA STATE UNIVERSITY. FINAL Project. Objectives. Project Selection

Similar documents
Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition

Week 6: Processor Components

ECE 341 Midterm Exam

IA Digital Electronics - Supervision I

EXPERIMENT NUMBER 11 REGISTERED ALU DESIGN

ELEC 326: Class project

Exp#8: Designing a Programmable Sequence Detector

Contents. Chapter 9 Datapaths Page 1 of 28

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

Parallel logic circuits

Recitation Session 6

CS 135: Fall Project 2 Simple Cryptography

Design Example: 4-bit Multiplier

Elec 326: Digital Logic Design

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

CS 2630 Computer Organization. Meeting 13: Faster arithmetic and more operations Brandon Myers University of Iowa

ELCT 501: Digital System Design

Let s put together a Manual Processor

ECE 30 Introduction to Computer Engineering

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Addition and multiplication

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

Control Unit: Binary Multiplier. Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN

CS 151 Midterm. (Last Name) (First Name)

DESIGN PROJECT TOY RPN CALCULATOR

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

CS61C : Machine Structures

CSE140: Components and Design Techniques for Digital Systems

ECE 341 Midterm Exam

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: The MIPS ISA (P&H ) Consulting hours. Milestone #1 (due 1/26)

An instruction set processor consist of two important units: Data Processing Unit (DataPath) Program Control Unit

ENEE 245 Lab 1 Report Rubrics

More complicated than addition. Let's look at 3 versions based on grade school algorithm (multiplicand) More time and more area

Fundamentals of Digital System Design ECE 3700, CPSC 3700

Systems Programming. Lecture 2 Review of Computer Architecture I

Introduction to Digital Logic Missouri S&T University CPE 2210 Multipliers/Dividers

Injntu.com Injntu.com Injntu.com R16

Computer Architecture and Organization: L04: Micro-operations

LAB 9 The Performance of MIPS

REGISTER TRANSFER LANGUAGE

COMPUTER ORGANIZATION AND DESIGN

PESIT Bangalore South Campus

Data paths and control logic

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Institute of Engineering & Management

ECE2029: Introduction to Digital Circuit Design Lab 3 Implementing a 4-bit Four Function ALU

Integer Multiplication and Division

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

CPSC 121: Models of Computation

session 7. Datapath Design

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

SKEE2263 Sistem Digit

*Instruction Matters: Purdue Academic Course Transformation. Introduction to Digital System Design. Module 4 Arithmetic and Computer Logic Circuits

Binary Multiplication


CPS 104 Computer Organization and Programming

Computer Architecture and Organization:

Truth Table! Review! Use this table and techniques we learned to transform from 1 to another! ! Gate Diagram! Today!

9 Multiplication and Division

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm

CS222: Processor Design

LAB 9 The Performance of MIPS

LAB 9 The Performance of MIPS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-II COMBINATIONAL CIRCUITS

Number Systems and Computer Arithmetic

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

Project 3: RPN Calculator

Boolean Unit (The obvious way)

Timing for Ripple Carry Adder

Arithmetic and Bitwise Operations on Binary Data

COMPUTER ARCHITECTURE AND ORGANIZATION. Operation Add Magnitudes Subtract Magnitudes (+A) + ( B) + (A B) (B A) + (A B)

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

DIRECTORATE OF TECHNICAL EDUCATION DIPLOMA IN ELECTRICAL AND ELECTRONICS ENGINEERING II YEAR M SCHEME IV SEMESTER.

CSE 140L Spring 2010 Bonus Final

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

How a Digital Binary Adder Operates

Introduction to Computer Science. Homework 1

Chapter 3: part 3 Binary Subtraction

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

Lab #12: ArithmeticLogic Unit

Digital Design with FPGAs. By Neeraj Kulkarni

END-TERM EXAMINATION

Computer Arithmetic Multiplication & Shift Chapter 3.4 EEC170 FQ 2005

CS 151 Final. (Last Name) (First Name)

Verilog for High Performance

COMPUTER ARITHMETIC (Part 1)

Chapter 3 Arithmetic for Computers

To design a 4-bit ALU To experimentally check the operation of the ALU

ECEN 468 Advanced Logic Design

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

EECE 321: Computer Organization

UC Berkeley CS61C : Machine Structures

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Number Systems. Readings: , Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs

R10. II B. Tech I Semester, Supplementary Examinations, May

EGC221: Digital Logic Lab

Transcription:

Objectives The main objective of the final project is to teach you how to put together all of the class material that you have learned so far in order to program the Altera DE2 board to carry out an independent activity. You will have to design a circuit to realize one digital machine that accepts input from switches and outputs to LEDs and 7-segment displays. Project Selection Feel free to choose any one of the following three projects. They are all of approximately the same difficulty. Your grade will not depend on the project that you pick, as long as you implement the entire project. If you don t like any of the provided projects, then you also have the option of specifying your own project. If there was something that you always wanted to do in digital design, now is your chance. However, your proposed project MUST be of appropriate complexity as determined by your lab TA. The minimum constraints are that your project MUST: 1) include a state machine, 2) include a register file, 3) a combinational logic, and 4) be demonstrated on the ALTERA boards provided in the lab. Notes on the Three Provided Projects The three projects descriptions outline all necessary details for the projects. If you choose to implement one of these projects, you must follow all details listed in the project description. Your implementation, at a minimum, should satisfy all implementation features and constraints as specified in this document. This means that if you do not implement a certain feature or reduce the complexity of the project you will lose points as indicated in the grading. You are allowed to work beyond the basic functionality as long as the implementation improves upon the specified design. It would be helpful to discuss any such changes with your TA. Think about the final project as a really long homework. You may have to go to the lab outside of your regularly scheduled lab time in order to complete it. To get a grade for this assignment you need to present your final project to your TA during dead week (in your regular lab time). No presentation, no grade! Also, there will be ZERO credit for any design step in the grading rubric that does not work or produces the wrong output or is not of the given specifications. All components of your design MUST WORK and produce the output as described in the specs to 1

Project #1: Tiny Encryption Algorithm Encoder/Decoder See the grading below before starting with the design. Implement an Encoder/Decoder for the basic tiny encryption algorithm (TEA-- https://en.wikipedia.org/wiki/tiny_encryption_algorithm). TEA takes two 32-bit integers (V0 and V1 -- really a 64-bit value) and four 32-bit keys (K0, K1, K2, and K3 -- really a 128-bit key) and encrypts or decrypts V0 and V1 in a relatively simple and efficient manner. This circuit should have a control FSM and a datapath. The datapath should contain a register file, an arithmetic and logical unit (ALU), and some step counters. The register file should have one write port and two read ports and contain ten 32-bit registers (V0, V1, K0, K1, K2, K3, sum, tmp0, tmp1, and tmp2) and a 32-bit ``magic constant'' (0x9e3779b9). The ALU should take two 32-bit operands and support all the necessary operations to perform the mixing step (i.e., several types of shifting, bitwise or, bitwise xor, addition, and subtraction). Use as many counters as necessary to aide in control reading in input values and writing out the output values. Operation: 0. Load the key: If toggle switch 8 is asserted, you should be able to load K0-K3, one byte at a time by setting switches 0-7 and pushing pushbutton 0. 1. Load the values for encoding/decoding: If toggle switch 8 is not asserted, you should be able to load V0 and V1, one byte at a time by setting switches 0-7 and pushing pushbutton 0. 2. Encoding/decoding: Once the last byte of V1 is entered, encoding or decoding begins (toggle switch 9 determines whether the circuit encodes values or decodes them). 3. Display: Once encoding/decoding is complete, V0 and V1 should be displayed on the 7-segment displays one byte at a time with pushbutton 0 advancing the byte. 2

a. Design and demonstrate the two-port read and one-port write register file works by writing and reading from the register file, including reading in the same cycle. (20 points) b. Design and demonstrate the ALU circuit. (20 points) c. Design and demonstrate that the state machine works. (20 points) d. Put together all the individual components in Parts a, b, and c and demonstrate that the complete TEA encoding and decoding works. (20 points) e. Final Report (20 points) 3

Project #2: 8-bit Booth's Multiplier See the grading below before starting with the design. As you learned earlier in the semester, multiplication is effectively repeated shifting and addition. This understanding can be used to reduce the area of a hardware multiplier by implementing a sequential multiplication circuit. Unfortunately, this means that for each bit of the multiplier there is both an add and a shift, even for cases like *0 where no adds are necessary. Therefore, you are tasked with designing an 8-bit sequential multiplier based on Booth's algorithm (https://en.wikipedia.org/wiki/booth%27s_multiplication_algorithm). Your Booth's algorithm multiplier should have an FSM for controlling the algorithm and a datapath that includes a register file, a modified adder-subtractor circuit (needs selective sign extension), and some single flip-flops to represent P[-1]/carries/signs. The register file has two read ports, a single write port, and contains just four 8-bit registers (multiplicand--m, lower result--p[7:0], upper result--p[15:8], and count). Behavior: Step 1: Initialization * Load the multiplicand from toggle switches 0-7. * Load the multiplier into the lower result register from toggle switches 8-15. * P[-1] is initialized to 0. Step 2: Multiplication * Read P lower and check the value of p[0:-1]: If 01 add a sign-extension of m to P (this is a multi-step process since P is a 16-bit value). If 10 add a sign-extension of -m to P (this is a multi-step process since P is a 16-bit value). If 00 or 11 don't add or subtract. * Right shift P (use an arithmetic shift where P's sign doesn't change). * Repeat these steps until they have been done 8 times. Step 3: Display result * Display the result (i.e., P[15:0]) on the 7-segment display using pushbutton 0 to toggle between the upper and lower half. 4

a. Design and demonstrate the two-port read and one-port write register file works by writing and reading from the register file, including reading in the same cycle. (20 points) b. Design and demonstrate the modified adder/subtractor circuit. (20 points) c. Design and demonstrate that the state machine works. (20 points) d. Put together all the individual components in Parts a, b, and c and demonstrate that the complete multiplier works. (20 points) e. Final Report. (20 points) 5

Project #3: Key Pad lock See the grading below before starting with the design. Create a functional door lock that has the following Features/Functionality: 1. Unlock door after a 4 digit password has been entered using push buttons, e.g., the push buttons pressed one at a time and in this order 1,2,3, and 4 would result in a code of 1234. 2. Lock indicates the current entered code on 4 7-seg displays. Non-entered digits should not display any number. 3. Lock checks code after the 4th button has been pressed and clears current entered code 4. Lock has a clear code button to allow user to clear the current entered code 5. Code will be stored in an 8 bit register and can be modified after the correct code is entered 6. Lock keeps track of incorrect attempts 7. Lock will lock until hard reset if number of incorrect attempts exceeds 10 8. Lock locks after lock door switch is flipped 9. Lock indicates when it is locked, unlocked, locked until hard reset, and entering in a new code. 10. After hard reset, the code is 1111, and number of incorrect attempts is 0. You will need registers to store the following: For Code that opens the Lock The code entered by the user Number of incorrect attempts The boards in the lab have only 4 push buttons. This limits the valid digits in the code to 1, 2, 3, and 4. That is, a code of length 4, where each of the four digits can be in the range 1-4. This still gives you 4x4x4x4=256 possible lock combinations. a. Enter, display, and clear entered code. (20 points) b. Demonstrate the ability to edit and store new unlocking code (this step is testing that you can make a register file and can edit/access its contents, not necessarily that the door unlock works). (20 points) c. Demonstrate a functional door lock with code. (20 points) d. Put together all of the individual components in Parts a,b, and c and demonstrate that the door will remain locked until a hard reset after 5 incorrect attempts. (20 points) e. Final Report. (20 points) 6

Project #4: Specify Your Own Project See the grading below before starting with the design. Propose a project of your own design. Once again, the minimum constraints are that your project MUST: 1) include a state machine, 2) include a register file, 3) a combinational logic, and 4) be demonstrated on the ALTERA boards provided in the lab. If you choose this option, you MUST discuss your intended design with your lab TA to see if the project would be appropriate for this class. This discussion can be over e-mail. Please contact your lab TA. If the lab TA or Instructor evaluates the project and recommends that it is not of appropriate difficulty, then the project will be denied and you ll have to modify it or propose a new one. a. Design and demonstrate the state machine for your design (20 points) b. Design and demonstrate the register file for your design (20 points) c. Design and demonstrate the combinational circuit. (20 points) d. Put together all of the individual components in Parts a,b, and c and demonstrate the complete project. (20 points) e. Final Report. (20 points) 7