11-instruction CPU with 2 12 (4096) 16-bit RAM. Illustrates how a general-purpose computer is assembled from gates and registers. The design is simplified.

Slides:



Advertisements
Similar presentations
Page Replacement Algorithms (Virtual Memory)
Advertisements

Instruction Set Design
Chapter 10- Instruction set architectures
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
ARITHMETIC LOGIC SHIFT UNIT
Execution of an instruction
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Memory - Registers Instruction Sets
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Elements of the Computer (How a processor works)
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
An Interactive Web-Based Simulation of a General Computer Architecture
Lecture 3. Diff b/w RAM and Registers Registers are used to hold data immediately applicable to the operation at hand Registers are used to hold data.
Computer System Architecture ESGD2204
GCSE Computing#BristolMet Session Objectives#11 MUST identify what program instructions consist of SHOULD describe how instructions are coded as bit patterns.
Multiple-bus organization
Bus Architecture Memory unit AR PC DR E ALU AC INPR 16-bit Bus IR TR
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
CONTROL UNIT OPERATION MICROPROGRAMMED CONTROL. 2.
Chapter 8: The Very Simple Computer
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
Execution of an instruction
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Lec 5 Basic Computer Organization
Fetch-execute cycle.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Computer Studies/ICT SS2
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
UConn CSE CSE241: Instruction Level Architecture Base CPU/Memory Architecture Registers Fetch-Execute Cycle Instructions Addressing Modes.
Dale & Lewis Chapter 5 Computing components
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Instruction.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Jeremy R. Johnson William M. Mongan
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
F453 Module 8: Low Level Languages 8.1: Use of Computer Architecture.
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.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
CS 270: Mathematical Foundations of Computer Science
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Computer Organization and Design
Computer Science 210 Computer Organization
BASIC COMPUTER ORGANIZATION AND DESIGN
The Processor and Machine Language
Computer Science 210 Computer Organization
CSCE Fall 2013 Prof. Jennifer L. Welch.
The Von Neumann Model Basic components Instruction processing
MARIE: An Introduction to a Simple Computer
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
William Stallings Computer Organization and Architecture 8th Edition
By: A. H. Abdul Hafez Computer Architecture and Organization: L06: Stored program and Instruction code.
The Von Neumann Architecture Odds and Ends
CSCE Fall 2012 Prof. Jennifer L. Welch.
Information Representation: Machine Instructions
Instruction execution and ALU
Computer Architecture
COMPUTER ARCHITECTURE
Algoritmos y Programacion
Chapter 4 The Von Neumann Model
Little Man Computer.
Presentation transcript:

11-instruction CPU with 2 12 (4096) 16-bit RAM. Illustrates how a general-purpose computer is assembled from gates and registers. The design is simplified to make basic concepts clear. CPU design can be very complex. Since the CPU is the heart of every computer, emphasis is put on making it fast. Design of a Simple CPU Simple CPU Design1November 2013

The Register Set A CPU is a sequential circuit repeatedly reads and executes an instruction from its memory fetch-and-execute cycle A machine language program is a set of instructions drawn from the CPU instruction set Each instruction consists of two parts: an opcode and an address Simple CPU Design2November 2013

11 instructions require a 4-bit opcode. 12 bits of the 16-bit word remain for addressing 2 12 = bit words of the RAM. The CPU has 8 special registers: 16-bit accumulator (AC) 12-bit program counter (PC) 4-bit opcode (OPC) 12-bit memory address register (MAR) 16-bit memory data register (MDR) 16-bit input register (INR) 16-bit output register (OUTR) 1-bit halt register (HLT) Simple CPU Design3November 2013

Simple CPU Design4November 2013 The Registers Data Transfer in the CPU

The Fetch-and-Execute Cycle Fetch-and-execute cycle has two portions Fetch portion is always the same: instruction, whose address is in the PC, is fetched into the MDR opcode portion of this register is copied into the OPC At this point the action of the CPU diverges, based on the instruction in OPC Simple CPU Design5November 2013

Suppose OPC is a load accumulator instruction. the action required is to copy the word specified by the address part of the instruction into the accumulator load accumulator is decomposed into 8 microinstructions executed in 6 microcycles Simple CPU Design6November 2013

The Instruction Set Simple CPU Design7November 2013

Other operations can be performed using this set: subtraction is realized with ADD, CMA, and 2’s comp multiplication is possible through the use of CIL and ADD multiple CILs can be used to rotate right one place, hence division is also possible AND and CMA are complete Boolean system, hence every Boolean function can be realized by this machine if it is designed to address enough memory locations Simple CPU Design8November 2013

This is a direct memory instruction Addresses refer directly to memory locations containing the operands (data) on which the program operates CPUs have also indirect memory instructions Instructions in which an address is interpreted as the address at which to find the address containing the needed operand CPU does two memory fetches the first to find the address of the operand the second to find the operand itself Simple CPU Design9November 2013

Assembly-Language Programming Instructions stored in memory consist of 16 bits. the first 4 are opcode and the last 12 are address It is hard to interpret such machine-language statements. mnemonic opcodes and assembly languages are devised Assembler is a program translating an assembly language program into a machine language. Simple CPU Design10November 2013

Assembly-language program to boot up a computer is reading another program provided through the input port and stores the new program (16-bit words) in memory just above Boot. When reading is finished (determined by 0 word), control is transferred to the new program by jumping to the first location above Boot. Example: a Boot Program Simple CPU Design11November 2013

Simple CPU Design November 2013

The 1 st instruction following the ORG statement reads the input register value into the accumulator. Simple CPU Design13November 2013 The 2 nd instruction jumps to address 10 if AC==0, indicating that the last word of the program being loaded has been written into the memory. The next executed instruction is in address 10; control is transferred to the second program.

If AC!=0, its value is stored (indirectly) at an address (value) stored at ADDR_2 memory address. Simple CPU Design14November 2013 On the first execution of this command the value stored at memory address ADDR_2 is 10. The content of the accumulator is therefore stored at location 10. The next 3 steps increment by 1 the value of ADDR_2 by placing its contents in the accumulator, adding the value in memory address ADDR_3 (=1) to it and storing the new value into memory address ADDR_2.

Finally, the accumulator is zeroed and a JZ instruction is used to return to address ADDR_1 (=0), the first address of the boot program. Simple CPU Design15November 2013 The indirect STA instruction is not supported by the simple computer, but can be simulated by a self-modifying subprogram. Though self-modifying programs are considered a bad programming practice, it illustrates the power of self- modification and the advantage of having indirection in the instruction set of a computer.

Timing and Control November 2013Simple CPU Design16 We need to design circuits controlling the combining and movement of data. Assignment notation is introduced.

November 2013Simple CPU Design17 Register transfer notation uses these assignment operations as well as timing information to break down a machine-level instruction into microinstructions that are executed in successive microcycles.

November 2013Simple CPU Design18 microinstructions for the execute portion

November 2013Simple CPU Design19

November 2013Simple CPU Design20

November 2013Simple CPU Design21

November 2013Simple CPU Design22 Generating Control Signals Associate a control variable L(A,B) if a microinstruction results in the movement of data from register B to register A, denoted A ← B. L(OPC,MDR) = t 3 : OPC is loaded with the contents of MDR when t 3 = 1 Define control variables that control the movement of data between registers or combine the contents of two registers and assign the result to another register.

November 2013Simple CPU Design23 Associate a control variable L(A,B ⊙ C) if a microinstruction results in the combination of the contents of registers B and C with the operation ⊙ and the assignment of the result to register A, denoted A ← B ⊙ C. L(AC, AC+MDR) = c ADD ∧ t 6 : The contents of AC are added to those of MDR and copied into AC when c ADD ∧ t 6 = 1.

November 2013Simple CPU Design24 Group together all the microinstructions affecting accumulator Derive control variables Control of Accumulator

ADDANDNOT MUX 7:1 November 2013Simple CPU Design25 16-bit registers 16-bit ALU 16 7:1 MUXes Hardware Implementation

ADDANDNOT MUX 7:1 November 2013Simple CPU Design26 Execution of

ADDANDNOT MUX 7:1 November 2013Simple CPU Design27 Execution of

November 2013Simple CPU Design28 Group together all the microinstructions affecting MAR Derive control variables

November 2013Simple CPU Design29 Group together all the microinstructions affecting MDR Derive control variables Quiz: What and how many MUXes are required?Ans: 16 MUXes of 2:1

November 2013Simple CPU Design30 Group together all the microinstructions affecting a given register Derive control variables

November 2013Simple CPU Design31 Group together all the microinstructions affecting a given register Derive control variables