Grundlagen Microcontroller Memory. Günther Gridling Bettina Weiss

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

8051 INTERFACING TO EXTERNAL MEMORY

Chapter 5 Internal Memory

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

Semiconductor Memories: RAMs and ROMs

MEMORY BHARAT SCHOOL OF BANKING- VELLORE

Memory memories memory

Computer Organization. 8th Edition. Chapter 5 Internal Memory

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

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

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

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

CPEG300 Embedded System Design. Lecture 3 Memory

Memory & Simple I/O Interfacing

EE 308: Microcontrollers

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

P-2 Digital Design & Applications

+ Random-Access Memory (RAM)

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

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

Hardware Design with VHDL PLDs I ECE 443. FPGAs can be configured at least once, many are reprogrammable.

Chapter TEN. Memory and Memory Interfacing

UNIT-V MEMORY ORGANIZATION

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

Computer Organization and Assembly Language (CS-506)

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

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

Memory Study Material

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

ELCT 912: Advanced Embedded Systems

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Memory Expansion. Lecture Embedded Systems

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

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

CS 320 February 2, 2018 Ch 5 Memory

Logic and Computer Design Fundamentals. Chapter 8 Memory Basics

Chapter 5. Internal Memory. Yonsei University

Programmable Logic Devices Introduction CMPE 415. Programmable Logic Devices

Lecture 13: Memory and Programmable Logic

Logical Design of Digital Systems

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

Chapter 4 Main Memory

Memory Interfacing & decoding. Intel CPU s

Basic Computer Architecture

Read and Write Cycles

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

THE MICROCOMPUTER SYSTEM CHAPTER - 2

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

RISC (Reduced Instruction Set Computer)

UNIT:4 MEMORY ORGANIZATION

Keywords: NVSRAM, DRAM, SRAM, EEPROM, shadow RAM, NV Memory, MK48Z08, MK48Z18, nvsrams, NV SRAMs

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

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

! Memory Overview. ! ROM Memories. ! RAM Memory " SRAM " DRAM. ! This is done because we can build. " large, slow memories OR

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

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

ECSE-2610 Computer Components & Operations (COCO)

ECE321 Electronics I

Allmost all systems contain two main types of memory :

Another fundamental component of the computer is the main memory.

MEMORY. Computer memory refers to the hardware device that are used to store and access data or programs on a temporary or permanent basis.

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

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

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

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

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

Three-box Model: These three boxes need interconnecting (usually done by wiring known as a bus. 1. Processor CPU e.g. Pentium 4 2.

eaymanelshenawy.wordpress.com

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

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

Introduction to general architectures of 8 and 16 bit micro-processor and micro-controllers

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

ECE 341. Lecture # 16

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

Large and Fast: Exploiting Memory Hierarchy

UMBC. Select. Read. Write. Output/Input-output connection. 1 (Feb. 25, 2002) Four commonly used memories: Address connection ... Dynamic RAM (DRAM)

1. Explain in detail memory classification.[summer-2016, Summer-2015]

ORG ; Week8. Memory and Memory Interfacing

Computer Systems Organization

System Unit. By: Khadeeja Farkash

COMPUTER ARCHITECTURE AND ORGANIZATION

Design and Implementation of an AHB SRAM Memory Controller

Overview. EE 4504 Computer Organization. Historically, the limiting factor in a computer s performance has been memory access time

The Central Processing Unit

Operating system Dr. Shroouq J.

EE251: Thursday November 15

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

Lecture 18: Memory Systems. Spring 2018 Jason Tang

Summer 2003 Lecture 18 07/09/03

Address connections Data connections Selection connections

Read Only Memory ROM

Memory and Programmable Logic

MODULE 12 APPLICATIONS OF MEMORY DEVICES:

RTL Design (2) Memory Components (RAMs & ROMs)

Digital Systems. Semiconductor memories. Departamentul de Bazele Electronicii

Memory and Programmable Logic

Computer Memory. Textbook: Chapter 1

chapter 8 The Memory System Chapter Objectives

Control System Implementation

Transcription:

Grundlagen Microcontroller Memory Günther Gridling Bettina Weiss 1

Lecture Overview Memory Memory Types Address Space Allocation 2

Memory Requirements What do we want to store? program constants (e.g. lookup tables) "semi constants" (e.g. configuration parameters) variables (e.g. loop vaiables) 3

Memory Requirements Program requirements permanent storage (available after power up) accessible to CPU (read access) protected against accidental modifications protected against external read accesses (proprietary) 4

Memory Requirements Constants requirements permanent storage (available at program start) accessible to program (read access) protected against accidental modifications 5

Memory Requirements Semi constants requirements permanent storage (available at program start) accessible to program (read & write access) protected against accidental modifications 6

Memory Requirements Variables requirements temporary storage (computed by program) accessible to program (read & write access) fast access 7

Memory Types Different types of memory for different uses 2 major classifications: ROM (read only memory): read access (more or less) RAM (random access memory): read & write access 8

ROM Memory ROM: lots of different types ROM PROM (Programmable ROM) EPROM (Erasable Programmable ROM) EEPROM (Electrically Erasable Programmable ROM) Flash (Flash EEPROM) common feature: retain data even after loss of power 9

ROM Memory ROM programmed at production (with a mask) customer gives desired contents to manufacturer no later changes possible used for mass production (cheap for high quantities) 10

ROM Memory PROM: Programmable ROM array of fuses, can be programmed once customer can program the memory programming: destroy memory cells to create 0's special programming device required (high programming current destroys cells) later changes possible if 1 > 0 (but not 0 > 1) OTP: One Time Programmable 11

ROM Memory EPROM: Erasable Programmable ROM can be erased by UV light quartz window in chip admits light > cells are erased erasure requires UV lightsource can only erase whole chip, not single cells progr. voltage higher than operating voltage about 100 write cycles 12

ROM Memory OTP EPROM: EPROM without a window cheaper (plastic casing instead of ceramic) is used after code is bug free can use same programmer as with EPROM 13

ROM Memory EEPROM: Electrically Erasable PROM can be erased electrically in system programming possible! can erase single cells > can simply write to it writing is slooooow (ms range!) guaranteed endurance of about 100k write cycles guaranteed data integrity typically 10 years 14

Flash: EEPROM with an edge erasure of blocks, not single cells block writes > faster ROM Memory nice for situations where larger portions of memory have to be changed (e.g. program updates) guaranteed endurance of about 1k 10k write cycles guaranteed data integrity typically 10 years 15

RAM Memory RAM: Random Access Memory DRAM (Dynamic RAM) SRAM (Static RAM) NVRAM (Non Volatile RAM) common feature: lose data after loss of power (except NVRAM) 16

RAM Memory DRAM: Dynamic RAM loses data after some time (ms range) needs refreshing every few ms (read contents, write them again) > lower bound on operating frequency! reading a cell destroys the contents > have to write it back inexpensive (only 1 transistor per cell) not used for microcontrollers 17

SRAM: Static RAM RAM Memory retains data during read operation does not require refresh cycles > no lower bound on operating frequency more expensive (4 transistors per cell) commonly used in microcontrollers 18

RAM Memory NVRAM: Non Volatile RAM combination of SRAM and EEPROM read & write operations access SRAM SRAM is copied to EEPROM before power down EEPROM is copied to SRAM after power up restrictions on life time due to EEPROM combines permanent storage with fast access times 19

RAM Memory NV SRAM: SRAM with battery just an SRAM, but with battery during power down, battery power retains data no restriction on number of write cycles data loss if battery dies during power down 20

Memory Characteristics Comparison (AN170 Dallas Semiconductor) Memory read (ns) write (per byte) lifetime EPROM 45 200 100 us 100 cycles EEPROM 70 200 200 us 1 ms 10k 100k Flash 45 200 10 us 1k 10k NV SRAM 70 200 70 200ns infinite ROMs are slow to write compared to SRAM 21

Microcontrollers tend to have Flash EEPROM SRAM We need to store Memory program constants semi constants, variables 22

Memory Possible memory allocations: Flash: Program, Constants EEPROM: Program, (Semi )Constants SRAM: (Program, (Semi )Constants), Variables One limitation: architecture restrictions 23

Memory Architectures von Neumann architecture program and data in same memory and/or accessed through same bus program instruction fetches conflict with data access > von Neumann bottleneck program execution gets slowed down 24

Memory Architectures Harvard architecture program and data in different memories and accessed through different busses no conflicts between program and data access > faster than von Neumann drawback: more complex hardware 25

Memory Address Space one common address space for all memory types same access strategy for all memory types memory allocation under control of programmer one address space per memory type access to program memory is different from access to data memory (e.g. ATmega16: Flash program memory access with special instructions, SRAM data memory with normal addresses, EEPROM with dedicated registers) memory allocation is restricted (e.g. program only in Flash) 26

Memory Allocation Memory Allocation: Program initial value of PC is 0x0000 > either put program there, or put in a jump to program starting address RAM: easy code modifications, no lifetime concerns > for prototyping; program is gone after power loss ROM: when code is finished; program is available after power on Flash: easy update of code (new versions) Harvard: program memory is fixed (e.g. Flash) 27

Memory Allocation Memory Allocation: Constants if really constant (no changes): Flash is nice (implicit write protection) if configuration parameters (change seldomly): EEPROM (data retention) SRAM: possibly during development (faster access, no lifetime concerns); but changes required if no common address space 28

Memory Allocation Memory Allocation: Variables SRAM (easy and fast access) EEPROM: only if there is not enough space in SRAM, beware write lifetime and slow write access! 29

Memory Types: ROM (ROM, PROM, EPROM, EEPROM, Flash): slow writes (finite), retain data after power loss RAM (DRAM, SRAM, NVRAM/NV SRAM): fast writes, lose data if not non volatile Allocation: Lecture Summary Flash: Program and constants EEPROM: configuration parameters SRAM: variables 30

von Neumann architecture: common program and data memory, common bus, von Neumann bottleneck Harvard architecture: separate program and data memory > faster Address space: Lecture Summary all memory modules in one address space each memory has its own address space 31