Computer Memory. Textbook: Chapter 1

Similar documents
A N. O N Output/Input-output connection

Computer Architecture

1. Memory technology & Hierarchy

Memory Basics. SRAM/DRAM Basics

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Memory unit. 2 k words. n bits per word

Memory. The memory types currently in common usage are:

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

CHAPTER 7: The CPU and Memory

Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Chapter 5 :: Memory and Logic Arrays

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

ARM Cortex STM series

Lecture 9: Memory and Storage Technologies

Computer Systems Structure Main Memory Organization

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

MICROPROCESSOR AND MICROCOMPUTER BASICS

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Computer Architecture

Features. DDR SODIMM Product Datasheet. Rev. 1.0 Oct. 2011

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Chapter 7 Memory and Programmable Logic

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Algorithms and Methods for Distributed Storage Networks 3. Solid State Disks Christian Schindelhauer

The Central Processing Unit:

Memory ICS 233. Computer Architecture and Assembly Language Prof. Muhamed Mudawar

SOLVING HIGH-SPEED MEMORY INTERFACE CHALLENGES WITH LOW-COST FPGAS

Objectives. Units of Memory Capacity. CMPE328 Microprocessors (Spring ) Memory and I/O address Decoders. By Dr.

Communicating with devices

Chapter 13. PIC Family Microcontroller

Handout 17. by Dr Sheikh Sharif Iqbal. Memory Unit and Read Only Memories

Discovering Computers Living in a Digital World

Microprocessor or Microcontroller?

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

USB - FPGA MODULE (PRELIMINARY)

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

CSE2102 Digital Design II - Topics CSE Digital Design II

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Chapter 2 Logic Gates and Introduction to Computer Architecture

Lecture 2: Computer Hardware and Ports.

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

Big Picture. IC220 Set #11: Storage and I/O I/O. Outline. Important but neglected

Table 1: Address Table

Switch Fabric Implementation Using Shared Memory

Basic Computer Organization

SBC6245 Single Board Computer

MCF54418 NAND Flash Controller

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

Microprocessor & Assembly Language

Computer Systems Structure Input/Output

8741A UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Computer organization

1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded

What is a bus? A Bus is: Advantages of Buses. Disadvantage of Buses. Master versus Slave. The General Organization of a Bus

Raspberry Pi. Hans- Petter Halvorsen, M.Sc.

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

7a. System-on-chip design and prototyping platforms

AN10935 Using SDR/DDR SDRAM memories with LPC32xx

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

With respect to the way of data access we can classify memories as:

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

SDRAM and DRAM Memory Systems Overview

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

EUCIP IT Administrator - Module 1 PC Hardware Syllabus Version 3.0

Application Note 132. Introduction. Voice Video and Data Communications using a 2-Port Switch and Generic Bus Interface KSZ MQL/MVL

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Chapter 9 Semiconductor Memories. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Am186ER/Am188ER AMD Continues 16-bit Innovation

OpenSPARC T1 Processor

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

Semiconductor Device Technology for Implementing System Solutions: Memory Modules

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

STM32 F-2 series High-performance Cortex-M3 MCUs

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

Embedded Multi-Media Card Specification (e MMC 4.5)

User s Manual HOW TO USE DDR SDRAM

What is a System on a Chip?

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

Price/performance Modern Memory Hierarchy

Chapter 1 Computer System Overview

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

361 Computer Architecture Lecture 14: Cache Memory

Memory Systems. Static Random Access Memory (SRAM) Cell

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

Atmel Norway XMEGA Introduction

GR2DR4B-EXXX/YYY/LP 1GB & 2GB DDR2 REGISTERED DIMMs (LOW PROFILE)

EUCIP - IT Administrator. Module 1 - PC Hardware. Version 2.0

Transcription:

Computer Memory Textbook: Chapter 1 ARM Cortex-M4 User Guide (Section 2.2 Memory Model) STM32F4xx Technical Reference Manual: Chapter 2 Memory and Bus Architecture Chapter 3 Flash Memory Chapter 36 Flexible Static Memory Controller 1

Computer Memory Systems Memory system hierarchy Disk, ROM, RAM, Cache Memory module (chip) organization On-chip (address) decoder, cell array Memory system interfacing Address decoding Bus timing Direct memory access (DMA) Transfer data directly between memory and I/O devices Coordinated by a DMA controller

Computer Memory Hierarchy CPU Registers Cache Memory M C Main Memory M M Secondary Memory (Disk) M D Memory Content: M C M M M D Memory Parameters: Access Time: increase with distance from CPU Cost/Bit: decrease with distance from CPU Capacity: increase with distance from CPU 3

Semiconductor Memory RAM (Random Access Memory) Constant access time, independent of location A unique address for each location (generally a byte) The address is decoded by one or more address decoders RAM (Read/Write Memory) vs. ROM (Read Only Memory) RAM ROM User s application programs and data Information is lost when the power is off Embedded system program code and operating system Information is retained even without power Each ROM cell is simpler than a RAM cell

Read-only memory types Mask-programmed ROM Programmed at factory PROM (Programmable ROM) Programmable once by users Electric pulses selectively applied to fuses EPROM (Erasable PROM) Repeatedly programmable/reprogrammable Electric pulses for programming (seconds) Ultraviolet light for erasing (minutes) EEPROM (Electrically Erasable PROM) Electrically erasable at the single-byte level (msec) & programmable Flash EPROM Electrically programmable (µsec) & erasable (block-by-block: msec~sec) Most common program memory in embedded applications Widely used in digital cameras, multimedia players, smart phones, etc.

Read-write memory types Static RAM (SRAM) Each cell is a flip-flop, storing 1-bit information which is retained as long as power is on Faster than DRAM Requires a larger area per cell than DRAM Dynamic RAM (DRAM) Each cell is a capacitor, which needs to be refreshed periodically to retain the 1-bit information A refresh consists of reading followed by writing back Refresh overhead 4 Mbyte DRAM: Refreshed every 4 msec Organized as 2048 rows x 2048 columns 2048 refreshes 1 refresh 80 nsec 2048 80 10 4 10 3 9 0.041 4.1% of time spent refreshing

Memory organization (RAM) RAM Structure Memory Cell Select Data In D Data Out R/W A byte consists of 8 memory cells, with common control signals, Select and R/W, and 8 bidirectional data lines With n bit address, there can be up to 2 n bytes in the memory system. An n-bit address is decoded by an address decoder to generate n the control signal, Select.

ROM/RAM device organization Memory organization = 2 n x d (from system designer s perspective) Address n Column # c Row # r Row Decoder Memory array Size. 2 n addressable words Address width = n = r + c Aspect ratio. Data width d. 8 Column Decoder d Data bus connection

Address Decoding Selecting a sub-space of memory address A simple example Microprocessor with 5 address bits (A 4 A 0 ) 2 5 = 32 bytes addressable Memory chip: 4 x 8 (4 bytes) Decodes two address bits (A 1 A 0 ) Can address up to 8 chips (decode address bits (A 4 A 3 A 2 ) for chip enable On-Chip Decoder Memory Array Off-Chip Decoder A 0 A 1 A B 0 1 Byte 0 Byte 1 A 2 A 3 A 4 Decode Upper Address Bits Enable 2 3 Byte 2 Byte 3

Typical generic SRAM CE OE WE Address Data SRAM 10 CE = chip enable: initiate memory access when active OE = output enable: drive Data lines when active WE = write enable: update SRAM contents with Data (May have one R/W signal instead of OE and WE ) Multi-byte data bus devices have a byte-enable signal for each byte.

Generic SRAM timing CE OE read WE write Adrs Data From SRAM From CPU time 11

12 Microprocessor buses Mechanism for communication with memories and I/O devices Bus components: signal wires with designated functions protocol for data transfers electrical parameters (voltage, current, capacitance, etc.) physical design (connectors, cables, etc.) Clock provides synchronization. R/W is true when reading (R/W is false when reading). Address is a-bit bundle of address lines. Data is n-bit bundle of data lines. Data ready signals when n- bit data is ready.

13 Timing diagrams

Typical bus read and write timing 14 From memory to CPU From CPU to memory

15 Bus wait state

Cortex-M4 memory map Add external memory in this address range

STM32F407 Microcontroller External Bus AHB 168MHz APB 142MHz APB 84MHz 17

STM32 Flexible Static Memory Controller (FSMC) - STM32F4xx Tech. Ref. Manual, Chap. 36 Control external memory on AHB bus in 4-256K banks Upper address bits decoded by the FSMC Bank 1 addresses: A[31:28] = 0110 A[27:26 ]= 64MB bank select A[25:0] = 64MB bank offset Static memorymapped devices: * SRAM * Pseudo-Static RAM * NOR flash 2 banks NAND flash 16-bit PC-Card devices 18

Example SRAM address decoding SRAM/NE4 Addresses: [ 0x6C00 0000 0x6F00 0000] 31 28 27-26 25 0 0110 1 1 0.. 6.. 4Gbyte E address space 4-to-16 decoder Flash Ext SRAM Cortex peripherals Ext SRAM bank 2-to-4 decoder NE1 NE2 NE3 NE4 NOE NWE 2 26 = 64 Mbytes A25-A0 CE OE WE 19 SRAM

FSMC block diagram N = negative (active low) NE[4:1] = NOR/PSRAM enable NE[1]: A[27:26]=00 NE[2]: A[27:26]=01 NE[3]: A[27:26]=10 NE[4]: A[27:26]=11 NL = address latch/advance NBL = byte lane CLK for sync. Burst A[25:0] = Address bus D[15:0] = Data bus** NOE = output enable NWE = write enable NWAIT = wait request ** Data bus = 8 or 16 bits 20

FSMC Mode 1 memory read Other modes: * Provide ADV (address latch/ advance) * Activate OE and WE only in DATAST * Multiplex A/D bits 15-0 * Allow WAIT to extend DATAST 21 ADDSET/DATAST programmed in chip-select timing register (HCLK = AHB clock)

Example: 512K x 16 SRAM (1 Mbyte) D[15..0] A[19..1] 1Mbyte (2 20 ) used of this 64Mbyte (2 26 ) address space for NEx Therefore, 6 address bits not decoded: A[25..20] A[0] is part of NBL[1:0] NBL[1] NBL[2] NOE NWE NEx 22 Microcontroller decodes upper address bits ADDR[31..26] for NEx

23 Flash memory devices Available in NAND or NOR structures NOR flash system interface similar to SRAM (random access) NAND flash system interface typically serial (indirect access) Read operations are the default, and similar to other memory devices Writing/erasing is initiated by writing commands to the Flash memory controller Flash is programmed at system voltages. Erasure time is long, and must be erased in blocks.

Ex: SST39VF1601-1M x 16 NOR Flash SST39VF3201=2M x 16 (4Mbyte: 2 22 ) / SST39VF3201=4M x 16 (8Mbyte: 2 23 ) D[15..0] A[20..1]** 2Mbyte (2 21 ) used of 64Mbyte (2 26 ) addr. space Therefore, 5 address bits not decoded: A[25..21]** A[0] is part of NBL[1:0]* NRESET NOE NWE NEx 24 Byte lane selects NBL[1:0] not used: all operations are words SST39VF3201 uses A[21..1], SST39VF6401 uses A[22..1]

SST39VF1601 characteristics Organized as 1M x 16 2K word sectors, 32K word blocks Performance: Read access time = 70ns or 90ns Word program time = 7us Sector/block erase time = 18ms Chip erase time = 40ms Check status of write/erase operation via read DQ7 = complement of written value until write complete DQ7=0 during erase, DQ7=1 when erase done 25

26 SST39VF1601 command sequences (assert WE# and CE# to write commands)

Generic DRAM device CE R/W RAS CAS Address DRAM Data RAS = Row Address Strobe: row# on Address inputs CAS = Column Address Strobe: column# on Address inputs 27

Generic DRAM timing CE R/W RAS CAS Adrs Data row adrs col adrs data time 28

Page mode access CE R/W RAS CAS Adrs row adrs col adrs col adrs col adrs Data data data data time 29

30 Bus burst read (if supported)

Dynamic RAM refresh Value decays in approx. 1 ms. Refresh value by reading it. Can t access memory during refresh. RAS-only refresh CAS-before-RAS refresh. Hidden refresh. 31

Other DRAM forms Extended data out (EDO): improved page mode access. Synchronous DRAM: clocked access for pipelining. Double Data Rate (DDR) transfer on both edges of clock DDR-1, DDR-2, DDR-3 support increasingly higher bandwidths Rambus: highly pipelined DRAM. 32

CPU Bus Types Synchronous vs. Asynchronous Sync: all op s synchronized to a clock Async: devices signal each other to indicate start/stop of operations May combine sync/async (80x86 Ready signal) Data transfer types: Processor to/from memory Processor to/from I/O device I/O device to/from memory (DMA) Data bus types Parallel (data bits transferred in parallel) Serial (data bits transferred serially) 33

Typical bus data rates 34 Source: Peter Cheung Computer Architecture & Systems Course Notes

Hierarchical Bus Architecture CPU Local Cache controller System Main Memory Main Memory bridge Expansion LAN Controller Video Controller Mouse/ Keyboard USB Controller USB Disk Controller IDE/SCSI USB Device 35

Example ARM System 36 Joe Bungo (ARM): CPU Design Concept to SoC

DMA Direct memory access (DMA) performs data transfers without executing instructions. CPU sets up transfer by programming the DMA controller. DMA engine fetches, writes. DMA controller is a separate unit can become bus master. 37

Bus mastership Bus master controls operations on the bus. By default, CPU is bus master and initiates transfers. Other devices may request bus mastership. Separate set of handshaking lines. CPU can t use bus when it is not master. Bus mastership protocol: Bus request a device requests bus mastership from CPU Bus grant CPU relinquishes and grants mastership to device Situations for multiple bus masters: DMA data transfers Multiple CPUs with shared memory One CPU might be graphics/network processor 38

DMA operation CPU configures DMA controller registers for: peripheral address, memory start address, #xfers, direction (P->M or M->P) Peripheral issues DMA request to DMA controller. DMA controller takes bus mastership from CPU Once DMA is bus master, it transfers automatically. Memory address incremented and count decremented for each transfer. May run continuously until complete. May use every n th bus cycle. 39