Memory Management: Difference between revisions

From F256 Foenix
Jump to navigationJump to search
No edit summary
No edit summary
Line 51: Line 51:




=== Memory Block Table ===
=== Memory Block Tables ===
 
==== RAM ====
{| class="wikitable"
!Block Number!!CPU Address Space
|-
|$00||$00:0000 - $00:1FFF
|-
|$01||$00:2000 - $00:3FFF
|-
|$02||$00:4000 - $00:5FFF
|-
|$03||$00:6000 - $00:7FFF
|-
|$04||$00:8000 - $00:9FFF
|-
|$05||$00:A000 - $00:BFFF
|-
|$06||$00:C000 - $00:DFFF
|-
|$07||$00:E000 - $00:FFFF
|-
|$08||$01:0000 - $01:1FFF
|-
|$09||$01:2000 - $01:3FFF
|-
|$0A||$01:4000 - $01:5FFF
|-
|$0B||$01:6000 - $01:7FFF
|-
|$0C||$01:8000 - $01:9FFF
|-
|$0D||$01:A000 - $01:BFFF
|-
|$0E||$01:C000 - $01:DFFF
|-
|$0F||$01:E000 - $01:FFFF
|-
|$10||$02:0000 - $02:1FFF
|-
|$11||$02:2000 - $02:3FFF
|-
|$12||$02:4000 - $02:5FFF
|-
|$13||$02:6000 - $02:7FFF
|-
|$14||$02:8000 - $02:9FFF
|-
|$15||$02:A000 - $02:BFFF
|-
|$16||$02:C000 - $02:DFFF
|-
|$17||$02:E000 - $02:FFFF
|-
|$18||$03:0000 - $03:1FFF
|-
|$19||$03:2000 - $03:3FFF
|-
|$1A||$03:4000 - $03:5FFF
|-
|$1B||$03:6000 - $03:7FFF
|-
|$1C||$03:8000 - $03:9FFF
|-
|$1D||$03:A000 - $03:BFFF
|-
|$1E||$03:C000 - $03:DFFF
|-
|$1F||$03:E000 - $03:FFFF
|-
|$20||$04:0000 - $04:1FFF
|-
|$21||$04:2000 - $04:3FFF
|-
|$22||$04:4000 - $04:5FFF
|-
|$23||$04:6000 - $04:7FFF
|-
|$24||$04:8000 - $04:9FFF
|-
|$25||$04:A000 - $04:BFFF
|-
|$26||$04:C000 - $04:DFFF
|-
|$27||$04:E000 - $04:FFFF
|-
|$28||$05:0000 - $05:1FFF
|-
|$29||$05:2000 - $05:3FFF
|-
|$2A||$05:4000 - $05:5FFF
|-
|$2B||$05:6000 - $05:7FFF
|-
|$2C||$05:8000 - $05:9FFF
|-
|$2D||$05:A000 - $05:BFFF
|-
|$2E||$05:C000 - $05:DFFF
|-
|$2F||$05:E000 - $05:FFFF
|-
|$30||$06:0000 - $06:1FFF
|-
|$31||$06:2000 - $06:3FFF
|-
|$32||$06:4000 - $06:5FFF
|-
|$33||$06:6000 - $06:7FFF
|-
|$34||$06:8000 - $06:9FFF
|-
|$35||$06:A000 - $06:BFFF
|-
|$36||$06:C000 - $06:DFFF
|-
|$37||$06:E000 - $06:FFFF
|-
|$38||$07:0000 - $07:1FFF
|-
|$39||$07:2000 - $07:3FFF
|-
|$3A||$07:4000 - $07:5FFF
|-
|$3B||$07:6000 - $07:7FFF
|-
|$3C||$07:8000 - $07:9FFF
|-
|$3D||$07:A000 - $07:BFFF
|-
|$3E||$07:C000 - $07:DFFF
|-
|$3F||$0$7:E000 - $07:FFFF
|}

Revision as of 07:24, 23 December 2023

The F256 line comes with 512 KB of RAM and 256 KB of flash memory. Up to 256 KB additional Memory, either RAM or Flash, can be added through the Expansion Port.

Physical Memory Layout

The address bus is 21 bits wide, allowing a total of 221 = 2 MB to be addressed.

Address Purpose
$00:0000 - $07:FFFF RAM
$80:0000 - $0F:FFFF Flash
$10:0000 - $13:FFFF Expansion Memory
$14:0000 - $1F:FFFF Reserved

Memory Management Unit (MMU)

While the address bus is generally 21 bits wide, the CPU address bus of the 65c02 and the FNX6809 is only 16 bits wide. Even though the 65816 does have a 24 bit wide address bus, this is currently not used. However, this might change with a future update.

To allow the addressing of the whole address space, a Memory Management Unit (MMU) is provided, that translates the CPU logical address space to physical addresses.

To achieve this, the MMU has 8 slots, each representing an 8 KB block of the CPU addressable memory space.

The physical address space is also divided into 8 KB blocks, dividing the available 2 MB into 256 blocks.

To map a block of physical addresses into CPU address space, the block number is written into the according slot register of the MMU.

Slot CPU Address Space Slot Register Address
0 $0000 - $1FFF $0008
1 $2000 - $3FFF $0009
2 $4000 - $5FFF $000A
3 $6000 - $7FFF $000B
4 $8000 - $9FFF $000C
5 $A000 - $BFFF $000D
6 $C000 - $DFFF $000E
7 $E000 - $FFFF $000F


Memory Block Tables

RAM

Block Number CPU Address Space
$00 $00:0000 - $00:1FFF
$01 $00:2000 - $00:3FFF
$02 $00:4000 - $00:5FFF
$03 $00:6000 - $00:7FFF
$04 $00:8000 - $00:9FFF
$05 $00:A000 - $00:BFFF
$06 $00:C000 - $00:DFFF
$07 $00:E000 - $00:FFFF
$08 $01:0000 - $01:1FFF
$09 $01:2000 - $01:3FFF
$0A $01:4000 - $01:5FFF
$0B $01:6000 - $01:7FFF
$0C $01:8000 - $01:9FFF
$0D $01:A000 - $01:BFFF
$0E $01:C000 - $01:DFFF
$0F $01:E000 - $01:FFFF
$10 $02:0000 - $02:1FFF
$11 $02:2000 - $02:3FFF
$12 $02:4000 - $02:5FFF
$13 $02:6000 - $02:7FFF
$14 $02:8000 - $02:9FFF
$15 $02:A000 - $02:BFFF
$16 $02:C000 - $02:DFFF
$17 $02:E000 - $02:FFFF
$18 $03:0000 - $03:1FFF
$19 $03:2000 - $03:3FFF
$1A $03:4000 - $03:5FFF
$1B $03:6000 - $03:7FFF
$1C $03:8000 - $03:9FFF
$1D $03:A000 - $03:BFFF
$1E $03:C000 - $03:DFFF
$1F $03:E000 - $03:FFFF
$20 $04:0000 - $04:1FFF
$21 $04:2000 - $04:3FFF
$22 $04:4000 - $04:5FFF
$23 $04:6000 - $04:7FFF
$24 $04:8000 - $04:9FFF
$25 $04:A000 - $04:BFFF
$26 $04:C000 - $04:DFFF
$27 $04:E000 - $04:FFFF
$28 $05:0000 - $05:1FFF
$29 $05:2000 - $05:3FFF
$2A $05:4000 - $05:5FFF
$2B $05:6000 - $05:7FFF
$2C $05:8000 - $05:9FFF
$2D $05:A000 - $05:BFFF
$2E $05:C000 - $05:DFFF
$2F $05:E000 - $05:FFFF
$30 $06:0000 - $06:1FFF
$31 $06:2000 - $06:3FFF
$32 $06:4000 - $06:5FFF
$33 $06:6000 - $06:7FFF
$34 $06:8000 - $06:9FFF
$35 $06:A000 - $06:BFFF
$36 $06:C000 - $06:DFFF
$37 $06:E000 - $06:FFFF
$38 $07:0000 - $07:1FFF
$39 $07:2000 - $07:3FFF
$3A $07:4000 - $07:5FFF
$3B $07:6000 - $07:7FFF
$3C $07:8000 - $07:9FFF
$3D $07:A000 - $07:BFFF
$3E $07:C000 - $07:DFFF
$3F $0$7:E000 - $07:FFFF