Microcode Source: Digital Computer Electronics (Malvino and Brown)

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

Computer Architecture and the Fetch-Execute Cycle
Infix, Postfix and Stacks
Processor System Architecture
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
Introduction to Computer Systems
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Elements of the Computer (How a processor works)
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
The Computer Processor
The Structure of the CPU
Control pins and Writing Microcode. Simple architecture Recall our architecture from the previous week It was a simple bus architecture “Control” was.
SAP1 (Simple-As-Possible) Computer
Computer Systems 1 Fundamentals of Computing The CPU & Von Neumann.
Internal hardware and external components of a computer Three-box Model  Processor The brain of the system Executes programs A big finite state machine.
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
CSIT 301 (Blum)1 Basic Units of Computer Architecture Some of this material can be found in Chapter 3 of Computer Architecture (Carter)
Computer Systems Organization CS 1428 Foundations of Computer Science.
CSIT 301 (Blum)1 Instructions at the Lowest Level Some of this material can be found in Chapter 3 of Computer Architecture (Carter)
ECP2036 Microprocessor and Interfacing Registers Control & Status Registers Program Counter User-Visible Registers Instruction Register... General-Purpose.
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Chapter 4 MARIE: An Introduction to a Simple Computer.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Execution of an instruction
Lecture 14 Today’s topics MARIE Architecture Registers Buses
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
DH2T 34 – HNC Computer Architecture 1 Lecture 14 The Fetch-Decode-Execute Cycle [1]. © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Studies/ICT SS2
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Electronic Analog Computer Dr. Amin Danial Asham by.
Computer Organization 1 Instruction Fetch and Execute.
Assessment Covering… Von Neuman architecture Registers – purpose and use, the fetch execute cycle.
Microarchitecture. Outline Architecture vs. Microarchitecture Components MIPS Datapath 1.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
CSIT 301 (Blum)1 Instructions at the Lowest Level Some of this material can be found in Chapter 3 of Computer Architecture (Carter)
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
3.1.4 Hardware a. describe the function and purpose of the control unit, memory unit and ALU (arithmetic logic unit) as individual parts of a computer;
CPU Lesson 2.
Systems Architecture Keywords Fetch Execute Cycle
Basic Units of Computer Architecture
Gunjeet Kaur Dronacharya Group of institutions
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Lesson Objectives A note about notes: Aims
Lecture on Microcomputer
Instructions at the Lowest Level
William Stallings Computer Organization and Architecture 8th Edition
Unit 1.1 System Architecture Lesson 2
Computer Systems An Introducton.
Instructions at the Lowest Level
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Computer Architecture
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Presentation transcript:

Microcode Source: Digital Computer Electronics (Malvino and Brown)

Micro-code Micro-code is the instructions at the lowest level, closest to the hardware Any higher-level instructions (including assembly) must be converted to a lower level A single machine-language instruction (like Load Accumulator A) typically consists of several micro-code instructions.

Where is microcode stored? It used to literally be wired in (hence the term “hard wired”) Typically it stored in ROM If the code is stored in EEPROM, it can be changed; this is known as microprogramming. Sometimes referred to as “firmware,” an intermediate between software and hardware

Machine language A level above micro-code The instructions are numbers, which really are the addresses of the micro-code instruction in ROM Mnemonic version of machine language is called assembly language

Getting down to hardware’s level High level programs are translated into assembly language or machine language by a compiler. Assembly language programs are translated into machine language by an assembler. Each processor has its own unique machine language. Thus code must be rewritten or at least recompiled to run on different processor (different hardware)

A simple design Next we will show a computer design, a little more sophisticated than that in lab 2 It still uses the basic “bus architecture”

Input port 1Accumulator ALU Flags Input port 2 Prog. counter Mem.Add.Reg. Memory MDR Instr. Reg. Control C B TMP Output port 3 Output port 4 Display Keyboard encoder Bus

Input ports Keyboard encoder: converts key pressed into corresponding string of bits (ASCII) Input port 1: where keyboard data is entered, usually contains some memory (a buffer) where data is held until the processor is ready for it Input port 2: where non-keyboard data is entered

Program counter The program counter points to the current line of the program (which is stored in memory) This design shows arrows connecting the “PC” to and from the bus, why? –If the next instruction to be executed is not the next line of code in memory, such as If Loops Subroutines, functions, etc.

MAR, MDR and Memory MAR (Memory Address Register) holds the address of the memory location being read from or written to –Not necessarily same as program counter Memory (RAM): the place where data and instructions are stored MDR (Memory Data Register) holds the data that is being read from or written to memory –Bi-directional connection to bus for reading and writing

Instruction Register Instruction register holds the instruction that is currently being executed, A given line of assembly or machine language code involves several micro-code instructions, the instruction register holds onto the instruction until all of the micro-instruction steps are completed

Controller/Sequencer Executes the program at the lowest level Sends signals to the control pins of all the devices involved These lowest level instructions are in ROM Each assembly-level instruction has a numerical counterpart (machine language); the numerical counterpart is the address of the microcode for that instruction stored in ROM Not shown, controller connects to everything

Accumulator and ALU Accumulator: register used in conjunction with the ALU Data upon which arithmetic or logic operations will eventually be performed is stored here; also the results of these are stored here ALU (Arithmetic Logic Unit) where operations that change the data (as opposed to just moving it around) are done

Flags Flags are output from the ALU that are distinct from data (data output goes to Acc. A) For example, –A carry from an addition –An indication of overflow These are needed for program control or to indicate possible errors –The result of a logical comparison (, =) These are needed for control (ifs, loops, etc)

TMP, B and C TMP is the other register used in conjunction with the ALU; the distinction is that answers are generally sent to Accumulator A B and C are additional registers used for holding data temporarily –They allow additional flexibility and reduce the amount that must be written to memory

Output ports Output port a connection to the “outside world” –Usually includes a buffer –This design has to one for displayed output and a second for other output (e.g. storage)

Micro-code Let us now examine the steps involved in the assembly (machine language) instruction Load Accumulator A

What do you mean by Load There are different types of Loads –Load Instruction and address Address of data to be put in Acc. A –Load immediate Instruction and data Data in instruction sent directly to Acc. A –Load indirect Instruction and address of address The data in the location indicated by the instruction holds another address, and that address has the data A bit like that Excel exercise in Lab 2

Fetch Cycle Address State : the value of the program counter (which recall is the address of line of the program to be performed) is put into memory address register. Increment State : the program counter is incremented, getting it ready for the next time. Memory State : the current line of the program is put into instruction register (so Control knows what to do).

Execution cycle (Load Acc. A) The remaining steps depend on the specific instruction and are collectively known as the execution cycle. Recall the instruction consisted of a load command and an address. A copy of the address is now taken over to the memory address register. The value at that address is loaded into Accumulator A. For the load command, there is no activity during the sixth step. It is known as a "no operation" step (a "no op" or "nop").