Memory Organization

42
Memory Organization Microprocessor and Interfacing 261313

description

Memory Organization. Microprocessor and Interfacing 261313. CPU 8088 10 MHz 8/16 Bit 1M RAM. CPU 80486 66 MHz 32 Bit 8M RAM. Pentium 133 MHz 32 Bit 16M RAM. Pentium MMX 200 MHz 32 Bit 48M RAM. Pentium II 366 MHz 32 Bit 128M RAM. Pentium M 1.6 GHz 32 Bit - PowerPoint PPT Presentation

Transcript of Memory Organization

Page 1: Memory Organization

Memory Organization

Microprocessor and Interfacing261313

Page 2: Memory Organization

CPU 8088 10 MHz 8/16 Bit1M RAM

Page 3: Memory Organization

CPU 80486 66 MHz 32 Bit8M RAM

Page 4: Memory Organization

Pentium 133 MHz 32 Bit16M RAM

Page 5: Memory Organization

Pentium MMX

200 MHz 32 Bit48M RAM

Page 6: Memory Organization

Pentium II 366 MHz 32 Bit128M RAM

Page 7: Memory Organization

Pentium M 1.6 GHz 32 Bit512M RAM

Page 8: Memory Organization

Core2 Duo 2.0 GHz 32/64 Bit4G RAM

Page 9: Memory Organization

Core i51.33 – 1.86 GHz 32/64 Bit4G RAM

Page 10: Memory Organization

What has changed the least?

Page 11: Memory Organization

0

500

1000

1500

2000

2500

CPU MHz

0

10

20

30

40

50

60

70

Bits

MHz RAM

CPU Bits

Page 12: Memory Organization

What does “Bits” mean?

Page 13: Memory Organization

A CPU “bits” is typically defined by: ALU Size

How many bits can be computed at one time?

Bus SizeHow many bits can be transferred on the bus?

Memory Address SizeHow many address bits are in the instruction?

Page 14: Memory Organization

How many bits Is this PIC CPU?

Page 15: Memory Organization

.................... int16 i;

....................

.................... i=1; 0017: BCF 03.60018: CLRF 220019: MOVLW 01001A: MOVWF 21.................... i = i+2; 001B: MOVLW 02001C: ADDWF 21,F001D: BTFSC 03.0001E: INCF 22,F

16-bit operation on a 8-bit CPUMicrochip PIC16 series

Page 16: Memory Organization

.................... int16 i;

....................

.................... i=1; 0017: BCF 03.60018: CLRF 220019: MOVLW 01001A: MOVWF 21.................... i = i+2; 001B: MOVLW 02001C: ADDWF 21,F001D: BTFSC 03.0001E: INCF 22,F

0 1

0 1

Page 17: Memory Organization

16-bit operation on a 16-bit CPUMicrochip PIC24 series.................... int16 i; .................... .................... i=1; 00210: MOV #1,W400212: MOV W4,802.................... .................... i = i+2; 00214: MOV 802,W400216: ADD W4,#2,W400218: MOV W4,802

Page 18: Memory Organization

ระบบ 32 Bit กำ��ลั�งเจอท�งตั�น?

Page 19: Memory Organization

RAM ใหญ่�ท��สุ�ดท��ระบบ 32 bit มองเห�นม�ค่��เป็�นเท��ใด?

Page 20: Memory Organization

Memory Limit of 32bit Machines

= 4 Giga Bytes

322

Page 21: Memory Organization

How to support bigger memory?

1.Upgrade to 64-bit systems

64-bit OS64-bit CPU

Page 22: Memory Organization

Limitation of moving to 64-bit systems

Need 64-bitHardware Drivers

Applicationsneed to be re-compiledwith a 64-bit compiler

Page 23: Memory Organization

How to support bigger memory?

2. Expand existing bits

Page 24: Memory Organization

วิ ธี�แกำ#ป็$ญ่ห�ของ Intel

Physical Address Extension (PAE)

4 bits 32 bits

362 = 64 GB

Page 25: Memory Organization

PAE Support

CPU with PAE(Since P-Pro)

PAE Aware OS

Page 26: Memory Organization

Benefits of PAE

Backward Compatible

Limitations

Taking advantage of the added memorystill requires changes in the software

Page 27: Memory Organization

Memory Limit of 64 Bit Machines?

?264

Page 28: Memory Organization

How big can we get?

1 kilobyte 1 megabyte 1 gigabyte 1 terabyte 1 petabyte 1 exabyte 1 zettabyte 1 yottabyte 1 xonabyte 1 wekabyte 1 vundabyte

1,024 1,048,576

1,073,741,824 1,099,511,627,776

1,125,899,906,842,624 1,152,921,504,606,846,976

1,180,591,620,717,411,303,424 1,208,925,819,614,629,174,706,176

1,237,940,039,285,380,274,899,124,224 1,267,650,600,228,229,401,496,703,205,376

1,298,074,214,633,706,907,132,624,082,305,024

264 = 18,446,744,073,709,551,616 ~ 18 exabyte

Page 29: Memory Organization

ปี�

Amount of RAM (GB) in a typical computer

About 4TBin 2025

Page 30: Memory Organization

64-Bit Architectures

IA-64 AMD 64,  EM64TOr X86-64

True 64bit CPU Hybrid 32/64 bit CPU

Page 31: Memory Organization

A hybrid 32/64 bit system

Has the benefits of a 64-bit programs

Can also run older 32-bit programs

32-Bit programs will not benefit from the 64-bit architecture

Architecture not as clean as true 64-bit systems

Page 32: Memory Organization

สองเรื่�องน่�ารื่ �เกี่�ยวกี่�บหน่�วยความจำ�าของPIC Microcontroller

Page 33: Memory Organization

1. When Memory Grows Beyond Anticipation (เม�อหน่�วยความจำ�าขยายโตเกี่�น่คาด)

Page 34: Memory Organization

1.1 กี่ารื่อ�างอ�งต�าแหน่�งใน่ Flash Memory

Page 35: Memory Organization

0x500 ค�าส�ง0x501 CALL 0x900

… …

0x900 ค�าส�งถั�ดไปี

What is wrong with this call command?

Page 36: Memory Organization

K = 11 bitMaximum memory = 2^11 = 2K Bytes

Page 37: Memory Organization

PIC 16F877 has 8K Flash Memory: How do we access all of it?

PCLATH (F# 0x0A)

Bit 3-4 in PCLATH are usedfor memory access

07

Total Memory becomes 2^13 = 8K Bytes

4 3

Page 38: Memory Organization

Creating a 13 bit memory address

PCLATH

07

01012

CALL or GOTO k (Literal)

0101113

13 Bit Memory Address

OPCODE

4 3

Page 39: Memory Organization

PIC Flash Memory is Divided in to

4 Pages of 2KBytes

2K2K2K2K

01012

Page 40: Memory Organization

0x500 ค�าส�ง0x501 CALL 0x900

… …

0x900 ค�าส�งถั�ดไปี

Fix this program

Page 41: Memory Organization

Address 0x900 exceeds 11 bits

0 1 0 101012

0x900 = 0 0 0 0 0 0 0 00

0x1000x01

Page 42: Memory Organization

0x4FF BCF PCLATH, 4

0x500 BSF PCLATH, 3

0x501 CALL 0x100

… …

0x900 ค�าส�งถั�ดไปี

0 1 0 101012

0x900 = 0 0 0 0 0 0 0 00

0x1000x01