SCRAM Introduction. Philipp Koehn. 19 February 2018

Similar documents
Chapter 16. Control Unit Operation. Yonsei University

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

Processing Unit CS206T

Computer Organization II CMSC 3833 Lecture 33

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

Blog -

Copyright 2000 N. AYDIN. All rights reserved. 1

William Stallings Computer Organization and Architecture

Chapter 05: Basic Processing Units Control Unit Design. Lesson 15: Microinstructions

CPU Structure and Function

CPU Structure and Function

Digital System Design Using Verilog. - Processing Unit Design

Micro-Operations. execution of a sequence of steps, i.e., cycles

Little Man Computer (LMC)

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

Notes: The Marie Simulator

CPU Structure and Function. Chapter 12, William Stallings Computer Organization and Architecture 7 th Edition

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Chapter 20 - Microprogrammed Control (9 th edition)

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Assembly Language Programming of 8085

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

COMARCH. COMPUTER ARCHITECTURE TERM 3 SY COMPUTER ENGINEERING DE LA SALLE UNIVERSITY Quiz 1

Instructions. Philipp Koehn. 16 February 2018

Module 5 - CPU Design

Introduction to Computers - Chapter 4

Control unit. Input/output devices provide a means for us to make use of a computer system. Computer System. Computer.


CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

session 7. Datapath Design

William Stallings Computer Organization and Architecture

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

UNIT:2 BASIC COMPUTER ORGANIZATION AND DESIGN

BASIC COMPUTER ORGANIZATION AND DESIGN

Computer Organization (Autonomous)

Computer Logic II CCE 2010

THE MICROPROCESSOR Von Neumann s Architecture Model

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

Implementing the Control. Simple Questions

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

Note that none of the above MAY be a VALID ANSWER.

Chapter 3 : Control Unit

COMPUTER ORGANIZATION

Basic Computer Organization - Designing your first computer. Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon s slides.

EE 2700 Project 2 Microprocessor Design

CC312: Computer Organization

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

Teaching London Computing

CSE100 Lecture03 Machines, Instructions, and Programs Introduction to Computer Systems

Basic Computer Organization and Design Part 2/3

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

Microcomputer Architecture and Programming

A3 Computer Architecture

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

BASIC COMPUTER ORGANIZATION AND DESIGN

csitnepal Unit 3 Basic Computer Organization and Design

In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Interrupt flag, Direction flag, and Sign flag.

Wednesday, February 4, Chapter 4

5-1 Instruction Codes

Why learn Computer Programming? Computer-based problem solving in Science and Engineering. Why learn Fortran? Elementary Computer Organization

Blog -

General purpose registers These are memory units within the CPU designed to hold temporary data.

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

Computer Architecture. CSE 1019Y Week 16. Introduc>on to MARIE

BASIC COMPUTER ORGANIZATION AND DESIGN

PSIM: Processor SIMulator (version 4.2)

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

2 MARKS Q&A 1 KNREDDY UNIT-I

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS

UNIT- 5. Chapter 12 Processor Structure and Function

MICROPROGRAMMED CONTROL

Introduction to CPU architecture using the M6800 microprocessor

Chapter 4. MARIE: An Introduction to a Simple Computer

Unit II Basic Computer Organization

Introduction to CPU Design

CPU. Fall 2003 CSE 207 Digital Design Project #4 R0 R1 R2 R3 R4 R5 R6 R7 PC STATUS IR. Control Logic RAM MAR MDR. Internal Processor Bus

Lecture 11: Control Unit and Instruction Encoding

IAS Computer. Instructions

3.0 Instruction Set. 3.1 Overview

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Assembly Language Programming of 8085

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

IA-32 architecture. PDP8/e architecture Arithmetic. IA-32 architecture (cont)

AS/A Level Computing Syllabus 2011

Micro-programmed Control Ch 15

4. MICROPROGRAMMED COMPUTERS

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Machine Instructions vs. Micro-instructions. Micro-programmed Control Ch 15. Machine Instructions vs. Micro-instructions (2) Hardwired Control (4)

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

CS 101, Mock Computer Architecture

MARIE: An Introduction to a Simple Computer

Transcription:

SCRAM Introduction Philipp Koehn 19 February 2018

This eek 1 Fully work through a computer circuit assembly code Simple but Complete Random Access Machine (SCRAM) every instruction is 8 bit 4 bit for op-code: 9 different operations (of 16 possible) 4 bit for address: 16 bytes of memory Background reading on web page: "The SCRAM"

Operations 2 Operation Code Description HLT 0000 Halt, stop execution LDA 0001 Load value from memory into accumulator LDI 0010 Indirectly load value from memory into accumulator STA 0011 Store value from accumulator into memory STI 0100 Indirectly store value from accumulator into memory ADD 0101 Add value from memory to accumulator SUB 0110 Subtract value from memory from accumulator JPM 0111 Jump to specified address JPZ 1000 Jump to specified address if zero flag is set

Indirect Load? 3 LDA x loads the value from address x LDI x looks up the value at address x treats that value as an address loads the value at that address Indirect load = use of pointer variable

Instruction Encoding 4 Instruction Data 0 0 0 1 0 1 0 1 LDA 5 Load contents from address 5 into memory

A Simple Program 5 Address Code Meaning op-code data operation data 0 0001 0100 LDA 4 1 0101 0101 ADD 5 2 0011 0100 STA 4 3 0111 0000 JMP 0 4 1111 0000 DAT 0 5 1111 0001 DAT 1 Note: DAT is not a real instruction Produces sequence of numbers: 0, 1, 2, 3, 4,..., 255, 0,...

6 components

Memory 7 4 bits to address memory 16 different values 16 byte address space e need to build circuitry to retrieve and store values

Registers 8 Accumulator (AC) can be directly accessed from logic units used to store the results of computations Program counter (PC) memory address of current instruction Instruction register (IR) contains current instruction breaks it down into operation code Memory registers memory access register (MAR): address to retrieve value memory buffer register (MBR): retrieved value

Arithmetic Logic Unit (ALU) 9 Can do addition and subtraction Operands operand 1: accumulator operand 2: adress specified in instruction result: accumulator Zero flag: Carry flag: result of operation is zero operation results in overflow / underflow

Program Counter 10 4 bit current memory address of instruction Typically increased by 1 during each instruction execution Can also be changed by jump instructions (JMP, JPZ)

Control Logic Unit 11 Decodes the op code Selects instruction logic Instruction logic: microprogram (sequence of register transfers) More detail on that in a bit...

Putting it All Together 12 +---------------------------------+---------------------------------+ Memory Program Counter (PC) Memory access register (MAR) Instruction Register (IR) Memory buffer register (MBR) +---------------------------------+---------------------------------+ Accumulator (A) Control Logic Unit (CLU) Arithmetric Logic Unit (ALU) +---------------------------------+---------------------------------+

13 memory

16x8 Bit RAM 14 A DI 16x8 RAM DO 16 byte of memory Inputs address (A) data in (DI) write flag () Output data out (DO)

Memory with its Registers 15 MAR A 16x8 RAM DI DO MBR Memory address register (MAR) Memory buffer register (MBR) Each of them has a write flag (there will be a few more of them...)

16 instruction fetch

Program Counter 17 PC INC MAR A DI 16x8 RAM DO MBR Program counter contains address of current instruction This address needs to be passed to MAR Program counter also needs an easy way to be incremented

Instruction Register 18 PC INC MAR A DI 16x8 RAM DO MBR IR Content of memory (MBR) is transferred to instruction register

Instruction Fetch 19 Program counter (PC) contains address of current instruction Step 1: Step 2: Step 3: Step 4: copy PC value to memory access register (MAR) retrieve address value into memory buffer register (MBR) copy MBR value into instruction register (IR) increase PC These copy instructions are triggered by write flags

MAR PC 20 PC INC MAR A DI 16x8 RAM DO MBR IR Copy PC value to memory access register (MAR)

MBR M 21 PC INC MAR A DI 16x8 RAM DO MBR IR Retrieve address value into memory buffer register (MBR)

IR MBR 22 PC INC MAR A DI 16x8 RAM DO MBR IR Copy MBR value into instruction register (IR)

PC PC + 1 23 PC INC MAR A DI 16x8 RAM DO MBR IR Increase PC

Micro Program 24 e can write these steps in a register transfer language Time Command t 0 MAR PC t 1 MBR M t 2 IR MBR t 3 PC PC + 1 Execution in time steps t n triggered by the clock

Parallel Execution 25 Increase of the program counter is independent from retrieving data from memory These steps can be parallized New micro program Time Command t 0 MAR PC t 1 MBR M, PC PC + 1 t 2 IR MBR

MBR M, PC PC + 1 26 PC INC MAR A DI 16x8 RAM DO MBR IR Parallel execution of memory retrieve and program counter increase

27 control logic unit

Control Logic Unit 28 PC INC MAR A DI 16x8 RAM DO MBR C IR D Decoder Instruction: op-code and data Q Control Logic Unit Control logic unit receives operation code Op-code is decoded into 9 different operations

Control Logic Unit 29 PC INC MAR A DI 16x8 RAM DO MBR C IR D Decoder Q Control Logic Unit INC NOT T CLEAR Time step needs to be increased or cleared to 0 after each micro command

Control Logic Unit 30 PC INC MAR A DI 16x8 RAM DO MBR C IR D Decoder Q Control Logic Unit T Decoder INC NOT T CLEAR Time step triggers one command line in control logic unit