EKT 221 : Chapter 4 Computer Design Basics

Slides:



Advertisements
Similar presentations
CPEN Digital System Design
Advertisements

6-1 Chapter 6 - Datapath and Control Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of Computer Architecture.
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Chapter 7 Henry Hexmoor Registers and RTL
Princess Sumaya University
8085 processor. Bus system in microprocessor.
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Instructor: Yuzhuang Hu The Shifter 3 clock cycles will be needed if using a bidirectional shift register with parallel load.  A clock.
Henry Hexmoor.
Overview Part 1 – Datapaths Part 2 – A Simple Computer
1 COMP541 Datapaths II Montek Singh Mar 22, 2007.
Chapter 7. Register Transfer and Computer Operations
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
CPEN Digital System Design Chapter 9 – Computer Design
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 10 – Computer.
Chapter 1_4 Part II Counters
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
CSC321 Where We’ve Been Binary representations Boolean logic Logic gates – combinational circuits Flip-flops – sequential circuits Complex gates – modules.
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Instructor: Yuzhuang Hu Another Design Example: PIG (Chapter 7-10) PIG is a single dice game. Two players roll the dice in turns. When.
Computer Design Basics
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 9 – Computer Design Basics Part 2 – A Simple.
EKT221 ELECTRONICS DIGITAL II CHAPTER 4: Computer Design Basics
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Chapter 4 Computer Design Basics. Chapter Overview Part 1 – Datapaths  Introduction  Datapath Example  Arithmetic Logic Unit (ALU)  Shifter  Datapath.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Instructor: Yuzhuang Hu Midterm The midterm is schedule on June 17 th, 17:30-19:30 pm. It covers the following:  VHDL Programming. 
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 10 – Computer.
Multiple-Cycle Hardwired Control Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
ECE 445 – Computer Organization
CoE3DJ4 Digital Systems Design
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Register Transfer Languages (RTL)
Lecture 10: Computer Design Basics: The ALU and the Shifter Soon Tee Teoh CS 147.
1 COMP541 Datapaths I Montek Singh Mar 8, Topics  Over next 2/3 classes: datapaths  Basic register operations Book sections 7-2 to 7-6 and 7-8.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Datapath.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 23 Introduction Computer Specification –Instruction Set Architecture (ISA) - the specification.
EKT 221 : Digital 2 Computer Design Basics Date : Lecture : 2 hrs.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
REGISTER TRANSFER AND MICROOPERATIONS
REGISTER TRANSFER AND MICROOPERATIONS
Computer Design Basics
Chap 7. Register Transfers and Datapaths
Morgan Kaufmann Publishers The Processor
KU College of Engineering Elec 204: Digital Systems Design
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Morgan Kaufmann Publishers
Register Transfer and Microoperations
Instructor: Alexander Stoytchev
Overview Part 1 – Datapaths Part 2 – A Simple Computer Introduction
Unit 12 CPU Design & Programming
Overview Part 1 - Registers, Microoperations and Implementations
CSC 220: Computer Organization
Datapath.
Branch instructions We’ll implement branch instructions for the eight different conditions shown here. Bits 11-9 of the opcode field will indicate the.
Computer Design Basics
ECE 352 Digital System Fundamentals
Instruction execution and ALU
Presentation transcript:

EKT 221 : Chapter 4 Computer Design Basics

Chapter Overview Part 1 – Datapaths Part 2 – A Simple Computer Introduction Datapath Example Arithmetic Logic Unit (ALU) Shifter Datapath Representation Control Word Part 2 – A Simple Computer Instruction Set Architecture (ISA) Single-Cycle Hardwired Control Instruction Decoder Sample Instructions Single Cycle Computer Issues Multiple Cycle Hardwired Control Sequential Control Design Digital 2 will focus on Part 1 Part 2 will be covered in Computer Architecture & Microprocessor. however prior reading is encourage.

Part 1 : Datapath Computer Specification Instruction Set Architecture (ISA) The specification of a computer's appearance to a programmer at its lowest level. It describe all the available instruction set in the computer, where it is kept (address) and how to use it (read). Computer Architecture A high-level description of the hardware implementing the computer derived from the ISA

Part 1 : Datapath The architecture usually includes additional specifications such as speed, cost, and reliability. Simple computer architecture comprise of: Datapath for performing operations Control unit for controlling datapath operations A datapath is specified by: A set of registers The microoperations performed on the data stored in the registers A control interface

Datapaths : Guiding principles for basic datapaths (Typical): The set of registers Collection of individual registers A set of registers with common access resources called a register file A combination (individual & set of reg.) of the above Microoperation implementation One or more shared resources for implementing microoperations Buses - shared transfer paths Arithmetic-Logic Unit (ALU) - shared resource for implementing arithmetic and logic microoperations Shifter - shared resource for implementing shift microoperations

The combination of: Datapath A set of registers with a shared ALU, and interconnecting paths.

Block Diagram of a Generic Datapath Four parallel-load registers • Two mux-based register selectors • Register destination decoder • Mux B for external constant input • Buses A and B with external address and data outputs • ALU and Shifter with Mux F for output select (Function Unit) • Mux D for external data input • Logic for generating status bits V, C, N, Z

Block Diagram of a Generic Datapath Example: R1  R2 + R3 A Select Place contents of R2 into Bus A 10 B Select Place contents of R3 into the input of MUX B 11 MB Select Place the 0 input of MUX B into Bus B G Select Provide the arithmetic operation A + B ???? (4bits) MF Select Place the ALU o/p on MUX F o/p MD Select Place the MUX F o/p onto Bus D Destination Select To select R1 as the destination of the data on Bus D 01 Load enable To enable a register R1 = HIGH Note : G Select must refer to Function Table of Arithmetic Circuit (refer next 3 slides)

The Arithmetic/ Logic Unit (ALU)

Arithmetic Logic Unit (ALU) ALU Comprise of: An arithmetic circuit (add, subtract) A logic circuit (bitwise operation) A selector to pick between the two circuits 1 2 3

Arithmetic Logic Unit (ALU) ALU Comprise of: An arithmetic circuit An n-bit parallel adder A block of input logic with 2 selectors S1 and S0 1 * Mode Select (S2) distinguishes between arithmetic and logic operations which actually construct item 3 G Select (4-bits)

ALU Is a combinational circuit that performs a set of basic microoperations on: Arithmetic, and Logic Has a number of selection lines used to determine the operations to be performed e.g. n selection lines can specify up to 2n types of operations.

An n-bit ALU n data inputs of A are combined with n data inputs of B, to generate the result of an operation at the G outputs. S2=0  Arithmetic operations (8). Which one – is specified by S1, So and Cin. S2=1  Logic operations (4). Which one – specified by So and Cin.

Question What are the 8 arithmetic operations? What are the 4 logic operations?

How to design the ALU? Design the arithmetic section Design the logic section Combine both sections

To be designed… One Stage of ALU S2 = 0 for Arithmetic S2 = 1 for Logic

Arithmetic Circuit Design Given …

Arithmetic Circuit Design 1 Analyse the Circuit: Use Note : X = A G = A + Y + Cin For S1 and S0 = 00, then G = A + 0 + 0 G = A Eg. We can verify for n = 4 bit: A = 1010 B = 0101

Building the B input Logic Input = S1, S0 and B Output = Y Obtain the K-Map Get the Boolean Expression Y = BS0 + BS1

Building the B input Logic Y = BS0 + BS1 Y Example of a 4-bit Arithmetic Circuit Any other alternative?

Use Multiplexer B B 1

Building the Logic Circuit 2 The Logic Circuit performs bitwise operation Commonly : AND, OR, XOR and NOT Note : if 4 bit is wanted, then we have to arrange it in array One Stage of Logic Circuit

Building the Selector for choosing Arithmetic or Logic Unit 3 S2 = 0 for Arithmetic S2 = 1 for Logic One Stage of ALU Refer also Fig. 10.2

Exercise Draw the complete diagram of the ALU, which consists of: The Arithmetic Circuit The Logic Circuit The Selector circuit For: A bit-slice (one stage) circuit A 4-bits circuit

S2 = 0 for Arithmetic operation S1 = 0 S0 = 1 Cin = 0 Example: R1  R2 + R3 G Select Provide the arithmetic operation A + B ???? (4bits) Therefore; S2 = 0 for Arithmetic operation S1 = 0 S0 = 1 Cin = 0 LSB G Select (4-bits) 0010 0010 Answer : MSB

The Shifter The Shifter Shifts the value on Bus B, placing the result on an input of MUX F The Shifter can: Shift Right Shift Left It is obvious that the shifter would be a bidirectional shift register with parallel load

4 Bit Basic Shifter S Operation 00 Parallel Load B (B to be passed thru the shifter unchanged) 01 Shift Right 10 Shift Left

Barrel Shifter Sometimes the data need to be shifted ore rotated more than one bit position or in a single clock cycle A Barrel Shifter can perform this by using MUX 2n input requires 2n MUX

4-Bit Barrel Shifter A rotate is a shift in which the bits shifted out are inserted into the positions vacated The circuit rotates its contents left from 0 to 3 positions depending on Selector S. Note that a left rotation by three (3) position the same as a right rotation by one position in this 4 bit barrel shifter

Datapath Representation Register File Simplified Block Diagram Function Unit

Datapath Representation Notice that the G, H and MF Select are combined as FS Boolean Equations: MF = F3.F2 Gi = Fi Hi = Fi

Control Word The datapath has many control inputs The signals driving these inputs can be defined and organized into a control word To execute a microinstruction, we apply control word values for a clock cycle. For most microoperations, the positive edge of the clock cycle is needed to perform the register load The datapath control word format and the field definitions are shown on the next slide

The Control Word Fields Total : 16-bit (3-bit) (3-bit) (3-bit) (4-bit) (1-bit) Fields : DA – D Address AA – A Address BA – B Address MB –Mux B FS – Function Select MD –Mux D RW – Register Write The connections to datapath are shown in the next slide

Control Word Encoding

Example 1 Given the 16-bit Control Word as 0010100110010101 Field : DA AA BA MB FS MD RW Binary : Symbolic : 001 010 011 0 0101 0 1 R1 R2 R3 Reg F=A+B+1 Function Write Refer to Control Word Encoding Table Answer : R1  R2 + R3 + 1

Example 2 1000101100111001 R4  sl R6 Given the 16-bit Control Word as Field : DA AA BA MB FS MD RW Binary : Symbolic : 100 010 110 0 1110 0 1 R4 R2 R6 Reg F=sl B Function Write Refer to Control Word Encoding Table Answer : R4  sl R6

Example 3 Given the 16-bit Control Word as 0100000110011000 Field : DA AA BA MB FS MD RW Binary : Symbolic : 010 000 011 0 0110 0 0 R2 R0 R3 Reg F = A-1 Data_In No_Write Refer to Control Word Encoding Table Answer : Data Out  R3 Address B is selected because MB = 0 (Refer to block Diagram on Slide 7)

Example 4 Given the 16-bit Control Word as 1000000110011011 Field : DA AA BA MB FS MD RW Binary : Symbolic : R4 R0 R3 Reg F = A-1 Data_In Write 100 000 011 0 0110 1 1 Refer to Control Word Encoding Table Answer : R4  Data In Address D is selected because MD = 1 (Refer to block Diagram on Slide 7)

Example 5 Given the 16-bit Control Word as 1010000110001001 Field : DA AA BA MB FS MD RW Binary : Symbolic : 101 000 011 0 0010 0 1 R5 R0 R3 Reg F = A+B Function Write Refer to Control Word Encoding Table Answer : R5  R0 + R3

Example 5 continue…… 1010000110001001 R5  R0 + R3 Given the 16-bit Control Word as 1010000110001001 Answer : R5  R0 + R3 Assume : Registers are 8-bit and the value given are in hex, Find: The new value of register content if R0 = 5 and R3 = 3 The new value of register content if R0 = 7 and R3 = 1C Answers in 8-bit binary. 0000 0101 + 0000 0011 0000 1000 1. 0000 0111 + 0001 1100 0010 0011 2.

Other Examples of Control Word

Assignment Folder Questions 10 – 3, 4, 5, 6, 7

THANK YOU