Computer Organization and Assembly Language (CS-506)

Similar documents
Chapter 5 Internal Memory

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Computer Organization. 8th Edition. Chapter 5 Internal Memory

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

Concept of Memory. The memory of computer is broadly categories into two categories:

Chapter 4 Main Memory

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

Module 5a: Introduction To Memory System (MAIN MEMORY)

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

Basic Organization Memory Cell Operation. CSCI 4717 Computer Architecture. ROM Uses. Random Access Memory. Semiconductor Memory Types

Memory Pearson Education, Inc., Hoboken, NJ. All rights reserved.

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

William Stallings Computer Organization and Architecture 8th Edition. Chapter 5 Internal Memory

Chapter 5. Internal Memory. Yonsei University

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

UNIT-V MEMORY ORGANIZATION

k -bit address bus n-bit data bus Control lines ( R W, MFC, etc.)

COMPUTER ARCHITECTURE AND ORGANIZATION

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

Memory memories memory

+ Random-Access Memory (RAM)

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

UNIT:4 MEMORY ORGANIZATION

Semiconductor Memory Types. Computer & Microprocessor Architecture HCA103. Memory Cell Operation. Semiconductor Memory.

ECE 341. Lecture # 16

MEMORY BHARAT SCHOOL OF BANKING- VELLORE

Lecture 18: Memory Systems. Spring 2018 Jason Tang

(Advanced) Computer Organization & Architechture. Prof. Dr. Hasan Hüseyin BALIK (5 th Week)

Large and Fast: Exploiting Memory Hierarchy

Microprocessors/Microcontrollers

5 Computer Organization

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

EE 308: Microcontrollers

Computer Organization

CS 320 February 2, 2018 Ch 5 Memory

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Chapter 6 Objectives

Semiconductor Memories: RAMs and ROMs

Lecture-7 Characteristics of Memory: In the broad sense, a microcomputer memory system can be logically divided into three groups: 1) Processor

Components of a personal computer

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Memory classification:- Topics covered:- types,organization and working

Computer Systems Organization

COSC 243. Memory and Storage Systems. Lecture 10 Memory and Storage Systems. COSC 243 (Computer Architecture)

Memory Hierarchy. Cache Memory. Virtual Memory

Logic and Computer Design Fundamentals. Chapter 8 Memory Basics

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

SAE5C Computer Organization and Architecture. Unit : I - V

Memory and Disk Systems

Basic Computer Architecture

Allmost all systems contain two main types of memory :

Computer Organization

CENG4480 Lecture 09: Memory 1

Chapter One. Introduction to Computer System

Design and Implementation of an AHB SRAM Memory Controller

Summer 2003 Lecture 18 07/09/03

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY (ICT) LECTURE 2 : WEEK 2 CSC-111-T

P-2 Digital Design & Applications

RISC (Reduced Instruction Set Computer)

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky

Memory Study Material

Embedded Systems Design: A Unified Hardware/Software Introduction. Outline. Chapter 5 Memory. Introduction. Memory: basic concepts

Embedded Systems Design: A Unified Hardware/Software Introduction. Chapter 5 Memory. Outline. Introduction

CS 33. Memory Hierarchy I. CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved.

Sir Sadiq s computer notes for class IX. Chapter no 4. Storage Devices

THE MICROCOMPUTER SYSTEM CHAPTER - 2

Read-only memory (ROM): programmed during production Programmable ROM (PROM): can be programmed once SRAM (Static RAM)

Overview. Memory Classification Read-Only Memory (ROM) Random Access Memory (RAM) Functional Behavior of RAM. Implementing Static RAM

Computer Organization

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

MEMORY. Objectives. L10 Memory

CSC 553 Operating Systems

8051 INTERFACING TO EXTERNAL MEMORY

CS 261 Fall Mike Lam, Professor. Memory

5 Computer Organization

ECED3204: Microprocessor Part I--Introduction

211: Computer Architecture Summer 2016

Memory & Simple I/O Interfacing

The Central Processing Unit

Read and Write Cycles

Computer Organization: A Programmer's Perspective

Operating system Dr. Shroouq J.

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

ELCT 912: Advanced Embedded Systems

PRATHYUSHA INSTITUTE OF TECHNOLOGY AND MANAGEMENT

Memories. Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu.

Address connections Data connections Selection connections

Memory and Programmable Logic

CS429: Computer Organization and Architecture

Computers in Business: Concepts in Hardware and Software

Chapter 1 Computer System Overview

CS429: Computer Organization and Architecture

The Memory Hierarchy 10/25/16

EECS 3201: Digital Logic Design Lecture 7. Ihab Amer, PhD, SMIEEE, P.Eng.

Transcription:

Computer Organization and Assembly Language (CS-506) Muhammad Zeeshan Haider Ali Lecturer ISP. Multan ali.zeeshan04@gmail.com https://zeeshanaliatisp.wordpress.com/ Lecture 2 Memory Organization and Structure The CPU

Today s Agenda: Memory Bit byte and Word Bit Position Memory Operation Memory Hierarchy Types of memory Memory organization The CPU ALU in CPU Registers in CPU CPU Control Unit The CPU Organization.

Memory Information processed by the computer Is stored In Its memory. A memory circuit can store one bit of data. Two possible values in memory circuit to be store 0 or 1 Memory circuit are organized tin groups to store eight bit of data called Byte and two bytes are organized to form a Word. Each Byte of a memory has address that starts from 0, 1, 2. Data stored in memory byte is called content of memory.

Memory

Bit Position Bit Positions are numbered from left to right Starts from 0 Byte bit positions. (lower bits) Word Bit position (high bits)

Memory Operations Read To fetch data Write To store new data on memory

Memory Hierarchy Registers In CPU Internal or Main memory May include one or more levels of cache RAM External memory Backing store

Internal Memory Types Memory Type Category Erasure Write Mechanism Volatility Random-access memory (RAM) Read-write memory Electrically, byte-level Electrically Volatile Read-only memory (ROM) Read-only memory Not possible Masks Programmable ROM (PROM) Erasable PROM (EPROM) UV light, chip-level Nonvolatile Electrically Electrically Erasable PROM (EEPROM) Read-mostly memory Electrically, byte-level Flash memory Electrically, block-level

External Memory Types HDD Magnetic Disk(s) SDD (Solid State Disk(s)) Optical CD-ROM CD-Recordable (CD-R) CD-R/W DVD Magnetic Tape

Random Access Memory (RAM) Misnamed as all semiconductor memory is random access Read/Write Volatile Temporary storage Static or dynamic

Types of RAM Dynamic RAM (DRAM) are like leaky capacitors; initially data is stored in the DRAM chip, charging its memory cells to maximum values. The charge slowly leaks out and eventually would go to low to represent valid data; before this happens, a refresh circuitry reads the contents of the DRAM and rewrites the data to its original locations, thus restoring the memory cells to their maximum charges Static RAM (SRAM) is more like a register; once the data has been written, it will stay valid, it doesn t have to be refreshed. Static RAM is faster than DRAM, also more expensive. Cache memory in PCs is constructed from SRAM memory.

Dynamic RAM Bits stored as charge in capacitors Charges leak Need refreshing even when powered Simpler construction Smaller per bit than SRAM Less expensive Need refresh circuits Slower Used for main memory in computing systems Essentially analogue Level of charge determines value

DRAM Refreshing Refresh circuit included on chip Disable memory array chip Count through rows and select each in turn Read contents & write it back (restore) Takes time Slows down apparent performance

Static RAM Bits stored as on/off switches No charges to leak No refreshing needed when powered More complex construction Larger per bit More expensive Does not need refresh circuits Faster Cache Digital Uses flip-flops

SRAM v DRAM Both volatile Power needed to preserve data Dynamic cell Simpler to build, smaller More dense Less expensive Needs refresh Larger memory units Static Faster Cache

Read Only Memory (ROM) Provides permanent storage (nonvolatile) Used for: microprogramming, library subroutines (code) and constant data, systems programs (BIOS for PC or entire application + OS for certain embedded systems) Types Written during manufacture (very expensive for small runs) Programmable (once) PROM (needs special equipment to program) Read mostly Erasable Programmable (EPROM) - Erased by UV Electrically Erasable (EEPROM) - Takes much longer to write than read Flash memory - Erase whole memory electrically

This picture shows the CPU performance against memory access time improvements over the years Clearly there is a processor-memory performance gap that computer architects must take care of Memory Hierarchy Design (1) Since 1987, microprocessors performance improved 55% per year and 35% until 1987

Memory Hierarchy Design (2) Registers (CPU) Cache (one or more levels) Main Memory Disk Storage Specialized bus (internal or external to CPU) Memory bus I/O bus It is a tradeoff between size, speed and cost and exploits the principle of locality. Register Fastest memory element; but small storage; very expensive Cache Fast and small compared to main memory; acts as a buffer between the CPU and main memory: it contains the most recent used memory locations (address and contents are recorded here) Main memory is the RAM of the system Disk storage - HDD

Cache Is the first level of memory hierarchy encountered once the address leaves the CPU Every address reference goes first to the cache; If the desired address is not here, then we have a cache miss; The contents are fetched from main memory into the indicated CPU register and the content is also saved into the cache memory If the desired data is in the cache, then we have a cache hit; The desired data is brought from the cache, at very high speed (low access time) Most software exhibits temporal locality of access, meaning that it is likely that same address will be used again soon, and if so, the address will be found in the cache

Cache Organization

The Central Processing Unit: manages the instructionexecution cycle FETCH DECODE EXECUTE coordinates the activities of other devices

The Central Processing Unit: Brain of the computer Contains the executing program of the computer Each instruction is a bit string Language of 0 s and 1 s is called Machine Language Instructions performed are called instruction set

Central Processing Unit: Arithmetic logic unit Performs arithmetic and logical operations Arithmetic operation Unary: increment (+1) and decrement (-1) Binary: add, subtract, multiply, and divide Logical operation Unary: NOT Binary: AND, OR, XOR

Central Processing Unit: Registers Registers are fast storage locations that hold data temporarily. Data registers Input data and output data Instruction registers Program counter

Central Processing Unit: Control Unit The control unit is like the part of the human brain that controls the operation of each part of the body. Controlling is achieved through wires that can be on (hot) or off (cold).

The Central Processing Unit: Organization Execution unit Bus Interface Unit

Central Processing Unit: Execution Unit Execute the instructions Contains Registers ALU Temp Registers Flags

Central Processing Unit: Bus Interface Unit Manages communication b/w EU and mem or I/O Responsible for transfer data and control signals on buses Contains segment registers for holding address of memory locations Instruction pointer point outs the addres of th enext instruction to be processed. Manages Instructions queue Perfoms instruction prefetch