본문 바로가기
컴퓨터/컴퓨터구조

Maximum Addressable Memory size 구하기

by 우유식빵 2021. 4. 14.

Addressable Memory (주소를 가진 메모리)

메모리가 주소값과 공간으로 구성되어있다.

CPU는 주소값을 이용하여 메모리에 접근할 수 있다.

주소값을 이용하여 메모리에 접근하면 CPU는 메모리에 데이터를 쓰거나 데이터를 읽을 수 있다.

 

예를들어 3bit의 주소 공간을 가지고 있다면, 2^3 = 8로 8개의 주소 공간을 가질 수 있다.

메모리의 한 주소 공간의 크기가 1byte라고 하면 maximum addressable memory size는 8byte가 된다.

만약 한 주소 공간의 크기가 4byte라고 하면 maximum addressable memory size는 4*8byte = 32byte가 된다.

 

그래서 주소 공간 1개당 1byte라고 하고 instruction 32bit를 가져온다고 했을 때

address bus에 000주소를 실어서 memory에 간다음에 4칸만큼(4byte=32bit)의 정보를 

data bus에 싣고 오면 되는 것 같다. 그러고선 PC(program counter)는 100을 가리키겠지!

(아니라면 댓글로 정정해주세요!)

 

 

 

stallings 책은 한 메모리 공간의 크기를 1 byte라고 가정한다.

문제를 살펴보면, 32bit microprocessor having 32-bit instructions composed of two fields라고 하면서

instruction이 32bit인데 8bit는 opcode, 나머지 24bit는 immediate operand또는 operand address라고 한다.

이 경우 maximum directly addressable memory capacity는 어떻게 구할 것인가

 

 

24bit를 모두 주소 비트로 사용할 수 있으므로 2^(20+4) = 16Mbyte의 주소 공간을 가질 수 있다.

 

그런데 사실 CPU와 addressable memory사이에 주소값을 주고 받을 때 address bus를 이용한다.

그래서 address bus의 width가 한번에 CPU가 접근 할 수 있는 주소 공간을 결정한다.

Address bus size당 접근가능한 addressable memory size이다. 한번에 저 size를 모두 받아 올 수 있다는 게 아니라

저 사이즈만큼의 범위에 접근 할 수 있다고 생각하면 될 것 같다. 

 

 

 

출처: https://www.sciencedirect.com/topics/engineering/bit-address-bus

 

 

참고: cs.stackexchange.com/questions/28915/what-is-the-maximum-directly-adddressable-memory-capacity

 

What is the maximum directly adddressable memory capacity?

This is taken from OPERATING SYSTEMS: INTERNALS AND DESIGN PRINCIPLES by WILLIAM STALLINGS Consider a 32-bit microprocessor composed of 2 fields: the first byte contains the opcode and remainder an

cs.stackexchange.com

 

댓글