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

Similar documents
REGISTER TRANSFER LANGUAGE

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Parallel logic circuits

EE 3170 Microcontroller Applications

CHAPTER 4: Register Transfer Language and Microoperations

REGISTER TRANSFER AND MICROOPERATIONS

Let s put together a Manual Processor

Computer Architecture and Organization: L04: Micro-operations

END-TERM EXAMINATION

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Chapter 4. The Processor

DIGITAL ELECTRONICS. P41l 3 HOURS

Code No: R Set No. 1

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

REGISTER TRANSFER AND MICROOPERATIONS

LECTURE 4. Logic Design

CMPE 413/ CMSC 711. Project Specification: 16 bit 2 s complement Adder and 8 bit 2 s complement multiplier. GND. Input bus. Latches I[8]-I[15]

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Question Total Possible Test Score Total 100

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

COMBINATIONAL LOGIC CIRCUITS

Injntu.com Injntu.com Injntu.com R16

Dec Hex Bin ORG ; ZERO. Introduction To Computing

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

The functional block diagram of 8085A is shown in fig.4.1.

Register Transfer and Micro-operations

Chapter 2 Logic Gates and Introduction to Computer Architecture

QUESTION BANK FOR TEST

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

ECE260: Fundamentals of Computer Engineering

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

ELCT 501: Digital System Design

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

CSE303 Logic Design II Laboratory 01

Chapter 4. The Processor

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Systems Programming. Lecture 2 Review of Computer Architecture I

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

Contents. Chapter 9 Datapaths Page 1 of 28

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

Combinational Logic Circuits

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

CS222: Processor Design

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

Microcomputers. Outline. Number Systems and Digital Logic Review

Philadelphia University Student Name: Student Number:

Real Digital Problem Set #6

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

Music. Numbers correspond to course weeks EULA ESE150 Spring click OK Based on slides DeHon 1. !

Lecture 21: Combinational Circuits. Integrated Circuits. Integrated Circuits, cont. Integrated Circuits Combinational Circuits

Digital Logic the Bare Minimum

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

Reference Sheet for C112 Hardware

Code No: R Set No. 1

Summer 2003 Lecture 21 07/15/03

Topics. Midterm Finish Chapter 7

Digital Design with FPGAs. By Neeraj Kulkarni

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

Written exam for IE1204/5 Digital Design Thursday 29/

Combinational Logic II

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

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

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Code No: R Set No. 1

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

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

LABORATORY MANUAL VLSI DESIGN LAB EE-330-F

EE 109L Review. Name: Solutions

Digital Logic Design Exercises. Assignment 1

Levels in Processor Design

Arithmetic-logic units

Chapter 3: part 3 Binary Subtraction

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

IA Digital Electronics - Supervision I

EKT 422/4 COMPUTER ARCHITECTURE. MINI PROJECT : Design of an Arithmetic Logic Unit

Computer Organization (Autonomous)

A Simple Parallel Input Port

CSE140: Components and Design Techniques for Digital Systems

Binary Adders. Ripple-Carry Adder

CS 261 Fall Mike Lam, Professor. Combinational Circuits

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer

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

Midterm Project Design of 4 Bit ALU Fall 2001

Chapter 4 Arithmetic Functions

In this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified.

Chapter 4. The Processor Designing the datapath

Chapter 4. Combinational Logic. Dr. Abu-Arqoub

EECS Components and Design Techniques for Digital Systems. Lec 20 RTL Design Optimization 11/6/2007

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

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Lecture 10: Combinational Circuits

EXPERIMENT NUMBER 11 REGISTERED ALU DESIGN

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

11/22/1999 7pm - 9pm. Name: Login Name: Preceptor Name: Precept Number:

1. Draw general diagram of computer showing different logical components (3)

Transcription:

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

Decoder Tri-state device Full adder, full subtractor Arithmetic Logic Unit (ALU) Memories Example showing how to write to a memory Homework assignments 2

Recall concept of a decoder Interpret as a function code decoder 3

In many digital systems it is required to connect multiple output devices onto the same wire or group of wires Output device: Switch (outputs a voltage, which indicates the state of the switch) Input device: LED (requires an applied voltage to turn the light on/off). Problem: What happens when two or more devices attempt to drive different voltages on the same wire (or group of wires, i.e., a bus) Result: line (or bus) contention, damage to circuit. 4

For example, consider two devices Device A and Device B need to send voltages to Device C What would happen if A sent +5 V and B sent V at the same time? Line contention: it s like Device A s positive terminal power supply is connected to ground. Not good! Common Ground 5V Device A Device B 5V Output Devices Voltage Source Device C Input Device Voltage Sink 5

A SOLUTION: TRI-STATE BUFFER 6

APPLICATION OF TRI-STATE BUFFER Write Control Device A Device B Active low tri-state buffer Device C Active high tri-state buffer Only one device can output a voltage (V or 5V) at one time. Therefore, the outputs of the Device A and B may be connected together, safely. 7

Number A Number B Carry In Sum Carry Out x _ y _ C in _ S _ C out _ Carry Axis x + y + C in Arithmetic Sum -bit Binary Number Wheel Add FULL ADDER Truth Table x y C in C out S Full Adder Block Diagram x y From a Karnaugh map: S = x y z + x y z + x y z + x y z Logical OR C out = x y + x z + yz C in S FA We taught (designed) the digital circuit how to add using the -bit number wheel. C out 8

Number A Number B Borrow In Difference Borrow Out x _ y _ B in _ D _ B out _ Carry (Borrow) Axis x - y - B in Arithmetic Difference -bit Binary Number Wheel Subtract Truth Table x y B in B out D From a Karnaugh map: D = S = x y z + x y z + x y z + x y z Logical OR B out = x y + x z + yz C out = x y + x z + yz Full Subtracter Block Diagram x y FS B in B out D We taught (designed) the digital circuit how to subtract using the -bit number wheel. 9

i Number A 3 2 A i Carry Axis Add 4-BIT Number B Carry In Sum B i C i S i -bit Binary Number Wheel FULL Carry Out C i+ B 3 A 3 B 2 A 2 B A B A ADDER C 4 FA S 3 C 3 FA S 2 C 2 FA S C FA S C May be extended to n-bit full adder and corresponding n-bit number wheel. Most Significant Carry Axis Add 4-bit Binary Number wheel

4-BIT AND and OR CIRCUITS A 3 A 3 F 3 F 3 B 3 B 3 A 2 A 2 F 2 F 2 B 2 B 2 A F A F B B A A F F B B Other functions such as XOR, NAND, NOR, and NOT may be similarly implemented.

4-BIT ARITHMETIC LOGIC UNIT (ALU) SIMPLIFIED FUNCTIONAL DESCRIPTION OUTPUTS C out F C B SWITCH (MUX) 4 FA 4 FS 4 AND 4 OR A B MS 3 S 2 S S C IN TWO 4-BIT NUMBERS FUNCTION SELECTOR INPUTS 2

EXAMPLE 4-BIT ALU FUNCTION TABLE S3 S2 S S LOGIC M= A A B B ARITHMETIC M= A AND B A PLUS B A OR B A MINUSB A NAND B A + A A - B B + A XOR B B - 3

OPTIMIZED VERSION R 3 R 2 R R ADDS TO OPERANDS WHEN ADD/SUB = C 3 CONTAINS 4-BIT FA AND LOGIC CIRCUITS AS ABOVE, BUT DOES NOT HAVE FS C A 3 A 2 A A MOST SIGNIFICANT CARRY OR BORROW B 3 B 2 B B PERFORMS S COMPLEMENT OF B WHEN ADD/SUB = A B = A + 2s(B) ADD/SUB CONTROL 4

In this course, we do not use the optimized, 2 s complement ALU. The optimized version does not contain a FS circuit. We use the non-optimized, basic ALU, which does contain a FS circuit. This means that in this course, the ALU has a FS circuit to perform subtraction. 5

There are three types of memories: Flip Flop (FF) (-bit storage) and Latch What is the difference between a Flip Flop and a Latch? Register (n-bit storage) Memory (m-words by n-bits of storage) 6

Word Word n- m x n Memory m = 2 k words Each word has n-bits Word 2 k - p- p-bit register Flip-flop (-bit) 7

MEMORY (SEQUENTIAL) CIRCUITS 8

WAYS TO TRIGGER A FLIP FLOP LATCH FLIP FLOP 9

REGISTER Can be designed as a group of flip flops Example: 4-bit register, or a 4-bit word 2

WRITING TO A REGISTER 2

WRITING TO A REGISTER Write Timing Diagram Data Input OE (optional) D 3 D 2 D D Valid CLK (external) CLK (internal) Q 3 Q 2 Q Q Q 3 =D 3,Q 2 =D 2,Q =D,Q =D Valid 22

READING FROM A REGISTER Read Timing Diagram OE Q 3 Q 2 Q Q O 3 O 2 O O Valid Note: other control designs are possible: For example, R/W and OE could be input to a 2-input AND gate, whose output could be connected to the Enable pins of the tri-state buffers. 23

MEMORY Example: 8 x 4 Memory Eight Words, and each word has 4-bits 8 x 4 Memory 8 = 2 3 words, and each word has 4-bits Address 3-bit Data 4-bit Words A A D D A 2 D 2 D 3 R/Wn OE CS Block Diagram Representation 24

m x n MEMORY m x n Memory m = 2 k words, and each word has n-bits A A A k-2 m by n Memory D D... D n- A k- OE CS 25

WRITING TO MEMORY 26

READING FROM MEMORY 27

EXAMPLE: 4X3 MEMORY Example: 4 x 3 Memory Four Words, and each word has 3-bits 4 x 3 Memory 4 = 2 2 words, and each word has 3-bits Address 2-bit Data 3-bit Words A A D D D 2 R/Wn OE CS Block Diagram Representation 28

BLOCKING AND ENABLING PROPERTY OF AND GATE E X Y If E =, then Y = X (Enable) If E =, then Y = (Block) Example Application: Clock Enable E CLK Y If E =, then Y = If E =, then Y = 29

Schematic Block Diagram A A D D D 2 R/Wn OE CS Input data pins and output data pins are separated to simplify the analysis. 3

EXAMPLE Goal: Write b to location b, i.e., write 5 to location 2. End result should be: A A D D D 2 R/Wn OE CS 3

Step : Setup data word: b Data Address R/Wn CS At this point in time, the voltages (data) are applied to pins I 2 -I. = V = 5 V 32

Step : Setup data word: b Data Address R/Wn CS At this point in time, the voltages have flowed to the inputs of the FFs. = V = 5 V 33

Step : Setup data word: b Data Address R/Wn CS Also at this point in time, the V applied to pin CS has forced V at the CLK inputs of the FFs. = V = 5 V 34

Step : Setup data word: b Step 2: Setup address: b Data Address R/Wn CS At this point in time, the address applied to pins A -A has flowed to the Word Select gates. = V = 5 V 35

Step : Setup data word: b Step 2: Setup address: b Data Address R/Wn CS Due to {A A } = {}, Word 2 Select Line is the only active word select line. = V = 5 V 36

Step : Setup data word: b Step 2: Setup address: b Step 3: Select write mode Data Address R/Wn CS R/Wn is normally low (), so write mode is selected. = V = 5 V 37

Step : Setup data word: b Step 2: Setup address: b Step 3: Select write mode Step 4: Trigger the circuit by making CS= Data Address R/Wn CS At this point in time, the Write gate at Word 2 becomes. = V = 5 V 38

Step : Setup data word: b Step 2: Setup address: b Step 3: Select write mode Step 4: Trigger the circuit by making CS= Data Address R/Wn CS Also at this point in time, the CLK inputs to the FFs of Word 2 undergo a position transition. = V = 5 V 39

Step : Setup data word: b Step 2: Setup address: b Step 3: Select write mode Step 4: Trigger the circuit by making CS= Data Address R/Wn CS Also at this point in time, the data () is written into the FFs of Word 2. = V = 5 V 4

HOMEWORK: PERFORM A SIMILAR ANALYSIS FOR READ Show the incremental steps and timing diagram required to read the data located at memory location b. A A D D D 2 R/Wn OE CS 4

A BLANK MEMORY FOR YOU 42

HOMEWORK: PROBLEM STATEMENT Design a circuit that stores the 5-bit result of the last addition operation performed by a 4-bit full adder (FA) to an 8 words x 4-bit memory. Use an 8x4 memory that has similar control signals as the 4x3 memory given in the previous slides. Store the 5-bit result as follows: Step : store the MSb of the 5-bit result to Bit- of address of the memory. Ensure that the other bits of address are set to zero. Step 2: take the 4-bit output of the 4-bit FA circuit and store it at address of the memory. Use a given clock signal to execute the above steps and write to the memory. 43

HOMEWORK: PROBLEM STATEMENT PICTORIALLY CLK Given ALU C F3 F2 F F Your Circuit A A C F3F2FF Desired Result D D A 2 D 2 D 3 R/Wn OE CS 44

HOMEWORK: YOUR SOLUTION 45