Systems I: Computer Organization and Architecture



Similar documents
BASIC COMPUTER ORGANIZATION AND DESIGN

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Systems I: Computer Organization and Architecture

(Refer Slide Time: 00:01:16 min)

Chapter 9 Computer Design Basics!

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

MACHINE ARCHITECTURE & LANGUAGE

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Summary of the MARIE Assembly Language

EE282 Computer Architecture and Organization Midterm Exam February 13, (Total Time = 120 minutes, Total Points = 100)

Let s put together a Manual Processor

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Chapter 2 Logic Gates and Introduction to Computer Architecture

Central Processing Unit (CPU)

PART B QUESTIONS AND ANSWERS UNIT I

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

CPU Organization and Assembly Language

1 Classical Universal Computer 3

Binary Adders: Half Adders and Full Adders

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

8085 INSTRUCTION SET

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Computer Architecture

Traditional IBM Mainframe Operating Principles

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

MICROPROCESSOR AND MICROCOMPUTER BASICS

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Microprocessor & Assembly Language

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Central Processing Unit

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

EECS 427 RISC PROCESSOR

Lab 1: Full Adder 0.0

A3 Computer Architecture

TEACHING COMPUTER ARCHITECTURE THROUGH SIMULATION (A BRIEF EVALUATION OF CPU SIMULATORS) *

Systems I: Computer Organization and Architecture

5 Combinatorial Components. 5.0 Full adder. Full subtractor

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

CPU Organisation and Operation

PROBLEMS (Cap. 4 - Istruzioni macchina)

Computer organization

Notes on Assembly Language

Computer Organization and Architecture

Gates, Circuits, and Boolean Algebra

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)


CHAPTER 7: The CPU and Memory

The 104 Duke_ACC Machine

Levels of Programming Languages. Gerald Penn CSC 324

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

Review: MIPS Addressing Modes/Instruction Formats

PROBLEMS #20,R0,R1 #$3A,R2,R4

Figure 8-1 Four Possible Results of Adding Two Bits

X86-64 Architecture Guide

Instruction Set Architecture (ISA)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

CPU Sim 3.1: A Tool for Simulating Computer Architectures for CS3 classes

Computer Organization. and Instruction Execution. August 22

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

PROBLEMS. which was discussed in Section

Instruction Set Design

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

MACHINE INSTRUCTIONS AND PROGRAMS

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

CSE 141L Computer Architecture Lab Fall Lecture 2

Chapter 5 Instructor's Manual

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

CSE2102 Digital Design II - Topics CSE Digital Design II

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Instruction Set Architecture

Memory Elements. Combinational logic cannot remember

İSTANBUL AYDIN UNIVERSITY

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

CS352H: Computer Systems Architecture

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

Microprocessor and Microcontroller Architecture

In the Beginning The first ISA appears on the IBM System 360 In the good old days

Solutions. Solution The values of the signals are as follows:

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Lecture 8: Synchronous Digital Systems

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Faculty of Engineering Student Number:

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Building A RISC Microcontroller in an FPGA

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

CHAPTER 3 Boolean Algebra and Digital Logic

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches:

Transcription:

Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions. When these control signals are generated by hardware, the control unit is hardwired. When these control signals originate in data stored in a special unit and constitute a program on the small scale, the control unit is microprogrammed.

Control memory The control function specifying a microoperation is a binary variable whose active state could be either or. In the variable s active state, the microoperation is executed. The string of control variables which control the sequence of microoperations is called a control word. The microoperations specified in a control word is called a microinstruction. Each microinstruction specifies one or more microoperations that is performed. The control unit coordinates stores microinstruction in its own memory (usually ROM) and performed the necessary steps to execute the sequences of microinstructions (called microprograms). The Microprogrammed Control Unit In a microprogrammed processor, the control unit consists of: Control address register contains the address of the next microinstruction to be executed. Control data register contains the microinstruction to be executed. The sequencer determines the next address from within control memory Control memory where microinstructions are stored.

Microprogrammed Control Organization External input Next -address generator (sequencer) Control address register Control Memory (ROM) Control data register Control word Next -address information Sequencer The sequencer generates a new address by: incrementing the CAR loading the CAR with an address from control memory. transferring an external address or loading an initial address to start the control operations.

Address Sequencing Microinstructions are usually stored in groups where each group specifies a routine, where each routine specifies how to carry out an instruction. Each routine must be able to branch to the next routine in the sequence. An initial address is loaded into the CAR when power is turned on; this is usually the address of the first microinstruction in the instruction fetch routine. Next, the control unit must determine the effective address of the instruction. Mapping The next step is to generate the microoperations that executed the instruction. This involves taking the instruction s opcode and transforming it into an address for the the instruction s microprogram in control memory. This process is called mapping. While microinstruction sequences are usually determined by incrementing the CAR, this is not always the case. If the processor s control unit can support subroutines in a microprogram, it will need an external register for storing return addresses.

Addressing Sequencing (continued) When instruction execution is finished, control must be return to the fetch routine. This is done using an unconditional branch. Addressing sequencing capabilities of control memory include: Incrementing the CAR Unconditional and conditional branching (depending on status bit). Mapping instruction bits into control memory addresses Handling subroutine calls and returns. Selection Of Address For Control Memory Instruction Code Branch address Status bits Branch Logic cond & uncond. bran. MUX select Mapping Logic ext addr. Multiplexers subroutine return next microop Subroutine Register (SBR) Clock Control Address Register (CAR) Incrementer Select a status bit Control Memory Microoperations

Conditional Branching Status bits provide parameter information such as the carry-out from the adder, sign of a number, mode bits of an instruction, etc. control the conditional branch decisions made by the branch logic together with the field in the microinstruction that specifies a branch address. Branch Logic Branch Logic - may be implemented in one of several ways: The simplest way is to test the specified condition and branch if the condition is true; else increment the address register. This is implemented using a multiplexer: If the status bit is one of eight status bits, it is indicated by a 3-bit select number. If the select status bit is, the output is ; else it is. A generates the control signal for the branch; a generates the signal to increment the CAR. Unconditional branching occurs by fixing the status bit as always being.

Mapping of Instruction Branching to the first word of a microprogram is a special type of branch. The branch is indicated by the opcode of the instruction. The mapping scheme shown in the figure allows for four microinstruction as well as overflow space from to. Mapping From Instruction Code To Microoperation Address address Mapping bits: Microinstruction addresss: x x x x

Subroutines Subroutine calls are a special type of branch where we return to one instruction below the calling instruction. Provision must be made to save the return address, since it cannot be written into ROM. Computer Hardware Configuration MUX AR Memory 248 x 6 PC MUX 6 SBR 6 CAR 5 DR Control memory 28 x 2 ALSU 5 AC

Computer Instructions 5 4 I Opcode Address Symbol Opcode Description ADD AC AC + M[EA] BRANCH STORE IF (AC > ) THEN PC EA M[EA] AC EXCHANGE AC M[EA], M[EA] AC Microinstruction Code Format (2 bits) F F2 F3 CD BR AD F, F2, F3 : Microoperation Field CD: Condition For Branching BR: Branch Field AD: Address Field

Symbols and Binary Code For Microinstruction Fields F Microoperation None AC AC + DR AC AC AC + AC DR AR DR(-) AR PC M[AR] DR Symbol NOP ADD CLRAC INCAC DRTAC DRTAR PCTAR WRITE Symbols and Binary Code For Microinstruction Fields (continued) F2 Microoperation None AC AC- DR AC AC DR AC AC DR DR M[AR] DR AC DR DR + DR(-) PC Symbol NOP SUB OR AND READ ACTDR INCDR PCTDR

Symbols and Binary Code For Microinstruction Fields (continued) F3 Microoperation None AC AC DR AC AC AC shl AC AC shr AC PC PC + PC AR Reserved Symbol NOP XOR COM SHL SHR INCPC ARTPC Symbols and Binary Code For Microinstruction Fields (continued) CD Condition Symbol Comments Always = U Unconditional Branch DR(5) I Indirect Address bit AC(5) S Sign bit of AC AC = Z Zero value in AC

Symbols and Binary Code For Microinstruction Fields (continued) BR Symbol Function JMP CAL RET CAR AR if condition = CAR CAR + if condition = CAR AR, SBR CAR + if cond. = CAR CAR + if condition = CAR SBR (return from subroutine) MAP CAR(2-5) DR(-4), CAR(,, 6) Symbolic Microinstructions It is possible to create a symbolic language for microcode that is machine-translatable to binary code. Each line define a symbolic microinstruction with each column defining one of five fields: Label - Either blank or a name followed by a colon (indicates a potential branch) Microoperations - One, Two, Three Symbols, separated by commas (indicates that the microoperation being performed) CD - Either U, I, S or Z (indicates condition) BR - One of four two-bit numbers AD - A Symbolic Address, NEXT (address), RET, MAP (both of these last two converted to zeros by the assembler) (indicates the address of the next microinstruction) We will use the pseudoinstruction ORG to define the first instruction (or origin) of a microprogram, e.g., ORG 64 begins at.

Partial Symbolic Microprogram Label Microoperations CD BR AD ORG ADD: NOP I CALL INDRCT READ U JMP NEXT ADD U JMP FETCH ORG 4 BRANCH: NOP S JMP OVER NOP U JMP FETCH OVER: NOP I CALL INDRCT ARTPC U JMP FETCH ORG 8 STORE: NOP I CALL INDRCT ACTDR U JMP NEXT WRITE U JMP FETCH Partial Symbolic MicroProgram (continued) ORG 2 EXCHANGE: NOP I CALL INDRCT READ U JMP NEXT ARTDR, DRTACU JMP NEXT WRITE U JMP FETCH ORG 64 FETCH: PCTAR U JMP NEXT READ, INCPC U JMP NEXT DRTAC U MAP INDRCT: READ U JMP NEXT DRTAC U RET

Partial Binary Microprogram Address Binary Microinstruction Micro- Routine Decimal Binary F F2 F3 CD BR AD ADD 2 3 BRANCH 4 5 6 7 STORE 8 9 EXCHANGE 2 3 4 5 FETCH 64 65 66 INDRCT 67 68 Control Unit Design Each field of k bits allows for 2 k microoperations. The number of control bits can be reduced by grouping mutually exclusive microoperations together. Each field requires its own decoder to produce the necessary control signals.

Decoding of Microoperation Fields F F2 F3 3 x 8 decoder 7 6 5 4 3 2 3 x 8 decoder 7 6 5 4 3 2 3 x 8 decoder 7 6 5 4 3 2 DRTAC ADD From PC From DR(-) AND ALSU DRTAR PCTAR Select Load AC Multiplexers Load AR Clock Microprogram Sequencer The microprogram sequencer selects the next address in control memory from which a microinstruction is to be fetched. Depending on the condition and on the branching type, it will be: an external (mapped) address the next microinstruction a return from a subroutine the address indicated in the microinstruction.

Microprogram Sequencer For A Control Memory External (MAP) I I T Input Logic L 3 2 S S MUX SBR I S Z MUX2 Select Test Clock CAR Incrementer Control memory Microops CD BR AD Input Logic Truth Table For A Microprogrammed Sequencer BR Field Input MUX Load SBR I I T S S L Next address Specified addr. x Subroutine ret. x Ext. addr.