ECE 3130 – Digital Electronics and Design

Slides:



Advertisements
Similar presentations
Buses Three sets of wires connect the CPU to memory and I/O devices:
Advertisements

LOGIC GATES ADDERS FLIP-FLOPS REGISTERS Digital Electronics Mark Neil - Microprocessor Course 1.
Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.
1 4-bit ALU Cailan Shen Ting-Lu Yang Advisor: Dr. Parent May 11, 2005.
Give qualifications of instructors: DAP
Exercise Q3.17 Design an FSM to keep track of the mood of four students working in the digital design lab. Each Student is either: 1. Happy (the circuit.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Laboratory 5: Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report / Presentation Closing.
Overview Sequential Circuit Design Specification Formulation
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Boolean Algebra and Truth Table The mathematics associated with binary number system (or logic) is call Boolean: –“0” and “1”, or “False” and “True” –Calculation.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
GURSHARAN SINGH TATLA PIN DIAGRAM OF 8085 GURSHARAN SINGH TATLA
A presentation on Counters
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 2. Computer Structure Computer Structure The traditional diagram of a computer...
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
The CPU (or Central Processing Unit. Statistics Clock speed – number of instructions that can be executed per second Data width – The number of bits held.
Advanced Digital Circuits ECET 146 Week 5 Professor Iskandar Hack ET 221G, Me as I typed this slides.
Introduction to Sequential Logic Design Finite State-Machine Design.
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Complete Example.
displayCtrlr Specification
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
Assignment 8 solutions 1) Design and draw combinational logic to perform multiplication of two 2-bit numbers (i.e. each 0 to 3) producing a 4-bit result.
Digital Fundamentals Floyd Chapter 3 Tenth Edition
Sequential logic circuits
CEC 220 Digital Circuit Design Timing Analysis of State Machines
Multiplexors Decoders  Decoders are used for forming separate signals for different combination of input signals.  The multiplexer circuit is a digital.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Introduction to LabVIEW
Minute Paper 4/4/04 Z=50+j86.7=100
Basic Electricity and Electronics Module Two Basic Electronics Copyright © Texas Education Agency, All rights reserved.
ECE Fall G. Byrd1 Register A register stores a multi-bit value. We use a collection of D-latches, all controlled by a common WE. When WE=1,
State Diagrams Tuesday, 12 September State diagram Graphical representation of a state table. –Provides the same information as a state table. –A.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Overview Part 1 - Storage Elements and Sequential Circuit Analysis
8085 Microprocessor Architecture
Sequential Logic An Overview
ECE 3130 Digital Electronics and Design
Prof. Sin-Min Lee Department of Computer Science
4.
ECE 3130 Digital Electronics and Design
Sequential logic design principles
ECE 3130 – Digital Electronics and Design
What is a Multiplexer (MUX)?
Instructions at the Lowest Level
Flip-Flop Applications
KU College of Engineering Elec 204: Digital Systems Design
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
Flip-Flop Applications
CSE 140L Discussion Finite State Machines.
ECE 3130 – Digital Electronics and Design
KU College of Engineering Elec 204: Digital Systems Design
ECE 3130 – Digital Electronics and Design
State Machine Design with an HDL
A register design with parallel load input
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Beyond the ALU and Datapath. Sequential Machine Modeling exercise.
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Design of Digital Circuits Lab 5 Supplement: Implementing an ALU
ECE 3130 Digital Electronics and Design
Copyright © Cengage Learning. All rights reserved.
Sequential Digital Circuits
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Beyond the ALU and Datapath. Sequential Machine Modeling exercise.
Presentation transcript:

ECE 3130 – Digital Electronics and Design Final Project 4-bit ALU controlled by State Machine Fall 2017

Overall Diagram Inputs Inputs Outputs 4-bit ALU State Machine (Controller) Control signals Inputs Outputs DFFs with clear pin (Switch on/off) DFFs with clear pin (Switch on/off) 4-bit ALU

Part 1: 4-bit ALU 4-bit ALU A0-A3 are 4-bit input data A[3:0]. S1 S0 R0 A0 R1 A1 R2 A2 4-bit ALU R3 A3 R4 B0 R5 B1 R6 B2 R7 B3 Carry/Borrow Out A0-A3 are 4-bit input data A[3:0]. B0-B3 are 4-bit input data B[3:0]. R0-R7 are 8-bit output data R[7:0]. For multiplication, all 8 bits are needed. For addition & subtraction, only the lowest 4 bits (R0-R3) are needed. Carry/Borrow Out is 1-bit output data which is used for addition/subtraction. S0-S1 are 2-bit input data that are used to select operations.

Part 1: 4-bit ALU Values of select signal S[1:0] & four functions No change 1 A plus B A minus B A x B Select signal S1 and S0 are controlled and given by State Machine based on different states. PS. “No change” means the previous calculation results of ALU are held and locked. It’s different from being reset to zero.

Part 2: DFFs at input side clear S1 S0 A0 D Q R0 A0 clock R1 . . R2 4-bit ALU R3 R4 R5 R6 clear R7 B3 Carry/Borrow Out B3 D Q clock Eight DFFs are needed at the input side to provide 8 bits input data for ALU(A0-A3, B0-B3). The value of clear pin is controlled by State Machine. When it’s at high level, DFF is switched on, and thus ALU is able to obtain the input data. When it’s at low level, DFF is reset, and thus all the inputs of ALU are zero.

Part 3: DFFs at output side clear S1 S0 D Q R0 R0 A0 clock . A1 A2 4-bit ALU . A3 B0 B1 clear B2 B3 Carry/Borrow Out D Q Carry/Borrow Out clock Nine DFFs are needed at the output side to send out 9 bits output data of ALU(R0-R7, Carry/Borrow Out). The value of clear pin is controlled by State Machine. When it’s at high level, DFF is switched on, and thus results of ALU are able to be sent out. When it’s at low level, DFF is reset, and thus results of ALU cannot be sent out.

Part 4: Moore State Machine -- State Diagram [X1,X0]=00 State 0 [S1,S0]=00 Ie=0 Oe=0 [X1,X0]=01,10,11 [X1,X0]=01,10,11 [X1,X0]=00 [X1,X0]=00 State 1 [S1,S0]=00 Ie=1 Oe=0 State 5 [S1,S0]=00 Ie=1 Oe=1 [X1,X0]=00,01,10 [X1,X0]=00,10,11 [X1,X0]=00,01,11 [X1,X0]=01 [X1,X0]=10 [X1,X0]=01 [X1,X0]=11 State 2 [S1,S0]=01 Ie=1 Oe=0 State 3 [S1,S0]=10 Ie=1 Oe=0 State 4 [S1,S0]=11 Ie=1 Oe=0 [X1,X0]=10 [X1,X0]=11

Part 4: Moore State Machine State 0: Initial state. In this state, all DFFs at both sides are switched off. ALU do not have any input data. No operation is selected for ALU. The output of ALU are not sent out. State 1: Fetching state. In this state, the DFFs at input side are switched on. Input data are sent into ALU and ready to be calculated. State 2,3,4: Calculating state. In these states, one of the operations of ALU is selected. Results are calculated out by ALU, but not sent out yet. State 5: Sending out state. In this state, the DFFs at output side are switched on. The calculation results of ALU are sent out.

Part 4: Moore State Machine -- Symbol X1 B X0 Moore State Machine C S1 reset S0 Ie clock Oe X0-X1 are 2-bit input data, which is used to determine the next state in State Machine. A,B,C are 3-bit output data, which are used to indicate the number of current state. In this project, they do not need to be connected to anything. S0-S1 are 2-bit output data, which are used to provide corresponding select signals of ALU. Ie is 1-bit output data, which is used to control “switch on/off” of eight DFFs at input side. It should be connected to the “clear” pins of DFFs. Oe is 1-bit output data, which is used to control “switch on/off” of nine DFFs at output side. It should be connected to the “clear” pins of DFFs.

Symbol of the whole project X1 X0 A0 R0 A1 R1 A2 Final Project R2 A3 R3 B0 R4 B1 R5 B2 R6 B3 R7 Carry/Borrow Out reset clock A0-A3 and B0-B3 are used to provide data inputs of eight DFFs at input side. X0-X1 and reset are connected to corresponding inputs of State Machine. Clock is used to provide clock signals for both State Machine and all DFFs. R0-R7 and Carry/Borrow Out are connected to corresponding outputs of nine DFFs at output side.

Test and Simulation Moore State Machine should be tested separately to ensure all the functions are correct. For example, all the state transitions under different inputs(X1,X0) are correct. All the corresponding outputs in different states are correct. For the test of whole project, choose five groups of input data A[3:0] and B[3:0]. For each group of input data, set up proper values of X1-X0 and verify all three ALU operations (addition, subtraction, multiplication).

Two or Three students per group Individual Report due date: By End of Sunday, December 10th. Write the steps of your report in details Usual expectations : schematic, waveform and analysis Plus: Original Tanner Project file in a zip