Controller Implementation--Part II

Similar documents
EECS150. Implement of Processor FSMs

Control Unit Implementation

Moore EECS150. Implement of Processor FSMs. Memory-Register Interface Timing. Processor / Memory Interface. Processor Signal FLow

Alternative controller FSM implementation approaches based on:

Alternative Ways to Implement Processor FSMs. Outline. Moore Machine State Diagram. Random Logic. Moore Machine Diagram

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops. Clock Skew. Cascading Edge-triggered Flip-Flops. Why Gating of Clocks is Bad!

Microprogramming is a technique to implement the control system of a CPU using a control store to hold the microoperations.

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

MICROPROGRAMMED CONTROL

Materials: 1. Projectable Version of Diagrams 2. MIPS Simulation 3. Code for Lab 5 - part 1 to demonstrate using microprogramming

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Implementing the Control. Simple Questions

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 16 Micro-programmed Control

Micro-programmed Control Ch 15

Chapter 3 : Control Unit

Machine Instructions vs. Micro-instructions. Micro-programmed Control Ch 15. Machine Instructions vs. Micro-instructions (2) Hardwired Control (4)

Micro-programmed Control Ch 15

Digital System Design Using Verilog. - Processing Unit Design

4. MICROPROGRAMMED COMPUTERS

Materials: 1. Projectable Version of Diagrams 2. MIPS Simulation 3. Code for Lab 5 - part 1 to demonstrate using microprogramming

Micro-programmed Control Ch 17

Hardwired Control (4) Micro-programmed Control Ch 17. Micro-programmed Control (3) Machine Instructions vs. Micro-instructions

Blog -

Processing Unit CS206T

The Processor: Datapath & Control

CONTROL UNIT CONTROL UNIT. CONTROL vs DATA PATH. Instruction Sequencing. Two main operations of Control Unit can be identified:

Computer Organization

Systems Architecture I

Computer Architecture Programming the Basic Computer

Multicycle Approach. Designing MIPS Processor

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

Chapter 20 - Microprogrammed Control (9 th edition)

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller

Initial Representation Finite State Diagram. Logic Representation Logic Equations

Chapter 4. MARIE: An Introduction to a Simple Computer 4.8 MARIE 4.8 MARIE A Discussion on Decoding

CSC 220: Computer Organization Unit 12 CPU programming

Advanced Computer Architecture

Micro-Operations. execution of a sequence of steps, i.e., cycles

Name: ID# UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS150 Fall 2001 Prof. Subramanian Midterm III

Module 5 - CPU Design

Block diagram view. Datapath = functional units + registers

Microprogrammed Control Approach

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

Topic #6. Processor Design

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

CPE 335. Basic MIPS Architecture Part II

CC 311- Computer Architecture. The Processor - Control

CpE 442. Designing a Multiple Cycle Controller

Processing Unit. Unit II

Chapter 16. Control Unit Operation. Yonsei University

Fig: Computer memory with Program, data, and Stack. Blog - NEC (Autonomous) 1

William Stallings Computer Organization and Architecture 8 th Edition. Micro-programmed Control

omputer Design Concept adao Nakamura

Microprogramming: Basic Idea

5.7. Microprogramming: Simplifying Control Design 5.7

Processor (I) - datapath & control. Hwansoo Han

Objective now How are such control statements registers and other components Managed to ensure proper execution of each instruction

Introduction to CPU Design

Chapter 4 The Processor (Part 2)

CC312: Computer Organization

COMPUTER STRUCTURE AND ORGANIZATION

Initial Representation Finite State Diagram Microprogram. Sequencing Control Explicit Next State Microprogram counter

Designing a Multicycle Processor

Control unit. Input/output devices provide a means for us to make use of a computer system. Computer System. Computer.

Chapter 05: Basic Processing Units Control Unit Design. Lesson 15: Microinstructions

Computer Architecture 2/26/01 Lecture #

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón

Topics. Computer Organization CS Exam 2 Review. Infix Notation. Reverse Polish Notation (RPN)

PROBLEMS. 7.1 Why is the Wait-for-Memory-Function-Completed step needed when reading from or writing to the main memory?

CS 2461: Computer Architecture I

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control

Register-Level Design

Major and Minor States

ENGG3380: Computer Organization and Design Lab5: Microprogrammed Control

Outline. EEL-4713 Computer Architecture Designing a Single Cycle Datapath

Chapter 6: Datapath and Control. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V.

Systems Architecture

M. C. A. (Second Semester) Theory Examination,

SCRAM Introduction. Philipp Koehn. 19 February 2018

Computer Organization II CMSC 3833 Lecture 33

Architecture Synthesis Part 3

The Processing Unit. TU-Delft. in1210/01-pds 1

MICROPROGRAMMED CONTROL

MC9211Computer Organization. Unit 4 Lesson 1 Processor Design

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

Chapter 4. MARIE: An Introduction to a Simple Computer

Basic Processing Unit (Chapter 7)

Computer Architecture

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

MICROPROGRAMMED CONTROL

Recap: A Single Cycle Datapath. CS 152 Computer Architecture and Engineering Lecture 8. Single-Cycle (Con t) Designing a Multicycle Processor

Major CPU Design Steps

MARIE: An Introduction to a Simple Computer

ENE 334 Microprocessors

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE

Department of Electrical Engineering Introduction to Computer Engineering 1 Assignment 6: Computer Architecture

Transcription:

Controller Implementation--Part II Alternative controller FSM implementation approaches based on: Classical Moore and Mealy machines Time-State: Divide and Conquer Jump counters Microprogramming (ROM) based approaches» Branch sequencers» Horizontal microcode» Vertical microcode CS 5 - Fall 25 Lec #5: Microprogramming - Branch Sequencers Concept Implement Next State Logic via ROM Address ROM with current state and inputs Problem: ROM doubles in size for each additional input Note: Jump counter trades off ROM size vs. external logic Only jump states kept in ROM Even in hybrid approach, state + input subset form ROM address Branch Sequencer: between the extremes Next State stored in ROM Each state limited to small number of next states Always a power of 2 Observe: only a small set of inputs are examined in any state CS 5 - Fall 25 Lec #5: Microprogramming - 2

Branch Sequencers 4 Way Branch Sequencer I n p u t s Mux Mux β α a a a2 a3 a4 a5 x x x x 64 Word ROM Z Y X W C S o i n g t n r a o l l s N α β α β α β α β W X Y Z state Current State selects two inputs to form part of ROM address These select one of four possible next states (and output sets) Every state has exactly four possible next states CS 5 - Fall 25 Lec #5: Microprogramming - 3 Branch Sequencer Processor CPU Design Example s<3> s<2> s<> s<> S3 S2 S S G E5 E4 AC<5> E3 AC<5> E2 E E E9 E8 EOUT E7 \α E6 E5 IR<5> E4 IR<4> E3 E2 + Wait E Wait E + S3 S2 S S 5 E5 5 G E4 E3 E2 E E E9 E8 E7 E6 E5 E4 E3 E2 E E EOUT \β Alpha, Beta multiplexer input setup CS 5 - Fall 25 Lec #5: Microprogramming - 4

Example Processor FSM ROM ADDRESS ROM CONTENTS (Reset, Current State, a, b) Next State Register Transfer Operations RES X X (IF) PC MAR, PC + PC IF (IF) (IF) MAR Mem, Read, Request IF (IF2) MAR Mem, Read, Request (IF) Mem MBR IF2 (IF2) (OD) MBR IR OD (LD) IR MAR (ST) IR MAR, AC MBR (AD) IR MAR (BR) IR MAR CS 5 - Fall 25 Lec #5: Microprogramming - 5 Example Processor FSM ROM ADDRESS ROM CONTENTS (Reset, Current State, a, b) Next State Register Transfer Operations LD X X (LD) MAR Mem, Read, Request LD (LD2) Mem MBR (LD) MAR Mem, Read, Request LD2 X X (RES) MBR AC ST X X (ST) MAR Mem, Write, Request, MBR Mem ST (RES) (ST) MAR Mem, Write, Request, MBR Mem AD X X (AD) MAR Mem, Read, Request AD (AD2) (AD) MAR Mem, Read, Request AD2 X X (RES) MBR + AC AC BR (RES) (RES) IR PC CS 5 - Fall 25 Lec #5: Microprogramming - 6

Branch Sequencers α and β MUX Control Alternative Horizontal Implementation α β α β α β α β A A A2 A3 n- n- n- n- Datapath Control Signals I N P U T S M U M X U X α β bit n-... 2 3 2 3 4: MUX 4: MUX bit bit n bit state register Input MUX controlled by encoded signals, not state Much fewer inputs than unique states! In example FSM, input MUX can be 2:! Adding length to ROM word saves on bits vs. doubling words Vertical format: (4 + 4) x 64 = 52 ROM bits Horizontal format: (4 + 4 x 4 + 2) x 6 = 52 ROM bits CS 5 - Fall 25 Lec #5: Microprogramming - 7 Microprogramming How to organize the control signals Implement control signals by storing 's and 's in a ROM Horizontal vs. vertical microprogramming Horizontal: ROM output for each control signal Vertical: encoded control signals in ROM, decoded externally some mutually exclusive signals can be combined helps reduce ROM length CS 5 - Fall 25 Lec #5: Microprogramming - 8

Microprogramming Register Transfer/Microoperations 4 Register Transfer operations become 22 Microoperations: PC ABUS IR ABUS MBR ABUS RBUS AC AC ALU A MBUS ALU B ALU ADD ALU PASS B MAR Address Bus MBR Data Bus ABUS IR ABUS MAR Data Bus MBR RBUS MBR MBR MBUS PC PC + PC ABUS PC Read/Write Request AC RBUS ALU Result RBUS CS 5 - Fall 25 Lec #5: Microprogramming - 9 Horizontal Microprogramming Horizontal Branch Sequencer α, β Mux bits 4 x 4 Next State bits 22 Control operation bits α mux β mux 4 bits total Next States A A A2 A3 PC ABUS IR ABUS MBR ABUS RBUS AC AC ALU A MBUS ALU B ALU ADD ALU PASS B MAR Address Bus MBR Data Bus ABUS IR ABUS MAR Data Bus MBR RBUS MBR MBR MBUS PC PC + PC ABUS PC Read/Write Request AC RBUS ALU Result RBUS CS 5 - Fall 25 Lec #5: Microprogramming -

Horizontal Microprogramming Moore Processor ROM Current State (Address) RES () IF () IF () IF2 () IF3 () OD () LD () LD () LD2 () ST () ST () AD () AD () AD2 () BR () BR () α mux β mux Next States A A A2 A3 Alpha inputs: = Wait, Beta inputs: = AC<5>, PC ABUS IR ABUS MBR ABUS RBUS AC AC ALU A MBUS ALU B = IR<5> = IR<4> ABUS IR CS 5 - Fall 25 Lec #5: Microprogramming - ALU ADD ALU PASS B MAR Address Bus MBR Data Bus ABUS MAR Data Bus MBR RBUS MBR MBR MBUS PC PC + PC ABUS PC Read/Write Request AC RBUS ALU Result RBUS Horizontal Microprogramming Advantages: most flexibility -- complete parallel access to datapath control points Disadvantages: very long control words -- + bits for real processors NOTE: Not all microoperation combinations make sense! Output Encodings: Group mutually exclusive signals Use external logic to decode Example: Æ PC, PC + Æ PC, ABUS Æ PC mutually exclusive Save ROM bit with external 2:4 Decoder CS 5 - Fall 25 Lec #5: Microprogramming - 2

Horizontal Microprogramming Partially Encoded Control Outputs C O N T R O L R O M ALU ADD ALU PASS B MAR Address Bus MBR Data Bus ABUS MAR RBUS MBR Read/Write Request AC RBUS 2 2 2:4 DEC 2:4 DEC RBUS AC AC ALU A MBUS ALU B MBR MBUS ALU Result RBUS MBR ABUS ABUS IR PC PC + PC ABUS PC PC ABUS IR ABUS Data Bus MBR CS 5 - Fall 25 Lec #5: Microprogramming - 3 Vertical Microprogramming More extensive encoding to reduce ROM word length Typically use multiple microword formats: Horizontal microcode -- next state + control bits in same word Separate formats for control outputs and "branch jumps" may require several microwords in a sequence to implement same function as single horizontal word In the extreme, very much like assembly language programming CS 5 - Fall 25 Lec #5: Microprogramming - 4

Vertical Microprogramming Branch Jump Compare indicated signal to or Branch Jump Format Type Condition Select Condition Compare 2 6 Next Address = Wait = AC<5> = IR<5> = IR<4> Register Transfer Source, Destination, Operation ROM Bits Register Transfer Format : NO OP : PC ABUS : IR ABUS : MBR MBUS : MAR M : AC RBUS : ALU Res RBUS 3 3 3 Source Destination Operation : NO OP : RBUS AC : MBUS IR : ABUS MAR : M MBR : RBUS MBR : ABUS PC : MBR M CS 5 - Fall 25 Lec #5: Microprogramming - 5 : NO OP : ALU ADD : ALU PASS B : PC : PC + PC : Read : Write Vertical Microprogramming ROM ADDRESS SYMBOLIC CONTENTS BINARY CONTENTS RES RT PC MAR, PC + PC IF RT MAR M, Read BJ Wait=, IF IF RT MAR M, M MBR, Read BJ Wait=, IF IF2 RT MBR IR BJ Wait=, IF2 RT IR MAR OD BJ IR<5>=, OD BJ IR<4>=, ST LD RT MAR M, Read LD RT MAR M, M MBR, Read BJ Wait=, LD LD2 RT MBR AC BJ Wait=, RES BJ Wait=, RES CS 5 - Fall 25 Lec #5: Microprogramming - 6

Vertical Microprogramming ROM ADDRESS SYMBOLIC CONTENTS BINARY CONTENTS ST RT AC MBR RT MAR M, MBR M, Write ST RT MAR M, MBR M, Write BJ Wait=, RES BJ Wait=, ST OD BJ IR<4>=, BR AD RT MAR M, Read AD RT MAR M, M MBR, Read BJ Wait=, AD AD2 RT AC + MBR AC BJ Wait=, RES BJ Wait=, RES BR BJ AC<5>=, RES RT IR PC BJ AC<5>=, RES 3 words x ROM bits = 3 bits total versus 6 x 38 = 68 bits horizontal CS 5 - Fall 25 Lec #5: Microprogramming - 7 Vertical Programming Controller Block Diagram ROM Address T SRC DST OP Reset ALU ADD ALU PASS B 2 3:8 3 DEC 4 PC + PC 5 Read 6 Write Enb 7 3:8 DEC Enb 2 3 4 5 6 7 RBUS AC ABUS IR ABUS MAR M MBR RBUS MBR ABUS PC MBR M PC Read/Write Request Wait AC<5> IR<5> IR<4> Cond Logic LD CLR µpc CNT PC ABUS IR ABUS 2 3:8 3 MBR ABUS DEC 4 MAR M 5 AC RBUS 6 ALU Res RBUS Enb 7 Reset Clk CS 5 - Fall 25 Lec #5: Microprogramming - 8

Vertical Microprogramming Condition Logic Condition Selector Condition Comparator Microinstruction Type LD Wait AC<5> IR<5> IR<4> 4: MUX Microinstruction Type CNT CS 5 - Fall 25 Lec #5: Microprogramming - 9 Vertical Microprogramming Writeable Control Store Part of control store addresses map into RAM» Allows assembly language programmer to implement own instructions» Extend "native" instruction set with application specific instructions» Requires considerable sophistication to write microcode» Not a popular approach with today's processors Make the native instruction set simple and fast Write "higher level" functions as assembly language sequences CS 5 - Fall 25 Lec #5: Microprogramming - 2

Controller Implementation Summary-- Part II Control Unit Organization Register transfer operation Classical Moore and Mealy machines Time State Approach Jump Counter Branch Sequencers Horizontal and Vertical Microprogramming CS 5 - Fall 25 Lec #5: Microprogramming - 2