Chapter 8: The Very Simple Computer

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

The Fetch – Execute Cycle
Chapter 7 Henry Hexmoor Registers and RTL
ARITHMETIC LOGIC SHIFT UNIT
Computer Organization and Architecture
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
The Computer Processor
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CPU Fetch/Execute Cycle
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
SAP1 (Simple-As-Possible) Computer
An Interactive Web-Based Simulation of a General Computer Architecture
Computer System Architecture ESGD2204
Information Representation: Machine Instructions
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
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.
Lecture 1 Introduction to Computing Machinery. Colossus Joseph Marie Jacquard Charles Babbage Augusta Ada Countess of Lovelace.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
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.
M. Mateen Yaqoob The University of Lahore Spring 2014.
Lec 5 Basic Computer Organization
Computer Organization CSC 405 (VSC) Very Simple Computer.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
Fetch-execute cycle.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
© 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.
Computer Systems Organization
Dale & Lewis Chapter 5 Computing components
Lecture 5 Computer Hardware. von Neumann Architecture.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Instruction.
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
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.
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Jeremy R. Johnson William M. Mongan
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
CS 270: Mathematical Foundations of Computer Science
Computer Organization
Basic Processor Structure/design
Control Unit Lecture 6.
Lesson Objectives A note about notes: Aims
Computer Organization and Design
BASIC COMPUTER ORGANIZATION AND DESIGN
The Processor and Machine Language
Introduction to Computing Machinery
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
The Little Man Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
A Top-Level View Of Computer Function And Interconnection
Information Representation: Machine Instructions
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 Assembly Language
Computer Architecture
Presentation transcript:

Chapter 8: The Very Simple Computer Computing Machinery Chapter 8: The Very Simple Computer

The Von-Neumann Architecture The concept of a stored program was part of the design of the Analytical Engine and well understood by Charles Babbage and Augusta Ada King more than 150 years ago. For some reason, this concept was temporarily lost or forgotten by the middle of the 20th century. Early electronic computers, such as the ENIAC, kept the logic and arithmetic instructions separate from the data. Some early computers had to be rewired in order to change their programs. The interpretation of a word in memory as either an instruction or data is determined by its location in memory rather than its pattern of ones and zeros. The content of memory has more than one possible interpretation. For example, the bit pattern, 01000000110010010000111111011010 can represent the integer 1,086,918,618 or an instruction to JUMP to another location (address) in memory, or it could represent an approximation for the numeric value of p.

Designing the Very Simple Computer VSC Instruction operations code address 3-bits limits the number of instructions to 23 = 8 5-bit limits the number of words to 25 = 32 8-bit instructions will all be direct addressing mode data type will be integer, twos'-complement operations will correspond to Post-Turing language with only 8 instructions, the VSC is the "Ultimate RISC" Computer

The Very Simple Computer

Program Counter (PC) Program Counter (PC) - The address of the next instruction that is to be executed is held in a register called the program counter (PC). The value in this register is passed to the memory unit as the address of the instruction to access. During the fetch portion of the fetch-execute cycle, the value in the PC is incremented.

Memory Address Register (MAR) Memory Address Register (MAR) - The memory address register (MAR) of the VSC memory is also a 5-bit register. To read or write a word, we first place the memory address into the MAR and then activate the appropriate control lines (Read/Write, and Memory Enable) to perform the indicated I/O operation.

Instruction Register (IR) Instruction Register (IR) - The VSC is a single-address instruction machine so the instruction register needs room to hold the operations code (op-code) of the instruction to be executed and the address on which the operation is performed. Since the VSC uses 8-bit words, the instruction register (IR) supports a 5-bit address and a 3-bit op-code.

Arithmetic Logic Unit (ALU) Latches ALU Latches (LAT1 and LAT2) - The arithmetic logic unit (ALU) accepts one or two input values. These values are held above the ALU in registers called Latch1 (LAT1) and Latch2 (LAT2). These registers have outputs that are always active since they are directly connected to the ALU and are never used to write to the bus.

Accumulator (ACC) Accumulator (ACC) - The output of the ALU is the result of the execution of some arithmetic or logical operation. This value is held in the accumulator (ACC) until it is moved or otherwise managed by a subsequent instruction. Since the VSC is a single-address instruction CPU, the value in the ACC is transferred to one of the ALU latches during the fetch.

The Instruction Set LDA addr - load the accumulator with the value from memory at address addr STA addr - store the value in the accumulator into memory at address addr. ADD addr - add value in memory at address addr to ACC and store in LAT1. CMP addr - take the 1's complement of the value in memory at address addr BNN addr - the branch-not-negative statement will set PC = addr if the value in the accumulator is not negative. SHL addr - shift value in memory at address addr one bit to the left. SHR addr - shift value in memory at address addr one bit to the right (arithmetic). HLT - this instruction terminates the fetch-execute cycle.

Register Transfer Description

The Fetch/Execute Cycle get the address of the next instruction load the instruction register with the next instruction get the address in the current instruction increment to program counter move the value in the ALU ACC into LAT2 move the data referred to by the instruction into LAT1 execute the instruction

Running the VSC

Running the VSC

Running the VSC

Running the VSC

Running the VSC

Running the VSC

Running the VSC

Control Unit Executing OpCodes LDAen - load ACC enable - moves value in LAT1 into ACC STAen - store ACC enable - moves value in ACC into MEM[MAR] ADDen - ADD enable CMPen - CMP (1's complement) enable - takes the bitwise inverse of LAT1 BNNen - if(ACC7 = 0) then PC = IR<4:0> SHLen - shift-left enable SHRen - shift-right enable HLTen - halts the fetch-execute cycle by setting Control Unit IR

Control Unit Fetch Operations PCre - PC read enable PCwe - PC write enable PCinc - PC increment MARwe - MAR write enable IRre - IR read enable IRwe - IR write enable LAT1we - LAT1 write enable LAT2we - LAT2 write enable ACCwe - ACC write enable (from ALU only) ACCre - ACC read enable (we read the ACC through the bus)

VSC System Clock

Fetch-Execute Cycle Timing Diagram

Fetch-Execute Control Circuit

VSC Instruction Decoder Circuit

VSC Memory Unit

Arithmetic Logic Unit

Bitwise Complement and Shift Operations

74181 - A 4-Bit ALU

VSC Input/Output

Programming the VSC addr label instruction addr machine code . 0 LDA A 00000 00000100 1 ADD B 00001 01000101 2 STO C 00010 00100110 3 HLT 00011 11111111 4 A 24 00100 00011000 5 B 30 00101 00011110 6 C 0 00110 00000000

Loops in the VSC

What is This? 00000 00010001 00001 11000000 00010 10100000 00011 00110010 00100 00010001 00101 01100000 00110 01010011 00111 01010010 01000 10001101 01001 00001111 01010 10100000 01011 00010100 01100 10001111 01101 00010001 01110 11000000 01111 00110001 10000 11111111 10001 00000111 10010 00000000 10011 00000001 10100 00000000