Memory Address Map CS RD RAM 0 0 RD WR 1K x 8 WR DB(0..7) 1 - - PDF document

memory address map
SMART_READER_LITE
LIVE PREVIEW

Memory Address Map CS RD RAM 0 0 RD WR 1K x 8 WR DB(0..7) 1 - - PDF document

Memory Address Map CS RD RAM 0 0 RD WR 1K x 8 WR DB(0..7) 1 AB Decoder AB(10..11) 2 CS RAM 1 EN RD 3 CPU WR 1K x 8 AB AB(0..11) CS RAM 2 RD AB(12) 1K x 8 WR AB AB(13..15) CS RAM 3 RD BEGIN END A 12 A 11 A 10


slide-1
SLIDE 1

Flaxer Eli - Computer Architecture

Ch 7 - 1

Memory Address Map

RAM 0 1K x 8

CS RD WR AB

RAM 1 1K x 8

CS RD WR AB

RAM 2 1K x 8

CS RD WR AB

RAM 3 1K x 8

CS RD WR AB

ROM 4K x 8

CS RD AB

Decoder

1 2 3

CPU

AB(0..11) RD

AB(10..11)

AB(12) AB(0..9) AB(0..11) AB(13..15) WR

A10 A11 A12 END BEGIN 03FFH 0000H RAM 0 1 07FFH 0400H RAM 1 1 0BFFH 0800H RAM 2 1 1 0FFFH 0C00H RAM 3 x x 1 1FFFH 1000H ROM

EN DB(0..7)

Flaxer Eli - Computer Architecture

Ch 7 - 2

Address Map Table

A10 A11 A12 END BEGIN 03FFH 0000H RAM 0 1 07FFH 0400H RAM 1 1 0BFFH 0800H RAM 2 1 1 0FFFH 0C00H RAM 3 x x 1 1FFFH 1000H ROM

Flaxer Eli - Computer Architecture

Ch 7 - 3

Associative Memory Organization

M

Match Register

Read Write n-Bit Data

Associative Memory Array & Logic

m Word n Bit

Key Register (K) Arg Register (A) Output

Only the bit with ‘1’ in K reg are compared. The A reg compared with each word in the memory. In each matched word there has ‘1’ in M reg.

Tag

Only the words with a tag ‘1’ are exist in memory

slide-2
SLIDE 2

Flaxer Eli - Computer Architecture

Ch 7 - 4

Example

Main Memory 64K x 12

CPU

Cache Memory 256 x 12

16-Bit Address 8-Bit Address

Mapping Controller

Flaxer Eli - Computer Architecture

Ch 7 - 5

Direct Mapping

Main Memory 64K x 12 Cache Memory 256 x 12

Tag Index 8 bits 8 bits 00 00H FF FFH 00H FFH

  • If the cache size is 2K

and the main memory size is 2N then:

  • Index length = K
  • Tag length = N - K

It impossible to map addresses with the same index and difference tag. No choice is possible for replacing

Flaxer Eli - Computer Architecture

Ch 7 - 6

Direct Mapping

Main Memory Data 12 Bit Main Memory Address (16 Bit) 123H 0000H 234H 00FFH 345H 0100H 456H 01FFH 567H 0200H 678H 02FFH Cache Memory Data Cache Memory Tag Cache Address 123H 00 00 234H 00 FF 345H 01 00 456H 01 FF 567H 02 00 678H 02 FF

slide-3
SLIDE 3

Flaxer Eli - Computer Architecture

Ch 7 - 7

Address Space & Memory Space

The address field of the instruction code has a sufficient number of bits to specify all virtual addresses. Program 1

00000H FFFFFH

Program 2 Data 2, 1 Data 1, 1 Data 1, 2 Auxiliary Memory Address Space N=1024K=220 Program 1

0000H 7FFFH

Data 1, 1 Main Memory Memory Space M=32K=215 Virtual Address Mapper

Flaxer Eli - Computer Architecture

Ch 7 - 8

Memory Page Table

Table Address

Virtual Address Block 0 Main Memory Main Memory = 4K Virtual Memory = 8K Page = 1K MBR 11

000

01 10 00

001 010 011 100 101 110 111

1 1 1 1 1 01 0 1 0 1 0 1 0 0 1 1 1 0 1 Block 1 Block 2 Block 3 0 1 0 1 0 1 0 0 1 1 01 Presence Bit Main Memory Address Reg Line Number Page no Main Memory Buffer Reg

Flaxer Eli - Computer Architecture

Ch 7 - 9

Associative Page Table

Virtual Address Block 0 Main Memory Main Memory = 4K Virtual Memory = 8K Page = 1K MBR 0 1 0 1 0 1 0 0 1 1 1 0 1 Block 1 Block 2 Block 3 0 1 0 1 0 1 0 0 1 1 01 Main Memory Address Reg Line Number Page no 010 110 101 11 00 01 10 01 101 001 00 111 00 101 Arg Reg Key Reg

Associative Memory