Instructor: Yuzhuang Hu Midterm The midterm is schedule on June 17 th, 17:30-19:30 pm. It covers the following:  VHDL Programming. 

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

Instructor: Yuzhuang Hu Final Exam! The final exam is scheduled on 7 th, August, Friday 7:00 pm – 10:00 pm.
9-6 The Control Word Fig The selection variables for the datapath control the microoperations executed within datapath for any given clock pulse.
Chapter 7: Microprogrammed Control
Instructor: Yuzhuang Hu The Shifter 3 clock cycles will be needed if using a bidirectional shift register with parallel load.  A clock.
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
Henry Hexmoor.
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
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
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
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 6 Memory and Programmable Logic Devices
Computer Organization and Architecture
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4: IT Students.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4:
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Chapter 5 Basic Processing Unit
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
Multiple-bus organization
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.
Computer Design Basics
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 9 – Computer Design Basics Part 2 – A Simple.
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.
Microprogrammed Control Unit Control Memory Sequencing Microinstructions Microprogram Example Design of Control Unit Microinstruction Format.
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Multiple-Cycle Hardwired Control Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
1 Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag.
Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.
CoE3DJ4 Digital Systems Design
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
EKT 221 : Chapter 4 Computer Design Basics
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Lecture 15: Pipelined Datapath Soon Tee Teoh CS 147.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
EKT 221 : Digital 2 Computer Design Basics Date : Lecture : 2 hrs.
Jeremy R. Johnson William M. Mongan
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Chap 7. Register Transfers and Datapaths
Cpe 252: Computer Organization1 Dr. Lo’ai Tawalbeh Chapter 7: Microprogrammed Control.
Overview Control Memory Comparison of Implementations
Micro-programmed Control Unit
MICROPROGRAMMED CONTROL
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
Computer Organization and Design
A Multiple Clock Cycle Instruction Implementation
Unit 12 CPU Design & Programming
CSC 220: Computer Organization
Branch instructions We’ll implement branch instructions for the eight different conditions shown here. Bits 11-9 of the opcode field will indicate the.
A Discussion on Assemblers
8-6 The Control Word The selection variables for the datapath control the microoperations executed within datapath for any given clock pulse Fig
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
ECE 352 Digital System Fundamentals
Review: The whole processor
MICROPROGRAMMED CONTROL
MICROPROGRAMMED CONTROL
UNIT – III Microprogrammed Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Instructor: Yuzhuang Hu

Midterm The midterm is schedule on June 17 th, 17:30-19:30 pm. It covers the following:  VHDL Programming.  Number Systems.  Sequential Circuit Design. This includes State-Machine Diagrams, ASM chart, control unit, data path, etc.  The Simple Single-Cycle Computer. Its Datapath, the Control Word, Instruction Formats, Single Cycle Hardwired Control, etc.

Block Diagram for a Single-Cycle Computer

Instruction Specifications for the Simple Computer

Control Unit of the Single Cycle Simple Computer We have described the design of its datapath. The block diagram for this computer has a hardwired control unit that fetches and executes an instruction in a single clock cycle. We do not write to the instruction memory, making it appear in this model to be a combinational rather than a sequential component.

The Program Counter (PC) The PC provides the instruction address to the instruction memory. The PC is updated in each clock cycle. The behaviour of the PC is determined by the opcode, N, and Z. PC OperationPLJBBC Count Up0XX Jump11X Branch on Negative (else Count Up)101 Branch on Zero (else Count Up)100

Instruction Decoder The instruction decoder is a combinational circuit that provides all of the control words for the datapath, based on the contents of the fields of the instruction. TruthTable for Instruction Decoder Logic Instruction Function Type Instruction BitsControlWord Bits MBMDRWMWPLJBBC Function unit operations using registers 0 0 0X X Memory read 0 01X X Memory write 0 10X 0 X 0 10X Function unit operations using register and constant 1 0 0X X Conditional branch on zero (Z) 1100 X X Conditional branch on negative (N) 1101 X X Unconditional Jump 111X X X

Instruction Decoder contd. The 13 th, 14 th and 15 th bits of the instruction are set to 1 respectively, to distinguish the memory read, memory write and constant involved instructions from the register only instructions. For this reason MB=15 th bit, MD=13 th bit, and the 14 th bit is involved in generating MW. There is some additional logic to prevent RW and MW to be 1 at the same time.

Instruction Decoder contd. The 15 th bit of the instructions is used mainly for jumping and branching instructions. However to distinguish them from the instructions involving constants, the 14 th bit is also needed to generate PL. BC uses the 9 th bit. JB uses the 13 th bit, however as PL=1 when JB=1, there is no conflict with MD. For conditional branching, it is required that FS=0000. That’s the reason PL is involved in generating FS.

Instruction Decoder Logic

Sample Instructions  Six Instructionsfor theSingle-Cycle Computer Operation code Symbolic nameFormatDescriptionFunctionMBMDRWMWPLJBBC ADIImmediateAdd immediate operand LDRegisterLoad memory content into register STRegisterStore register content in memory SLRegisterShift left NOTRegisterComplement register BRZJump/BranchIfR[SA]= 0, branch to PC+ se AD If R[SA] = 0,, If R[SA]  0, RDR  RSA  zfI(2:0) +  RDR  M RSA  M RSARSB  RDR  slRSB  RDR  RSA  PCPCseAD +  PC 1 + 

Shortcomings of the Single-Cycle Computer The single cycle computer can not perform more complex operations. For example, unsigned binary multiplications. The single cycle computer has two distinct 16-bit memories, one for instructions and one for data. Every instruction, no matter it is simple or complex (e.g., jmp), is executed in a clock cycle. Therefore It has a lower limit on the clock period.

Worst-Case Delay Path in Single- Cycle Computer PC Instruction Memory Register File (Read) MUX B FU or Data Memory Register File (Write) MUX D 0.2 ns

Store Instructions and Data in a Single Memory Datapath : a single memory, and an MUX M. Add 8 temporary registers to the register file. Control Unit:  Instruction Register (IR) to store the instruction fetched from the memory.  Control State. The control unit is now a sequential circuit.  Control Logic : different control words. Branch logic is moved to here.

Control Word Format for Multi- Cycle Computer The addressing of the registers needs 4 bits (DX, AX, BX). NSPS I L M B M D R W M M M W DX AXBXFS Datapath Sequencing NSPSIL Next StateActionCodeActionCode Gives next state of Control State Register Hold PC00No load0 Inc PC01Load IR1 Branch10 Jump11 Sequence Control NS: next state PS: control PC IL: control IR

Sequential Control Design Now the computer has two stages: instruction fetch (INF stage) and instruction execution (EX0 stage). IR Register File (Read) MUX B FU or Data Memory Register File (Write) MUX D 0.2 ns PC MUX M Memory IR 0.2 ns INFEX0

Instruction Specifications

Partial State Machine Diagram for Multiple-Cycle Computer

Deriving Logic Expressions For PC <- PC +1, we must set PS to 01. We can write PS(0) = EX0·MOVA + EX0 ∙ INC + EX0 ∙ ADD + … + EX0·BRZ·(not Z). Each combination of state, opcode, and condition codes where the signal should be 1 introduces a product term to the final expression.

Multiplication in the Multiple-Cycle Computer For simple instructions, we need more time to finish them in the multi-cycle computer. Multiplication shows the advantage.  Assume multiplication in the function unit needs 10 ns. For the single cycle-cpu, the clock cycle must be increased to 15.8 ns.  The clock cycle would remain 5.8 ns, if we give one more clock cycle for multiplication.

State Diagram for Multiplication INF IR <- M[PC] EX0 Multiply R[SA]*R[SB] IMUL1 R[DR] <- R[SA]*R[SB], PC <- PC + 1

Register Indirect Instructions R[DR] <- M[M[R[SA]]]. INF IR <- M[PC] EX0 Opcode = R8 <- M[R[SA]] EX1 Opcode = R[DR]<-R8, PC <- PC+1

Partial State Machine Diagram for Right- Shift and Left-Shift Multiple Instructions

Micro-programmed Control A control unit with its binary control values stored as words in memory is called a micro-programmed control. Each word in the control memory contains a microinstruction that specifies one or more micro-operations for the system. The micro-program is usually fixed at the system design time and so is stored in ROM.

CAR: Control Address Register.

THANKS!