SKEE2263 Sistem Digit

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

ENEE 245 Lab 1 Report Rubrics

Timing for Ripple Carry Adder


Chapter 4. Combinational Logic

Register Transfer Methodology II

Outline. Register Transfer Methodology II. 1. One shot pulse generator. Refined block diagram of FSMD

EECS150 - Digital Design Lecture 13 - Combinational Logic & Arithmetic Circuits Part 3

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

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Binary Adders: Half Adders and Full Adders

Injntu.com Injntu.com Injntu.com R16

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

CS 5803 Introduction to High Performance Computer Architecture: Arithmetic Logic Unit. A.R. Hurson 323 CS Building, Missouri S&T

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

ECEN 468 Advanced Logic Design

Microcomputers. Outline. Number Systems and Digital Logic Review

Scheme G. Sample Test Paper-I

Principles of Computer Architecture. Chapter 3: Arithmetic

ECE 152A LABORATORY 2

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

VLSI for Multi-Technology Systems (Spring 2003)

structure syntax different levels of abstraction

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Figure 1: Verilog used to generate divider

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

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

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

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

Combinational Logic Circuits

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

Chapter 6 Combinational-Circuit Building Blocks

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

The Need of Datapath or Register Transfer Logic. Number 1 Number 2 Number 3 Number 4. Numbers from 1 to million. Register

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

Chapter 3 Part 2 Combinational Logic Design

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

Experiment 7 Arithmetic Circuits Design and Implementation

Tailoring the 32-Bit ALU to MIPS

CS/COE 0447 Example Problems for Exam 2 Spring 2011

PINE TRAINING ACADEMY

Combinational Circuits

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

Chapter 3: part 3 Binary Subtraction

DESIGN PROJECT TOY RPN CALCULATOR

Register Transfer Language and Microoperations (Part 2)

I 3 I 2. ! Language of logic design " Logic optimization, state, timing, CAD tools

Let s put together a Manual Processor

EET 1131 Lab #7 Arithmetic Circuits

DE Solution Set QP Code : 00904

Week 7: Assignment Solutions

Arithmetic Logic Unit

An easy to read reference is:

Chapter 5 Registers & Counters

ENEE245 Digital Circuits and Systems Lab Manual

ENEE245 Digital Circuits and Systems Lab Manual

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

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

EGC221: Digital Logic Lab

Computer Architecture and Organization

Combinational Circuits

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

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

1. Mark the correct statement(s)

EC2303-COMPUTER ARCHITECTURE AND ORGANIZATION

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

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

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Contents. Chapter 9 Datapaths Page 1 of 28

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Course Project Part 1

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012

Hours / 100 Marks Seat No.

Elec 326: Digital Logic Design

EECS150 - Digital Design Lecture 6 - Field Programmable Gate Arrays (FPGAs)

Outline. EECS150 - Digital Design Lecture 6 - Field Programmable Gate Arrays (FPGAs) FPGA Overview. Why FPGAs?

CHAPTER 4: Register Transfer Language and Microoperations

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

EECE 353: Digital Systems Design Lecture 10: Datapath Circuits

COMBINATIONAL LOGIC CIRCUITS

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.

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

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

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 3. Arithmetic for Computers Implementation

Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number. Chapter 3

(ii) Simplify and implement the following SOP function using NOR gates:

Chapter 4 Arithmetic Functions

Euclid's Algorithm. MA/CSSE 473 Day 06. Student Questions Odd Pie Fight Euclid's algorithm (if there is time) extended Euclid's algorithm

ECE 30 Introduction to Computer Engineering

Topics. Midterm Finish Chapter 7


Philadelphia University Student Name: Student Number:

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

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

Combinational Circuit Design

ECE 341 Midterm Exam

Transcription:

Term Project Guide SKEE2263 Sistem Digit Table of Contents Objectives... 2 Project Scheduling... 2 Option 1: Serial Multiplier... 3 Option 2 : Serial Divider... 7 Option 3 : GCD Calculator... 11 Option 4 : Binary to BCD Converter... 15 This is a LIVE document and continuously updated. Download it from http://raden.fke.utm.my/logic-design/project-guide/bigproject.pdf periodically for the latest version.

2 Term Project Guide Objectives To build a complete digital design containing a datapath unit and control unit using Schematic Capture To perform top-down design and bottom-up with emphasis on hierarchy, modularity and regularity To implement and test the design on the EPM240 board with all relevant input/output devices To manage a project with the aid of a Gantt Chart Project Scheduling The term project contributes 30% of your overall marks. At the end of term, you must implement a complete digital system an Altera CPLD board. The titles avalable for the project are listed in this document. To ensure you successfully complete the project, the term project has 6 different tasks, so that you build the complete system incrementally. The following Gantt Chart outlines the tasks. # Task 1 Quartus familiarization 2 Altera built-in module familiarization 3 Construction of combinational modules 4 Construction of sequential modules 5 Datapath unit integration 6 Control unit implementation Week 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 The end of each task is a milestone, and you are to deliver the following: Milestone Date Deliverable 1 Early week 3 Multi-bit adder 2 Early week 5 4-bit to 7-segment decoder 3 Before break Combinational modules of your chosen circuit 4 Early week 11 Sequential modules of your chosen circuit 5 Early week 13 Datapath unit combining all previously designed modules 6 During week 15 Completed system combining datapath unit and control unit Completion of each milestone is worth 5% of the overall grade. You have done Milestones 1 and 2. This document describes Milestones 3 and 4 only since the descriptions for Milestones 5 and 6 are the same. If you are interested in pursuing other interesting titles, discuss with your lecturer concerning the specific deliverables for Milestones 3 and 4. Option # Title 1 Serial Multiplier 2 Serial Divider 3 Greatest Common Denominator (GCD) Calculator 4 Binary to BCD Converter TIP: You can simplify your work by creating a module in Verilog and inserting it in your schematic. You will need to save the circuit as a module by selecting (on the design window) File Create/Update Create Symbol File for Current File. This generates a.bdf file. In Verilog, you cannot insert a Pre-design Symbol Module (.bdf). You can only insert a verilog file (.v) to use a pre-designed module.

Option 1: Serial Multiplier 3 Option 1: Serial Multiplier Algorithm Serial multiplication is performed using the shift-and-add algorithm as shown in Figure 1-1. Datapath Figure 1-1: Multiplication using Shift-and-Add algorithm Deliverables Figure 1-2: Serial Multiplier datapath. Milestone Deliverable 3 4 bit Carry Look ahead Full Adder 4 4 bit Parallel Load Shift Register and 9 bit Parallel Load Shift Register 5 Datapath unit combining all previously designed Full Adder & Shift Register 6 Completed system combining datapath unit and control unit

4 Term Project Guide Milestone 3: 4-bit Carry Lookahead Adder Figure 1-3: CLA. Milestone 3a: Create 1- Bit Partial Full Adder Figure 1-4: PFA. Implement a 1-bit binary half adder based on Figure 2. Simulate your circuit using functional simulation show proof that the waveform conform to the Boolean expression of the PFA. Milestone 3b: 4 bit Carry Look Ahead Generator (CLG) Implement a 4 bit Carry Look Ahead Generator based on the expression given Figure 2.

Option 1: Serial Multiplier 5 Simulate your circuit using functional simulation show proof that the waveform conform to the Boolean expression of the CLG by giving 4 test cases.. Milestone 3c: 4 bit Carry Look Ahead Adder (CLA4) Step 4: Using the four Half Full Adders and a 4 bit Carry look Ahead modules, implement the 4 bit Carry Look Ahead Adder based on Figure 1. Simulate your circuit using functional simulation. Show proof that the waveform conform to the Function of a 4-bit Full Adder giving 4 test cases Simulate your circuit using functional and timing simulation. Give a snapshot of functional and timing simulation for the following inputs: Cin A[3..0] B[3..0] S[3..0] 0 0011 0100 1 0111 1001 0 1101 1000 1 1111 1111 Gate Delay C4 S3 S2 S1 S0 Note: You will need to determine the period of 1 gate delay. Milestone 4: 9-bit Shift Register Refer to Figure 1-1. There a two registers located below the adder: one 1 bit register and two 4-bit registers. Each bit must be able to perform 3 functions: hold, load from adder and shift right. We can use the universal shift register as the foundation. It can perform 4 functions. We are not going to use the shift left function. Figure 1-5: USR.

6 Term Project Guide Milestone 4a: 1 bit of Universal Shift Register (USR) Implement one bit of the USR. Figure 1-6: 1 bit of USR. Simulate your circuit using functional simulation show proof that the bit cell does what it is supposed to be doing. Milestone 4b: 4 bit Universal Shift Register (USR) Implement the complete 4 bit USR. Simulate your circuit using functional simulation show proof that the bit cell does what it is supposed to be doing i.e. it can do a parallel load (D à Q+) right shift (Q>>1 à Q+), and hold (Q à Q+). Milestone 4c: Linked FF and USRs Combine 1 FF, and 2 USRs according to Figure 1-2. Simulate your circuit using functional and timing simulation show proof that the whole 9-bit register does what it is supposed to be doing. Milestone 5: The Datapath Combine the circuits in Milestones 3 through 4 to build the datapath as shown in Fig. 1-2. Simulate using sensible data combinations. Milestone 6: The Complete System Draw the Algorithmic State Machine (ASM) Chart to control the whole datapath. Build the control unit to implement the ASM chart. Test the system using sensible data combinations. The data set you choose will reveal your knowledge. Choose wisely.

Option 2 : Serial Divider 7 Option 2 : Serial Divider Algorithm Division in hardware can be done using several methods. One of them is the non-restoring algorithm in Figure 2-1. Datapath Figure 2-1: Non-restoring division. Figure 2-2 Serial Divider

8 Term Project Guide Deliverables Milestone Deliverable 3 5 bit Adder/Subtractor 4 5 bit and 4 bit Parallel Load Shift Registers 5 Datapath unit combining all previously designed Full Adder Shift Register 6 Completed system combining datapath unit and control unit Milestone 3: 5-bit Ripple Carry Adder/Subtractor Figure 2-3: 5-bit Ripple Carry Adder/Subtractor. Milestone 3a: Create 1- Bit Full Adder Figure 2-4: PFA. Implement a 1-bit Full adder based on Figure 2.4. Simulate your circuit using functional simulation show proof that the waveform conform to the Boolean expression of the 1-bit Full adder.

Option 2 : Serial Divider 9 Milestone 3b: Ex-Or implementation using 2-1 Multiplexer Figure 2-5: Ex-Or implementation using 2-1 Multiplexer Implement a Ex-OR expression based Figure 2. Simulate your circuit using functional simulation show proof that the waveform conform to the Boolean expression of the X = f (A,B) =. Milestone 3c: 5 bit Adder/Subtractor Step 4: Using the Full Adders and Ex-Or modules, implement the 5 bit Adder/Subtractor based on Figure 1. Simulate your circuit using functional simulation. Show proof that the waveform conform to the Function of a 4-bit Full Adder giving 4 test cases Simulate your circuit using functional and timing simulation. Give a snapshot of functional and timing simulation for the following inputs: Add/Sub A[4..0] B[4..0] S[4..0] 0 0011 0100 1 0111 1001 0 1101 1000 1 1111 1111 Gate Delay C5 S4 S3 S2 S1 S0 Note: You will need to determine the period of 1 gate delay.

10 Term Project Guide Milestone 4: 9-bit Shift Register Refer to Figure 2-1. There a two registers located below the 5-bit adder/subtractor: one 5 bit register and one 4- bit registers. Each bit must be able to perform 3 functions: hold, load from adder and shift left. We can use the universal shift register as the foundation. It can perform 4 functions. We are not going to use the shift right function. Figure 2-5: USR. Milestone 4a: 5 bit of Universal Shift Register (USR) Implement the 5 bit USR. Simulate your circuit using functional simulation show proof that the bit cell does what it is supposed to be doing i.e. it can do a parallel load (D à Q+), left shift (Q<<1 à Q+) and hold (Q à Q+). Milestone 4b: 4 bit Universal Shift Register (USR) Implement the complete 4 bit USR. Simulate your circuit using functional simulation show proof that the bit cell does what it is supposed to be doing i.e. it can do a parallel load (D à Q+), left shift (D<<1 à Q+) and hold (Q à Q+). Milestone 5: The Datapath Combine the circuits in Milestones 3 through 4 to build the datapath as shown in Fig 2-2. Simulate using sensible data combinations. Milestone 6: The Complete System Draw the Algorithmic State Machine (ASM) Chart to control the whole datapath. Build the control unit to implement the ASM chart. Test the system using sensible data combinations. The data set you choose will reveal your knowledge. Choose wisely.

Option 3 : GCD Calculator 11 Option 3 : GCD Calculator Algorithm The greatest common divisor (GCD) of two numbers is the largest number that divides both of them without leaving a remainder. The GCD of 54 and 24 is 6 as shown below: The number 54 can be expressed as a product of two integers in several different ways: 54 x 1 = 27 x 2 = 18 x 3 = 9 x 6 Thus the divisors of 54 are: 1,2,3,6,9,18,27,54 Similarly, the divisors of 24 are: 1,2,3,4,6,8,12,24 The numbers that these two lists share in common are the common divisors of 54 and 24: 1,2,3,6 The greatest of these is 6. That is, the greatest common divisor of 54 and 24. One writes: gcd(54,24) = 6. GCD is popularly solved using Euclid s algorithm. The pseudocode: function gcd(x, y) while x y if x > y x := x y; else y := y x; return x; Datapath To make the circuit useful but still simple enough, data size of 6 bits is chosen. Deliverables Figure 3-1 GCD Engine (http://www.gstitt.ece.ufl.edu/courses/spring13/eel4712/labs/lab5/lab5spring13.pdf) Milestone Deliverable 3 6-bit 2:1 mux, 6-bit subtractor (lpm_addsub), 4 3 6-bit registers, 6-bit comparator (iterative) 5 Datapath unit combining all modules shown in Fig. 3-1 6 Completed system combining datapath unit and control unit

12 Term Project Guide Milestone 3: 6-bit Ripple Subtractor & Mux Milestone 3a: 6 bit Mux Based on the mux you used in Milestone 2, expand it to 6 bits. Simulate your circuit using functional simulation. Show proof that the waveform conform to the function of a 6-bit mux using 4 test cases. Milestone 3b: 6 bit Subtractor Figure 3-3 lpm_add_sub Pick the lpm_add_sub symbol from the Altera MegaWizard. Configure it as a 6-bit subtractor. Disable the adder function. Simulate your circuit using functional and timing simulation. Show proof that the waveform conform to the function of a 6-bit mux using 4 test cases. X[5..0] Y[4..0] D[4..0] 54 24 24 54 0 63 63 0 1 2 31 31 0 0

Option 3 : GCD Calculator 13 Milestone 4: Registers and Comparator Milestone 4a: DFFE Figure 3-3 DFFE Build the DFF with enable as shown in Figure 3-3. Refer to your textbook for explanation on how it works. Simulate your circuit using functional and timing simulation. Show proof that you understand how to use the DFFE. Save the circuit as an Altera module called DFFE. Milestone 4a: 6 bit Register with Enable Combine 6 units of the DFFE to build a 6-bit register with 6-bit data input, 6-bit data output, one clock input and one enable input. Simulate your circuit using functional simulation. Show proof that you understand how a register with enable works. Milestone 4c: One Bit Comparator Build one slice of the iterative comparator. Refer to the textbook for more details.

14 Term Project Guide Simulate your circuit using functional simulation. Show proof that you understand how the comparator worksl. Save the circuit as an Altera module called comp1bit. Milestone 4d: Six Bit Comparator Combine 6 comp1bit modules to build a 6-bit comparator. Add the necessary gates to produce the x_lt_y and x_ne_y signals as shown in Figure 3-1. Simulate your circuit using functional and timing simulation. Use the following test data. X[5..0] Y[4..0] x_lt_y x_ne_y 54 24 24 54 0 63 63 0 1 2 31 31 0 0 Save the circuit as an Altera module called DFFE. Milestone 5: The Datapath Combine the circuits in Milestones 3 through 4 to build the datapath in Figure 3-1. Simulate using sensible data combinations. Milestone 6: The Complete System Draw the Algorithmic State Machine (ASM) Chart to control the whole datapath. Build the control unit to implement the ASM chart. Test the system using sensible data combinations. The data set you choose will reveal your knowledge. Choose wisely.

Option 4 : Binary to BCD Converter 15 Option 4 : Binary to BCD Converter Algorithm // Double-dabble algorithm Hundreds = 0; Tens = 0; Ones = 0; for (i=0; i<8; i++ { // check all columns >= 5 if (Hundreds >= 5) Hundreds += 3; if (Tens >= 5) Tens += 3; if (Ones >= 5) Ones += 3; // shift all bits left Hundreds <<- 1; Hundreds[0] = Tens[3]; Tens <<= 1; Tens[0] = Ones[3]; Ones <<= 1; Ones[0] = Binary[7] Binary <<= 1; } Converting 255 from binary to BCD: Hundreds Tens Ones Binary Oper. 1111 1111 Load 1 111 1111 << #1 11 11 1111 << #2 111 1 1111 << #3 1010 +3 1 0101 1111 << #4 1000 +3 11 0001 111 << #5 110 0011 11 << #6 1001 +3 1 0010 0111 1 << #7 1010 +3 10 0101 0101 << #8 Datapath Figure 4-1 Binary to BCD Engine Deliverables Milestone Deliverables 3 Custom add-by-3-if-greater-than-4 circuit & 8-bit PISO 4 2+4+4 bit Universal Shift Register 5 Datapath unit combining all modules shown in Fig. 3-1 6 Completed system combining datapath unit and control unit

16 Term Project Guide Milestone 3: Custom adder and register cell Milestone 3a: Add-3-if-greater-than-4 circuit Figure 4-2: Custom adder circuit. Based on the truth table in Figure 4-2, build the simplest and fastest circuit. Justify your design. Simulate your circuit using functional and functional simulation. Test using all 16 input combinations. Find the worst case delay. Milestone 3b: PISO register Figure 4-3: Simplified PISO. Details have been left out. Based on 4-bit shift right PISO in Figure 4-3, modify it to shift left and expand it to 8 bits. The 8-bit PISO must have 2 control signals: LD (parallel load) and SH (left shift). LD has higher priority than SH. Simulate your circuit using functional and timing simulation. Prove that you understand how a PISO works. Prove that you understand how to use the LD and SH signals.

Option 4 : Binary to BCD Converter 17 Milestone 4: 2+4+4 bit Shift Register Refer to the universal shift register in Figure 4-4. Use this register as the foundation for the 2+4+4 Shift Register. First build a module to implement a single bit. Then use it to build the 2-bit Hundreds register and the 4-bit Tens and Ones registers. Note: The Hundreds register is not required to parallel load. You may find a simpler circuit for it later if you like. Figure 4-4: USR. Milestone 4a: 1 bit of Universal Shift Register (USR) Implement one bit of the USR. Figure 4-5: 1 bit of USR. Simulate your circuit using functional simulation show proof that the bit cell does what it is supposed to be doing. Milestone 4b: 4 bit Universal Shift Register (USR) Implement the complete 4 bit USR. Simulate your circuit using functional simulation show proof that the bit cell does what it is supposed to be doing i.e. it can do a parallel load (D à Q+) right shift (Q>>1 à Q+), and hold (Q à Q+).

18 Term Project Guide Milestone 4c: 2 bit SIPO Simplify the 1-bit USR cell in Figure 4-5 so that it can shift left or hold only. Simulate your circuit using functional and timing simulation show proof that the whole 9-bit register does what it is supposed to be doing. Milestone 5: The Datapath Combine the circuits in Milestones 3 through 4 to build the datapath as shown in Fig. 1-2. Simulate using sensible data combinations. Milestone 6: The Complete System Draw the Algorithmic State Machine (ASM) Chart to control the whole datapath. Build the control unit to implement the ASM chart. Test the system using sensible data combinations. The data set you choose will reveal your knowledge. Choose wisely.

Option 4 : Binary to BCD Converter 19