Main Memory Organisation – Learning Objectives

Total Page:16

File Type:pdf, Size:1020Kb

Main Memory Organisation – Learning Objectives 17/10/2011 Main Memory Organisation – Learning Objectives" !# At the end of this lecture you will:" !# Understand the main concepts of memory organisation" Main Memory Organisation !# Know the different memory hardware options" " !# Registers, cache, RAM, Disk" !# Understand the relationship between cost and speed of access" !# Understand byte ordering in words" !# Understand the concept of addressing" Eddie Edwards" !# Understand word and byte addressing" [email protected]" !# Understand how RAM memory is organised into chips and modules" " !# Comprehend high order and low order interleaving and their uses" http://www.doc.ic.ac.uk/~eedwards/compsys" Computer Systems – Architecture E Edwards Main Memory Organisation (2.1) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.2) ! Question" Memories" !# Memories hold binary values. These can be:! !# Do you have a laptop or internet device here?" ! A yes B no C what$s a laptop D where is here? " Data (e.g. Integers, Reals, Characters)%" ! E none of the above" CPU Instructions (i.e. Computer Programs)! ! Memory Addresses (“Pointers” to data or instructions)%" " "" !# The contents of a memory remain unchanged unless overwritten with a new binary value. For some memories the contents are "lost" when power to the memory is turned off.! ! " Computer Systems – Architecture E Edwards Main Memory Organisation (2.3) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.4) ! 1 17/10/2011 Examples" CPU Organisation" !# CPU " Registers! " CPU Main Memory Caches – L1, L2 [L3]! " Registers " Control " RAM RAM !# Motherboard Unit Arithmetic & Logic Unit (ALU) ! RAM (Random Access Memory)! ROM (Read Only Memory)! Caches! Input/Output Controllers I/O Registers & Buffers! Videocard Memory! " !# Storage Devices Hard Disk Mouse, Keyboard Ethernet Speakers, Hard Disks, CDs, DVDs, Tapes, DVD Drive Monitor, Printer, Modem Microphone, Memory Sticks, Flashcards" Memory Stick Scanner Wifi Camera, Game Bluetooth Devices GSM/GPRS Computer Systems – Architecture E Edwards Main Memory Organisation (2.5) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.6) ! 3 Types of Memory" Capacity" CPU Main Memory CPU Main Memory Registers RAM Registers RAM Semi-conductor Semi-conductor < 2 KB 256 MB to 8 GB+ (Fixed) ! (Expandable) ! 1 KB = 210 bytes 1 MB = 220 bytes Hard Disk Hard Disk 1 GB = 230 bytes Storage Device Magnetic Storage Device 250 GB to 2 TB+ (Expandable) ! 1TB = 240 bytes Computer Systems – Architecture E Edwards Main Memory Organisation (2.7) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.8) ! 2 17/10/2011 Speed (Access Time)%" Volatility" CPU Main Memory CPU Main Memory Registers RAM Registers RAM < 1 nanosecs 2 nanosecs Contents Lost Contents Lost -3 milli = 10 -6 micro = 10 -9 nano = 10 Storage Device Hard Disk Storage Device Hard Disk 5 - 10 millisecs Contents Not Lost Computer Systems – Architecture E Edwards Main Memory Organisation (2.9) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.10) ! Cost" Summary" CPU Main Memory faster easier Registers Registers RAM Cache FLEXIBILITY SPEED USABILITY CPU ~ £70-£300 4GB ~ £30 RAM Hard Disk slower difficult expensive COST cheap Storage Device Hard Disk 1 TB ~ £40 small CAPACITY large high VOLATILITY low Computer Systems – Architecture E Edwards Main Memory Organisation (2.11) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.12) ! 3 17/10/2011 How many registers are there in a X86-64 processor?" How much memory is given to registers in a X86-64 processor?" A 2 B 4 C 16 D 64 E 256 " A 16B B 128B C 256B D 32B E 1024B" Computer Systems – Architecture E Edwards Main Memory Organisation (2.13) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.14) ! Main Memory (RAM)%" Addressing" W bits !# Memory Location Main Memory (Memory Word) ! !# Where in memory is the ! 101111101010101010111110 = W bits. Normally a 0110 1101 1010 1101 16-bit two$s Complement value byte-multiple, e.g. 16- 3?" bits, 32-bits." 001010101011101010101011 0000 0000 0000 0011 " " 011011010010100111011000 0000 0000 0000 0000 !# We need a scheme for uniquely R !# Memory Size identifying every memory ........ R x W bits! 1111 1111 1111 1111 rows location " " 101010101001001010111010 0000 0000 0000 0000 " !# Access: *** In our !# ADDRESSING 110110101000100010101010 model we will always 1001 1010 1010 0010 Identify memory locations with a Read/Write a whole 010101011110001011111011 Memory Word at a 0000 0000 0000 0000 positive number called the time ***" (memory) address" 111011000000111110111111 1111 1111 1111 1110 Computer Systems – Architecture E Edwards Main Memory Organisation (2.15) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.16) ! 4 17/10/2011 Memory Word Addressing" Byte Addressing" Main Memory Address Address (binary) ! Main Memory Word Address 0110 1101 1010 1101 0 0000 " 0110 1101 1010 1101 0 !# With byte addressing, every Memory[ 1 ] = ? 0000 0000 0000 0100 1 0001 0000 0000 0000 0011 2 byte in main memory has an address" 0000 0000 0000 0000 2 0010 Memory[ ? ] = -1 0000 0000 0000 0000 4 " 1111 1111 1111 1111 3 0011 1111 1111 1111 1111 6 !# In this example Memory[ ? ] = 0 0000 0000 0000 0000 4 0100 0000 0000 0000 0000 8 which is byte 0 and which is byte 1?" 1001 1010 1010 0010 5 0101 Mem[Mem[1]]= ? 1001 1010 1010 0010 10 0000 0000 0000 0000 6 0110 0000 0000 0000 0000 12 1111 1111 1111 1110 7 0111 1111 1111 1111 1110 14 Computer Systems – Architecture E Edwards Main Memory Organisation (2.17) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.18) ! Byte Ordering (Big Endian)%" Byte Ordering (Little Endian)%" Byte Address Main Memory Byte Address Byte Address Main Memory Byte Address 0 0110 1101 1010 1101 1 1 0110 1101 1010 1101 0 2 0000 0000 0000 0011 3 3 0000 0000 0000 0011 2 4 0000 0000 0000 0000 5 5 0000 0000 0000 0000 4 6 1111 1111 1111 1111 7 7 1111 1111 1111 1111 6 8 0000 0000 0000 0000 9 9 0000 0000 0000 0000 8 10 1001 1010 1010 0010 11 11 1001 1010 1010 0010 10 12 0000 0000 0000 0000 13 13 0000 0000 0000 0000 12 14 1111 1111 1111 1110 15 15 1111 1111 1111 1110 14 Computer Systems – Architecture E Edwards Main Memory Organisation (2.19) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.20) ! 5 17/10/2011 Byte Ordering of Multibyte Data Items" Example 1: 16-bit integer (View 1)%" Most Significant Byte (MSB) ! Least Significant Byte (LSB) !# 16-bit (2's Complement) integer 5 stored at memory address 24. " Big Endian VALUE Big Endian (8-byte) ! 0000 0000 0000 0101 Byte Addresses +0 +1 +2 +3 +4 +5 +6 +7 Byte Addresses 24 25 Least Significant Byte (LSB) ! Most Significant Byte (MSB) Little Endian Little Endian VALUE 0000 0101 0000 0000 (8-byte) ! Byte Addresses +0 +1 +2 +3 +4 +5 +6 +7 Byte Addresses 24 25 Computer Systems – Architecture E Edwards Main Memory Organisation (2.21) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.22) ! Example 1: 16-bit integer (View 2)%" Example 2: 32-bit value (View 1)%" !# 16-bit (2's Complement) integer 5 stored at memory address 24. " !# 32-bit hex value 54 BC FE 30 stored at memory address 24. " Big Endian Big Endian 0000 0000 0000 0101 Word address 24 54 BC FE 30 Byte Addresses 24 25 0101 0100 1011 1100 1111 1110 0011 0000 Byte Addresses 24 25 26 27 Little Endian Little Endian 30 FE BC 54 0000 0000 0000 0101 Word address 24 0011 0000 1111 1110 1011 1100 0101 0100 Byte Addresses 25 24 Byte Addresses 24 25 26 27 Computer Systems – Architecture E Edwards Main Memory Organisation (2.23) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.24) ! 6 17/10/2011 Example 2: 32-bit value (View 2)%" Example 3: ASCII string (View 1)"% !# 32-bit hex value 54 BC FE 30 stored at memory address 24. " !# String “JIM BLOGGS” stored at memory address 24" !# Treat a string as an array of (ASCII) bytes. Each byte is considered Big Endian individually. " 54 BC FE 30 0101 0100 1011 1100 1111 1110 0011 0000 Big Endian J I M B L O G G S Byte Addresses 24 25 26 27 Byte Addresses 24 25 26 27 28 29 30 31 32 33 Little Endian 54 BC FE 30 0101 0100 1011 1100 1111 1110 0011 0000 Little Endian J I M B L O G G S Byte Addresses 27 26 25 24 Byte Addresses 24 25 26 27 28 29 30 31 32 33 Computer Systems – Architecture E Edwards Main Memory Organisation (2.25) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.26) ! Example 3: ASCII string (View 2)"% A Problem" !# String “JIM BLOGGS” stored at memory address 24" !# How do we transfer a multi-byte !# Treat a string as an array of (ASCII) bytes. Each byte is considered value (e.g. a 32-bit two$s individually. " complement integer) from a Big- Endian memory to a Little-Endian memory?" " Big Endian J I M B L O G G S !# How do we transfer an ASCII string value (e.g. “JIM BLOGGS”) Byte Addresses 24 25 26 27 28 29 30 31 32 33 from a Big-Endian memory to a Little-Endian memory?" " Little Endian !# How do we transfer an object S G G O L B M I J which holds both types of values above?" Byte Addresses 33 32 31 30 29 28 27 26 25 24 Computer Systems – Architecture E Edwards Main Memory Organisation (2.27) ! Computer Systems – Architecture E Edwards Main Memory Organisation (2.28) ! 7 17/10/2011 What is the maximum amount of memory we can have in a 32bit machine with byte addressing?" (Un) Aligned Memory Accesses (1)%" Main Memory (Big Endian) ! A 4GB B 800MB C 16GB D 16MB E 1GB" 0 0110 1101 1010 1101 !# The 16-bit hex value (A9A1) at 2 1010 1001 1010 0001 address 2 is memory word aligned.
Recommended publications
  • Pdp11-40.Pdf
    processor handbook digital equipment corporation Copyright© 1972, by Digital Equipment Corporation DEC, PDP, UNIBUS are registered trademarks of Digital Equipment Corporation. ii TABLE OF CONTENTS CHAPTER 1 INTRODUCTION 1·1 1.1 GENERAL ............................................. 1·1 1.2 GENERAL CHARACTERISTICS . 1·2 1.2.1 The UNIBUS ..... 1·2 1.2.2 Central Processor 1·3 1.2.3 Memories ........... 1·5 1.2.4 Floating Point ... 1·5 1.2.5 Memory Management .............................. .. 1·5 1.3 PERIPHERALS/OPTIONS ......................................... 1·5 1.3.1 1/0 Devices .......... .................................. 1·6 1.3.2 Storage Devices ...................................... .. 1·6 1.3.3 Bus Options .............................................. 1·6 1.4 SOFTWARE ..... .... ........................................... ............. 1·6 1.4.1 Paper Tape Software .......................................... 1·7 1.4.2 Disk Operating System Software ........................ 1·7 1.4.3 Higher Level Languages ................................... .. 1·7 1.5 NUMBER SYSTEMS ..................................... 1-7 CHAPTER 2 SYSTEM ARCHITECTURE. 2-1 2.1 SYSTEM DEFINITION .............. 2·1 2.2 UNIBUS ......................................... 2-1 2.2.1 Bidirectional Lines ...... 2-1 2.2.2 Master-Slave Relation .. 2-2 2.2.3 Interlocked Communication 2-2 2.3 CENTRAL PROCESSOR .......... 2-2 2.3.1 General Registers ... 2-3 2.3.2 Processor Status Word ....... 2-4 2.3.3 Stack Limit Register 2-5 2.4 EXTENDED INSTRUCTION SET & FLOATING POINT .. 2-5 2.5 CORE MEMORY . .... 2-6 2.6 AUTOMATIC PRIORITY INTERRUPTS .... 2-7 2.6.1 Using the Interrupts . 2-9 2.6.2 Interrupt Procedure 2-9 2.6.3 Interrupt Servicing ............ .. 2-10 2.7 PROCESSOR TRAPS ............ 2-10 2.7.1 Power Failure ..............
    [Show full text]
  • PDP-11 Handbook
    alMml digihl equipmentcorpomtion Copyright 1969 by Digital Equipment Corporation PDP is a registered trademark of Digital Equipment, Corporation The material in this handbook is for information pur- poses only and is subject to change without notice. TABLE OF CONTENTS CHAPIER 1 lNTRODUCTlOR PDP-11 SYSTEMS . .:.. 1 UNIBUS . , . 1 KAl 1 PROCESSOR . .?. 1 Priority Interrupts ,...............,..... 1 Reentrant Code . General Registers . :... 2 Instruction Set . .._........................................................ Addressing . ..~...............................................~........,...,......... z Asynchronous Operation . L 2 PACKAGJNG . ..I . 2 SOmARE ........................ .: ........................................................ 3 CHAPTER 2 SYSTEM INTRODUCTION SYSTEM DEFINITION .................................................................. 5 SYSTEM COMPONENTS ............................................................... 5 UNIBUS ................................................... .................................. 5 Single Bus ................................................................. .......... 5 Bidirectional Lines ............ .......................................... ..* .... 5 Master-Slave Relation ........................... .............................. 5 Interlocked .Communication ................................................ Dynamic Master-Slave Relation ........................................... : KAll CENTRAL PROCESSOR ...................................................... 6 General Registers
    [Show full text]
  • Machine Instructions and Programs
    Hamacher-38086 book June 28, 2001 11:31 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: • Machine instructions and program execution, including branching and subroutine call and return operations • Number representation and addition/subtraction in the 2’s-complement system • Addressing methods for accessing register and memory operands • Assembly language for representing machine instructions, data, and programs • Program-controlled Input/Output operations • Operations on stack, queue, list, linked-list, and array data structures 25 Hamacher-38086 book June 28, 2001 11:31 26 CHAPTER 2 • MACHINE INSTRUCTIONS AND PROGRAMS This chapter considers the way programs are executed in a computer from the ma- chine instruction set viewpoint. Chapter 1 introduced the general concept that both program instructions and data operands are stored in the memory. In this chapter, we study the ways in which sequences of instructions are brought from the memory into the processor and executed to perform a given task. The addressing methods com- monly used for accessing operands in memory locations and processor registers are presented. The emphasis here is on basic concepts. We use a generic style to describe ma- chine instructions and operand addressing methods that are typical of those found in commercial processors. A sufficient number of instructions and addressing methods are introduced to enable us to present complete, realistic programs for simple tasks. These generic programs are specified at the assembly language level. In assembly lan- guage, machine instructions and operand addressing information are represented by symbolic names. A complete instruction set is often referred to as the instruction set architecture (ISA) of a processor.
    [Show full text]
  • Instruction Set Architecture
    UNIT - 5 Instruction Set Architecture Lesson Structure 5.0 Objective 5.1 Introduction 5.2 Instruction Set Characteristics 5.3 Instruction Set Design Considerations 5.3.1 Operand Data Types 5.3.2 Types of Instructions 5.3.3 Number of Addresses in an Instruction 5.4 Addressing Schemes 5.4.1 Types of Addressing Schemes 5.4.1.1 Implicit Addressing 5.4.1.2 Immediate Addressing 5.4.1.3 Direct Addressing 5.4.1.4 Indirect Addressing 5.4.1.5 Register Addressing 5.4.1.6 Register Indirect Addressing 5.4.1.7 Indexed Addressing 5.4.1.8 Base Addressing 5.4.1.9 Register Relative Addressing 5.4.1.10 Relative Based Indexed Addressing 5.4.1.11 Stack Addressing Instruction Set Architecture 5.5 Instruction Set and Format Design Issues 5.5.1 Instruction Length 5.5.2 Allocation of Bits Among Opcode and Operand 5.5.3 Variable Length of Instructions 5.6 Example of Instruction Format 5.7 Summary 5.8 Questions for Exercise 5.9 Suggested Readings 5.0 Objectives After going through this unit we should be able to: define instruction set and the characteristics of instruction set; describe the element of an instruction and differentiate various types of operands; distinguish between types of instructions and operations performed by the instructions; differentiate types of instructions set on the basis of addresses in instruction sets; identity various addressing schemes and discuss instruction format design issues. 5.1 Introduction The internal organization of a digital system is defined by the registers it employs and the sequence of micro-operations it performs on data stated in the registers.
    [Show full text]
  • Introduction to MIPS Assembly Programming
    Introduction to MIPS Assembly Programming January 23–25, 2013 1 / 26 Outline Overview of assembly programming MARS tutorial MIPS assembly syntax Role of pseudocode Some simple instructions Integer logic and arithmetic Manipulating register values Interacting with data memory Declaring constants and variables Reading and writing Performing input and output Memory-mapped I/O, role of the OS Using the systemcall interface 2 / 26 Assembly program template # Author: your name # Date: current date # Description: high-level description of your program .data Data segment: • constant and variable definitions go here .text Text segment: • assembly instructions go here 3 / 26 Components of an assembly program Lexical category Example(s) Comment # do the thing Assembler directive .data, .asciiz, .global Operation mnemonic add, addi, lw, bne Register name $10, $t2 Address label (decl) hello:, length:, loop: Address label (use) hello, length, loop Integer constant 16, -8, 0xA4 String constant "Hello, world!\n" Character constant ’H’, ’?’, ’\n’ 4 / 26 Lexical categories in hello world # Author: Eric Walkingshaw # Date: Jan 18, 2013 # Description:A simple hello world program! .data# add this stuff to the data segment # load the hello string into data memory hello: .asciiz"Hello, world!" .text# now we’re in the text segment li $v0, 4# set up print string syscall la $a0, hello# argument to print string syscall# tell theOS to do the syscall li $v0, 10# set up exit syscall syscall# tell theOS to do the syscall 5 / 26 Pseudocode What is pseudocode? • informal language • intended to be read by humans Useful in two different roles in this class: 1. for understanding assembly instructions 2.
    [Show full text]
  • 1763-RM001D-EN-P Micrologix 1100 Programmable Controllers
    Instruction Set Reference Manual MicroLogix 1100 Programmable Controllers Bulletin 1763 Controllers and 1762 Expansion I/O Important User Information Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication SGI-1.1 available from your local Rockwell Automation sales office or online at http://www.rockwellautomation.com/literature/) describes some important differences between solid-state equipment and hard-wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid-state equipment, all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable. In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment. The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and diagrams. No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this manual. Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited. Throughout this manual, when necessary, we use notes to make you aware of safety considerations. WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic loss.
    [Show full text]
  • MIPS® Architecture for Programmers Volume I-B: Introduction to the Micromips64® Architecture, Revision 5.03
    MIPS® Architecture For Programmers Volume I-B: Introduction to the microMIPS64® Architecture Document Number: MD00743 Revision 5.03 Sept. 9, 2013 Unpublished rights (if any) reserved under the copyright laws of the United States of America and other countries. This document contains information that is proprietary to MIPS Tech, LLC, a Wave Computing company (“MIPS”) and MIPS’ affiliates as applicable. Any copying, reproducing, modifying or use of this information (in whole or in part) that is not expressly permitted in writing by MIPS or MIPS’ affiliates as applicable or an authorized third party is strictly prohibited. At a minimum, this information is protected under unfair competition and copyright laws. Violations thereof may result in criminal penalties and fines. Any document provided in source format (i.e., in a modifiable form such as in FrameMaker or Microsoft Word format) is subject to use and distribution restrictions that are independent of and supplemental to any and all confidentiality restrictions. UNDER NO CIRCUMSTANCES MAY A DOCUMENT PROVIDED IN SOURCE FORMAT BE DISTRIBUTED TO A THIRD PARTY IN SOURCE FORMAT WITHOUT THE EXPRESS WRITTEN PERMISSION OF MIPS (AND MIPS’ AFFILIATES AS APPLICABLE) reserve the right to change the information contained in this document to improve function, design or otherwise. MIPS and MIPS’ affiliates do not assume any liability arising out of the application or use of this information, or of any error or omission in such information. Any warranties, whether express, statutory, implied or otherwise, including but not limited to the implied warranties of merchantability or fitness for a particular purpose, are excluded. Except as expressly provided in any written license agreement from MIPS or an authorized third party, the furnishing of this document does not give recipient any license to any intellectual property rights, including any patent rights, that cover the information in this document.
    [Show full text]
  • Ch2-Organization.Pdf
    Computer Architecture Ch2 – Computer System Organization Nguyễ n Qu ố c Đính, FIT – IUH HCMC, Apr 2014 1 Computer System Organization - Processor - Memory (bit, byte, address, ECC, cache, RAM, ROM, RAID, CD ...) - I/O (terminal, printer, modems, ASCII) - Buses The organization of a simple computer with one CPU and two I/O devices 2 Central Processing Unit (CPU) CPU function is to execute programs stored in the main memory - fetching instructions - examining instructions - executing them one after another The organization of a simple computer with one CPU and two I/O devices 3 CPU Organization ● Data path consists of: – Registers (No 1 – 32) – Arithmetic Logic Unit – Buses ● Data path cycle is the hart of most CPU The data path of a typical Von Neumann machine. 4 Instruction Execution Steps 1. Fetch next instruction from memory into instruction register 2. Change program counter to point to next instruction 3. Determine type of instruction just fetched 4. If instructions uses word in memory, determine where it is 5. Fetch the word, if needed, into CPU register 6. Execute the instruction 7. Go to step 1 to begin executing following instruction Fetch – decode – execute cycle 5 Interpreter (1) … An interpreter for a simple computer (written in Java). 6 Interpreter (2) … An interpreter for a simple computer (written in Java). 7 CISC (Complex Instruction Set Computer) ● Origin: – Initial instruction set and computer architecture – Hardware designed to facilitate software languages and programming ● Instruction – Complex, defined based on software
    [Show full text]
  • Large and Fast: Exploiting Memory Hierarchy Two Kinds of TLB Misses
    Chapter 5C Large and Fast: Exploiting Memory Hierarchy Two kinds of TLB Misses Check the valid bit of a page table entry If it is on, the page is in memory (a simple TLB miss). Otherwise, the page is not in memory (a page fault) A simple TLB miss (refill TLB) Load the PTE into TLB and retry TLB hit What if the page table is not in memory? A page fault for the page table Could be handled in hardware or in software Little performance difference between the two approaches. A page fault (for instruction or data) OS handles fetching the corresponding page from the disc and updating the page table Then restart the faulting instruction Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 2 A TLB Hit A cache that contains a subset of the page table in the main memory If there is no matching entry in the TLB for a page, the page table must be examined. Since the page table has an entry for every virtual page, no tag field is needed Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 3 A simple TLB Miss A cache that contains a subset of the page table 1. TLB miss handler copy the page table entry without checking its valid bit. TLBmiss: 1 mfc0 $k1, Context # copy PTE address lw $k1, 0($k1) # get PTE mtc0 $k1, EtnryLo # put into a special reg tlbwr # put into TLB at random in the main memory eret # return It takes about a dozen clock cycles 2. re-try the address translation: TLB hit If there is no matching entry in the TLB for a page, the page table must be examined.
    [Show full text]
  • Addressing Modes
    4. Addressing modes The topic of this chapter are the addressing modes, the different ways the address of an operand in memory is specified and calculated. Although the computer's world offers a large variety of addressing modes, we will discuss only about the basic ones, those that are used the heaviest in programs. We begin with a discussion about memory addressing: our special concern in this section is how is data (especially if we allow different data sizes) retrieved from memory and what problems appear. 4.1. Interpreting memory addresses A major decision a designer faces is how is the memory to be addressed. Example 4.1 MEMORY ACCESS: You have to design a 16 bit architecture: show how you can access the memory if you allow byte and half-word addressing or only half-word. Answer: 2 45 1 23 0 16 bit data 0 8 bit data 8 bit data 1 a) only half word b) byte and half-word Virgil Bistriceanu Illinois Institute of Technology 55 4 Addressing modes If we have a n-bit wide architecture, and we always read/write from/to memory only n-bit wide data (in our case 16-bit architecture and read/write only half-words as in example 4.1a) then there are not very many hardware problems; an address always means a half-word. However, a problem appears when we try to manipulate characters (a character nicely fits a byte): • use a whole half-word for one character. In this case we waste a byte for every char; • use a half-word to accommodate two bytes (packed).
    [Show full text]
  • Quantum with Unity Pro Hardware Description 35012595 07/2012
    Quantum with Unity Pro 35012595 07/2012 Quantum with Unity Pro 140 ESI 062 10 ASCII Interface Module User Manual 07/2012 35012595.03 www.schneider-electric.com © 2012 Schneider Electric. All rights reserved. 2 35012595 07/2012 Document Set Presentation This package contains the following manuals: Quantum and Premium Communication Architecture Reference Manual 140 EIA 921 00 Quantum AS-i-Bus Interface Module User Manual Quantum TCPIP/IP Configuration User Manual Quantum Modbus Plus Network Modules Quantum Ethernet Modules User Manual 140 ESI 062 10 Quantum ASCII Interface Module User Manual 35012595 07/2012 3 4 35012595 07/2012 Table of Contents Safety Information . 7 About the Book . 9 Chapter 1 140 ESI 062 10 Hardware Description. 11 Presentation . 12 LED Indicators. 13 External Connectors and Switches . 15 Specifications . 17 Chapter 2 Quantum Addressing Modes. 21 Flat Addressing—800 Series I/O Modules . 22 Topological Addressing—800 Series I/O Modules with Unity . 23 Addressing Example . 24 Discrete I/O Bit Numbering . 25 Addressing the 140 ESI 062 10 Module . 26 Chapter 3 Configuration Overview . 27 140 ESI 062 10 Configuration . 28 ASCII Message Formats . 30 Data Flow . 36 Parameter Configuration . 39 Chapter 4 ESI Command Line Editors . 41 Configuration Editor. 42 ASCII Message Editor. 45 Chapter 5 ESI Commands . 47 Overview on ESI Commands . 48 ESI Command Word . 49 Command Processing. 50 Command 0 - NO OPERATION . 52 Command 1- READ ASCII MESSAGE . 53 Command 2 - WRITE ASCII MESSAGE. 55 Command 3 - GET DATA (Module to Controller) . 58 Command 4 - PUT DATA (Controller to Module) . 60 Command 5 - GET TOD (Time of Day).
    [Show full text]
  • Instruction Set Architecture
    December 14, 2010 09:22 ham_338065_ch02 Sheet number 1 Page number 27 cyan black chapter 2 Instruction Set Architecture Chapter Objectives In this chapter you will learn about: • Machine instructions and program execution • Addressing methods for accessing register and memory operands • Assembly language for representing machine instructions, data, and programs • Stacks and subroutines 27 December 14, 2010 09:22 ham_338065_ch02 Sheet number 2 Page number 28 cyan black 28 CHAPTER 2 • Instruction Set Architecture This chapter considers the way programs are executed in a computer from the machine instruction set view- point. Chapter 1 introduced the general concept that both program instructions and data operands are stored in the memory. In this chapter, we discuss how instructions are composed and study the ways in which se- quences of instructions are brought from the memory into the processor and executed to perform a given task. The addressing methods that are commonly used for accessing operands in memory locations and processor registers are also presented. The emphasis here is on basic concepts. We use a generic style to describe machine instructions and operand addressing methods that are typical of those found in commercial processors. A sufficient number of instructions and addressing methods are introduced to enable us to present complete, realistic programs for simple tasks. These generic programs are specified at the assembly-language level, where machine instructions and operand addressing information are represented by symbolic names. A complete instruction set, including operand addressing methods, is often referred to as the instruction set architecture (ISA) of a processor. For the discussion of basic concepts in this chapter, it is not necessary to define a complete instruction set, and we will not attempt to do so.
    [Show full text]