Skip to content

Commit 45910cf

Browse files
authored
Merge pull request #16 from ApolloTeam-dev/content-memory-controller-128
Memory controller is 128-bit from Core 12600; one core for all V4 models
2 parents 01cb0a6 + 491f8ee commit 45910cf

4 files changed

Lines changed: 34 additions & 6 deletions

File tree

‎AGENTS.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ relative to the knowledge base root.
1919
`saga-dma-anni` (DMA), `saga-3d-maggie` (3D).
2020
- **V4 models**: V4 Standalone (SA), V4 UniCorn (UNI, A6000), V4 IceDrake
2121
(ICE), V4 Manticore (MC) and V4 Firebird (FB). They share the FPGA core
22-
(68080 and SAGA) but differ as boards. The project's own AGENTS.md states
23-
the target model(s), if it depends on one.
22+
(68080 and SAGA) but differ as boards. A core number has exactly the same
23+
features and architecture on every model; the boards differ only in small
24+
physical properties (for example, the V4 IceDrake has no second SPI
25+
port). The project's own AGENTS.md states the target model(s), if it
26+
depends on one.
2427
- **Target OS**: Apollo V4 software runs on one or more of **ApolloOS R10**
2528
(fork of AROS, optimized for Apollo V4), **AmigaOS 3.9** and
2629
**AmigaOS 3.2**. The project's own AGENTS.md states which. Hardware

‎core/cpu-68080/caches-and-memory.md‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ related:
1919
sources:
2020
- "TuKo1982, 68080 compilation and optimisation guide (2026-10-30), sections 5.1 and 5.2"
2121
- "Gunnar (core developer), answers to questions on the guidelines, 2026-11-03"
22+
- "Gunnar (core developer), memory controller width, 2026-11-04"
23+
- "WDrijver (maintainer), same core on every V4 model, 2026-11-04"
2224
---
2325

2426
## Summary
@@ -66,19 +68,27 @@ counter, median of 7, two identical runs (M, Core 12841, 2026-10-29):
6668

6769
There is no single number. A miss loads a 64-byte burst: the memory
6870
latency plus the burst cycles, 4 on a 128-bit bus and 8 on a 64-bit bus.
69-
On top of that it depends on:
71+
The memory controller is 128-bit from Core 12600 and 64-bit on older cores
72+
(G, 2026-11-04). On top of that it depends on:
7073

7174
- whether the access hits the same row, page or bank as the last one;
7275
- whether the last access was a read or a write;
7376
- the CPU itself: when it reads and writes at the same time, the write goes
7477
first;
7578
- other memory users (Copper, Blitter, Maggie, Arne, HDMI), which can be
76-
served before the CPU;
77-
- the memory controller, which differs between V4 models.
79+
served before the CPU.
80+
81+
The memory controller is part of the core, so it is the same on every V4
82+
model that runs the same core (see
83+
[hardware/index.md](../../hardware/index.md)).
7884

7985
The 27 cycles above are one case: dependent random reads over 4 MB. When
8086
you measure a miss, state these conditions.
8187

88+
Memory-bound measurements from a core before 12600 (64-bit controller) are
89+
not comparable with those from Core 12600 and later. All measurements in
90+
this knowledge base are from Core 12798 or later.
91+
8292
### Alignment
8393

8494
Copy of a 156 x 2464-byte shape (M):
@@ -120,3 +130,5 @@ Copy of a 156 x 2464-byte shape (M):
120130
random.
121131
- DON'T use a table for anything you can compute in 16 cycles or less (G).
122132
- DON'T keep a loop counter in memory.
133+
- DON'T compare memory-bound timings across Core 12600: the memory
134+
controller doubled from 64 to 128 bits there.

‎core/cpu-68080/core-at-a-glance.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ related:
1818
sources:
1919
- "TuKo1982, 68080 compilation and optimisation guide (2026-10-30), section 1"
2020
- "Gunnar (core developer), answers to questions on the guidelines, 2026-11-03"
21+
- "Gunnar (core developer), memory controller width, 2026-11-04"
2122
---
2223

2324
## Summary
@@ -36,7 +37,7 @@ statement wins.
3637
| Decoders | 3. Only the first takes multi-cycle instructions (mul, div, movem, bitfields, FPU) and addx/subx/negx, which need the flags of the previous instruction |
3738
| I-cache | 32 KB, **64-byte line** (G, 2026-10-29). Feeds the decoders **16 bytes per cycle**; a group of instructions that run together is at most 16 bytes (some I-cache variants: 18) (G, 2026-11-03), see [execution-units.md](execution-units.md). Few ways on Core 12841 (G); the number of ways is a build option: 4, 2 or 1 (G, 2026-10-30). Note the core build with every measurement |
3839
| D-cache | 128 KB, **64-byte line** (G, 2026-10-29; M). **1 read and 1 write per cycle** (G, 2026-11-03): `add.l #1,mem` runs at about 1 per cycle. One memory address per cycle, so an instruction with two memory operands needs more than one |
39-
| Bus and memory | 64-bit, 64-byte bursts (one cache line), about 12 cycles latency, automatic prefetch of sequential streams |
40+
| Bus and memory | Memory controller 128-bit from Core 12600, 64-bit before (G, 2026-11-04). 64-byte bursts (one cache line), about 12 cycles latency, automatic prefetch of sequential streams |
4041
| Branch cache | 1024-entry BTC, a loop predictor, and a return cache for rts/rtd/rtr |
4142
| MMU | None. PMMU and cp4–cp6 opcodes are illegal (`lpstop` remains) |
4243
| FPU | 64-bit (double) internally, pipelined. Microcoded functions (trig, log, exp, fmod, frem, fscale, fgetexp/fgetman) take 100–200+ cycles and clobber E23 |

‎hardware/index.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ applies_to:
1111
tags: [v4, boards, models, standalone, unicorn, icedrake, manticore, firebird]
1212
sources:
1313
- "WDrijver (maintainer), V4 models and abbreviations, 2026-11-03"
14+
- "WDrijver (maintainer), same core on every V4 model, 2026-11-04"
1415
---
1516

1617
## Summary
@@ -33,6 +34,17 @@ connectors, headers, memory and model differences.
3334

3435
The V4 Standalone and the V4 UniCorn are different models.
3536

37+
### One core architecture for all models (rule)
38+
39+
All V4 boards share the same core architecture. A core number has exactly
40+
the same features and architecture on every model: Core 12600 on the V4
41+
UniCorn is the same as Core 12600 on the V4 IceDrake, including the 68080,
42+
SAGA and the memory controller. Models differ only in small physical
43+
properties, for example: the V4 IceDrake has no second SPI port.
44+
45+
So a fact about the core (`core/`) holds for every model; give the core
46+
number, not the model. Put a physical difference in `hardware/`.
47+
3648
### Where things go
3749

3850
- `hardware/v4-generic/`: knowledge that holds for every V4 model.

0 commit comments

Comments
 (0)