Simple Processor Control Unit

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

Chapter 1. Basic Structure of Computers
Central Processing Unit
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Arithmetic Logic Unit (ALU)
1 Datapath and Control (Multicycle datapath) CDA 3101 Discussion Section 11.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
State Machines Used to Design Sequential Circuits.
Computer ArchitectureFall 2008 © September 17th, 2008 Majd F. Sakr CS-447– Computer Architecture.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
IC-UNICAMP MC 603/ Finite State Machines Mixed Style RTL Modeling Extraído da George Mason Univ. ECE 545 Lecture 5.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
1 Catalog of useful (structural) modules and architectures In this course we will be working mostly at the BEHAVIORAL and STRUCTURAL levels. We will rely.
Computer Architecture
Computer Science 210 Computer Organization The von Neumann Architecture.
1 Computer Organization Today: First Hour: Computer Organization –Section 11.3 of Katz’s Textbook –In-class Activity #1 Second Hour: Test Review.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
EXECUTION OF COMPLETE INSTRUCTION
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
CprE / ComS 583 Reconfigurable Computing
General Concepts of Computer Organization Overview of Microcomputer.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Complete Example.
George Mason University Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code ECE 448 Lecture 6.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
Fetch-execute cycle.
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
Instructor: Oluwayomi Adamo Digital Systems Design.
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Chapter 5 Computer Organization TIT 304/TCS 303. Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
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.
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
Controller Implementation
Catalog of useful (structural) modules and architectures
The Stored Program Computer
ECE 4110–5110 Digital System Design
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Computer Science 210 Computer Organization
Hao Zheng Comp Sci & Eng USF
William Stallings Computer Organization and Architecture
Overview Instruction Codes Computer Registers Computer Instructions
Computer Science 210 Computer Organization
The fetch-execute cycle
The Processor and Machine Language
Computer Architecture
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Functional Units.
Controller Implementation--Part II
A Multiple Clock Cycle Instruction Implementation
The Von Neumann Model Basic components Instruction processing
Computer Organization
ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Systems Architecture I
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
A Top-Level View Of Computer Function And Interconnection
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Computer Architecture
Presentation transcript:

Simple Processor Control Unit Instructor: Oluwayomi Adamo Digital Systems Design

Control Unit Design a control unit for picking up instructions from memory address given by the program counter (PC). Interpret the instruction, Fetch the operands and feed them to the ALU, Store the result in destination registers Load the pc with destination address in case of branch instruction, Contents of destination will be forwarded to the LED or 7 segment display for display.

Sample Instructions Register Instruction Op CC SRC DST 01001011 Branch Instruction 11 CC ADDRESS 11100011 Halt and I/O Instruction 1100 L H DST 11001011 11000110

CONT UNIT D MUX MUX PC 000G MEM RCA REG MUX A MUX B SWICTH DISPLAY ALU 4 BITS RCA OP DMUXA 0 OR 1 SWICTH MEM REG CC DST SRC

Control Unit The control unit is like computer’s traffic cop. It coordinates and controls all operations occurring within the processor. The control unit does not input, output, process, or store data, it initiates and controls the sequence of these operations. Controls Data Movements in an Operational Circuit by Switching Multiplexers and Enabling or Disabling Resources Follows Some ‘Program’ or Schedule Often Implemented as Finite State Machine or collection of Finite State Machines

Control Unit as a Finite State Machine (FSM) (Contd.) Any Circuit with Memory could be called a Finite State Machine Even computers can be viewed as huge FSMs Design of FSMs Involves Defining states Defining transitions between states Optimization / minimization Above Approach Is Practical for Small FSMs Only

State Machine Model Sequential logic Combinational logic pr_state input Combinational logic pr_state nx_state Sequential logic rst clock

Finite State Machine - Moore Output Is a Function of a Present State Only TYPE state IS (S0, S1, S2); SIGNAL Moore_state: state; U_Moore: PROCESS (clock, reset) BEGIN IF(reset = ‘1’) THEN Moore_state <= S0; ELSIF (clock = ‘1’ AND clock’event) THEN CASE Moore_state IS WHEN S0 => IF input = ‘1’ THEN Moore_state <= S1; ELSE END IF; reset

Moore WHEN S1 => IF input = ‘0’ THEN Moore_state <= S2; ELSE END IF; WHEN S2 => Moore_state <= S0; END CASE; END PROCESS; Output <= ‘1’ WHEN Moore_state = S2 ELSE ‘0’;

Finite State Machine - Mealy Output Is a Function of a Present State and Inputs TYPE state IS (S0, S1); SIGNAL Mealy_state: state; U_Mealy: PROCESS(clock, reset) BEGIN IF(reset = ‘1’) THEN Mealy_state <= S0; ELSIF (clock = ‘1’ AND clock’event) THEN CASE Mealy_state IS WHEN S0 => IF input = ‘1’ THEN Mealy_state <= S1; ELSE END IF;

Finite State Machine – Mealy (contd.) WHEN S1 => IF input = ‘0’ THEN Mealy_state <= S0; ELSE Mealy_state <= S1; END IF; END CASE; END PROCESS; Output <= ‘1’ WHEN (Mealy_state = S1 AND input = ‘0’) ELSE ‘0’;

Control Unit as a Finite State Machine (FSM) Fetch -> Decode -> Execute Fetch Sequence t1: MAR <- (PC) t2: MBR <- (memory) PC <- (PC) +1 t3: IR <- (MBR) (tx = time unit/clock cycle)

Good Luck!!!