Skip to content

Architecture

Alex Damhuis edited this page Nov 2, 2026 · 2 revisions

Host, application, core: how the three layers work together

This page follows the twelve arc42 chapters: a host routed together with a build-only reference core, small machines as partial cores, large machines as full bitstreams, the C64 from external firmware. State of 2026-11-02 (VERSION 0.2.0).

1. Introduction and goals

1.1 Purpose

The firmware keeps one host loaded in the FPGA. Small machines (VIC-20, Atari 800 XL, Apple IIe and the two DDT demos) are partial cores swapped under the host. Ten machines are large cores, full bitstreams of the whole FPGA, started from the host: Amiga 500, Amiga 1200, Commodore 128, C16/Plus-4, Amstrad CPC, ZX Spectrum, ZX Spectrum Next, NES, SNES and Neo Geo. The C64 is not built here: The Ultimate firmware 3.15, Commodore's 1.1.0 and TRX64-Ultimate (own repository) are started as full firmware. Applications run on the RISC-V processor of the host.

1.2 Goals

Goal Meaning
N cores One host and n partial cores behind one contract, plus large cores as full bitstreams.
Host routes with room The host is routed with a slim reference core, not with the largest machine.
Host survives The host application keeps running while a core is loaded.
Swap is a cold start Nothing of the old core remains.
No PC and no ESP32 for loading The user switches the board on and picks a core from USB or SD. The cores load through the ICAP.
Original firmware stays usable The boot menu starts a .cfw full firmware (Ultimate firmware 3.15, Commodore 1.1.0, TRX64-Ultimate) by IPROG from a flash scratch file, with the picture whole (the application writes the clock synthesizers with the factory default before the IPROG).
Large cores start fast A large core is a package like a partial core. The full check runs once, when the entry is added to the boot menu. A start reads only the directory entry and the package header. A bitstream already in the scratch file is not written again.
Integrity, not secrecy A bundle carries SHA-256 hashes. It is not signed.

2. Constraints

Constraint Meaning
Device XC7A50T. The Ultimate 64 Elite II and the C64 Ultimate share one board. A full-firmware image without a bitstream for this IDCODE is refused.
Static I/O and clocks I/O buffers, MMCM and PLL, clock buffers and the GTP transceivers stay in layer 1. The core gets raw lines (host/build.tcl removes them from pb_l2).
Reset after reconfiguration pb_l2 has RESET_AFTER_RECONFIG. The registers of a core start at their initial value after a partial load.
Region sizes See Floorplan. Layer 2 is one rectangle with 13,600 LUT, 40 block-RAM tiles and 40 DSP slices. Layer 1 is an L around it with 17,400 LUT, 35 tiles and 80 DSP slices.
Contract Version 2, 247 ports. The lint stage checks every partial core and the reference core.
Region limits of partial cores A machine above about 80 % of the 13,600 LUT of pb_l2, or above its 40 block-RAM tiles, does not route and becomes a large core (Amiga 500 14,298 LUT; NES 13,181; CPC 46.5, C16 43, ZX 42 tiles).
Host pinned No core edits host or shared files. contract/host_pin.txt holds the hashes.
Third-party sources Cores from third-party sources keep their licence notices (cores/*/rtl/NOTICE). ROMs, Kickstart and disk images are never part of a bundle.

3. Context and scope

Neighbour Owner Note
USB, SD layer 1, drivers in the application Source of .cor, .cfw, ROMs, libraries and media images. The host application scans the roots and the folder cores directly below each root.
Ethernet layer 1 The host application serves FTP (port 21, no password) and a web page with JSON status (port 80).
HDMI layer 1 Nine modes from 576p to 1280 × 1024, chosen by the application from the screen's EDID; C64-type cores stay at 1080p. Analog video is not part of the design.
Expansion port, IEC, tape, paddles, SID sockets core, pins in layer 1 The pins are idle while the core is decoupled.
Keyboard, joysticks, mouse, LEDs, audio layer 1, meaning in the core The host does the electrics. The core decides the meaning. The USB mouse reaches a core through a library of the core application.
DDR2 layer 1 arbiter The core has two command ports (c_*, e_*).
ESP32 board Board controller. It does not load cores (ADR-0055).
JTAG developer A bitstream or application loaded over JTAG has priority over the flash.

3.1 Context diagram

Context diagram: the system as a black box with person, board, media, network, external firmware, CI and developer

The system as a black box. Solid arrows are the interfaces in use while the board runs; dashed arrows are delivery paths. External firmware replaces the host when it starts.

Out of scope: two cores at one time, other boards, an FPGA other than the XC7A50T.

4. Solution strategy

Relationship Mechanism
HOST → APPLICATION The boot ROM starts the host application from flash. The host application replaces itself with a core application by a copy-and-jump routine in DDR2. The way back is IPROG.
HOST → CORE The contract at the edge of the partition, the decoupler, and the ICAP loader.
APPLICATION ↔ CORE Register windows on the I/O bus of the host. The application seeds the core after each start.
  • Narrow and generic: the channels are buses. No port name belongs to one machine, except the C64 names that the first core gave to the key matrix and the joysticks.
  • The host owns what every core needs: electrics, drivers, clocks, picture output. The core owns meaning and timing.
  • Every channel has a defined idle state for the time of a swap.
  • One generic core application serves every core built here, partial and large.
  • Separation of concerns: the host is routed with c64ref, a slim C64 that exists only for that route. A machine that does not fit comfortably in pb_l2 becomes a large core instead of squeezing the host.

5. Building block view

5.0 Level 1: whitebox

Building block view level 1: layers, contract, applications, flash, large core path

Level 1. The contract between layer 1 and layer 2 is the only interface into the core partition. The large core path leaves both layers: it configures the whole FPGA from the scratch file.

5.0a Level 1: black-box descriptions

Block Purpose Interfaces Where
Host (layer 1) Everything every core needs: clocks, DDR2, USB, SD, Ethernet, picture output, the RISC-V processor, the core loader. Never reconfigured while the board runs. Contract towards the core; register windows and the ICAP window towards the applications; board pins. host/
Contract and decoupler The 247 ports of the partition and the gating that holds every channel idle while a core is loaded. Ports list contract/layer2_ports.txt, version 2; core_decouple. contract/, host/dfx_decouple.v
Core (layer 2) One machine, or the null core, or the reference core. A partial bitstream for pb_l2; starts cold. The contract; a register block with an ID block. cores/<name>/
Host application Boot menu, package readers, core start, full-firmware start, FTP and web page. ICAP window, flash, USB/SD files, boot.cfg, hand-over page. host-app/software/hostapp/
Core application The menu and services of one running core: ROMs, settings, media, libraries. Register windows of the core, DDR2 window slots, descriptor of the core. coreapp/
Flash Holds the host bitstream with the null core, the host application, and a small file system for boot.cfg and the scratch file. Configuration at power-up, boot ROM, FatFS. release/, tools/release_mc.sh
Large core path Starts a machine that does not fit the partition as a full bitstream. Large .cor or .cfw, scratch file, IPROG. hostapp/legacy.cc, cor.cc, cfw.cc

5.0b Level 2: inside host and core

Building block view level 2: inside the host and inside one DFX core

Level 2. Left the blocks of the host, right one DFX core; the contract strip between them is drawn once. Names are those of the files in host/ and cores/.

5.1 Host application

Source: host-app/software/hostapp/. Parts: hostui (boot menu on LVGL), bootcfg (file Flash:/boot.cfg), discover (which files the Add core browser lists), startcheck (the per-start check), cor and cfw (package readers, large .cor included), coreboot (core start), legacy (full-firmware start), handover (hand-over page), webui (web page and JSON), fatwalk (cluster walk of the scratch file). The base is the FreeRTOS, USB, FatFS and lwIP code of the Ultimate application.

5.2 Core application

Source: coreapp/. One image serves all generic cores. The core is selected at run time from the ID block. coreapp/cores/<name>.cc holds the descriptor and the hooks of one core.

  • The menu is a route: F1 Home, F3 Library, F5 machine, F7 Actions, F8 System (menutree.cc). An area without entries is dropped.
  • An open menu is a freeze (freeze.cc).
  • A descriptor (desc.h) names ROMs, settings, media and tasks. Every effect is an operation by name, registered in one registry and run by one executor (ops.cc, exec.cc). The descriptor checker refuses a name that is not registered.
  • Base services: settings in a .cfg file, ROM manager, window slots with write-back, sector server with 64-bit offsets, mouse sink, picture service, library loader.
  • The library format is .u2a. A library states the capabilities it needs. The loader checks, places, relocates and registers it, and rolls back on a failure.
  • Applications (.u2a with kind = app) are specified so that they never call LVGL: an application brings a UI description that the core application renders with its own widgets, and its behaviour is operations, state values and events in the registry (T104.3 D0). The runner and the service table (ABI 3) are built on a branch; the container is being reworked to the declarative form.
  • The same registry is called by the menu, by REST (/v1/ops/<name>) and by WebSocket JSON-RPC (T104.1, on main).

5.2a Reference core

cores/c64ref ("C64 Reference") is a copy of the C64U machine without REU, turbo, sampler, datasette and UDP streams; it keeps the 8-SID reDIP, VIC, CPU, CIAs, drive, cartridge slot and UCI (9,212 LUT, 67.7 % of pb_l2, 27 block-RAM tiles; CI run 1122). It uses every port of the contract, so the partition pins and the static nets through pb_l2 are placed for a real machine. host/layers.txt names it (reference: c64ref); its descriptor marks it build only: no .cor, no release set, no boot-menu entry.

5.3 Blocks on the swap path

Block Job Location
core_decouple One signal: the JTAG bit OR the request of the application. It idles every channel. host/top.v:562
dfx_decouple.v Synchronizers and toggle-realignment modules for the channels. host/dfx_decouple.v
ICAP loader The application writes the partial through a byte window. ICAPE2 runs on cpu_clk. The loader returns its ID byte 0x7A and a word count. host/ultimate_sys.vhd (region r_icap), host/top.v
Core timeout Answers 0 at once while decoupled. Otherwise answers 0 after 65,536 clocks without acknowledge. host/ultimate_sys.vhd
Scaler relock The scaler locks to the first frame of the new core (relock input). host/vic_scaler.v

5.4 Video blocks

The order is: vic_scaler, overlay, pix_layer (the scaler), c64_text, hdmi_timing, TMDS encoder (fork host/hdmi_enc), tmds_rep, hdmi_gtp, all in host/hdmi_out.v, which host/top.v instantiates. The mode request is one write to 0x4F00 (status at 0x4F04); a low-rate mode repeats TMDS bits, not pixels (ADR-0060). Overview, section 4 describes each stage. The reference core c64ref delivers a palette raster. All other cores contain a frame-buffer writer (*_pixw, amiga_fb, a2_pix) that writes RGB565 pixels into DDR2 through the port e_*. The pixel layer reads them as video client of the DDR2 arbiter, with priority when a line is late.

5.5 Large cores (flat builds)

A machine that does not fit the partition (above about 80 % of its LUT or above its 40 block-RAM tiles) is built without the split: one bitstream for the whole FPGA, cores/<id>/mono. Ten cores are built this way: amiga, amiga1200, c128, c264, cpc, neogeo, nes, snes, zx, zxnext (the Amiga 1200 routed with WNS +0.111 ns, run 162; the C128 at about 87 % of the device, run 180). A large core carries its own copy of the host files it builds with (RISC-V, DDR2 controller and arbiter, USB, SD, Ethernet, pixel layer, HDMI) in mono/host/, with a FROM file; there is no shared include, so a host change moves no large core, and tools/check_large_copies.py guards the copies. The console builds (nes, snes, neogeo) leave out Ethernet and the VIC path (NO_NET NO_C64VIDEO); the WiFi UART stays for the menu button. There is no partition, no decoupler and no ICAP swap inside a large core.

Item Partial core Large core
Budget pb_l2: 13,600 LUT, 40 RAMB36 The device: 32,600 LUT, 75 RAMB36
Built Against the cached host checkpoint Flat, on its own (cores/<name>/mono)
Start ICAP swap (6.2) Scratch file and IPROG (6.6)
F8 Reload core: the partial again Restart core: the cold-start line
Return IPROG 0 IPROG 0
File .cor (records 1-4) large .cor (7); a .cfw is the same path

6. Runtime view

6.1 HOST → APPLICATION: start-up

Step What happens
Power-up The FPGA configures from flash 0x000000 (host bitstream).
Boot ROM First: an application loaded over JTAG (boot magic 0x1571BABE in DDR2). Otherwise: the image at flash 0x220000, only when the bitstream stamp of the flash equals the stamp of the running bitstream.
Host application Mounts USB and SD, reads Flash:/boot.cfg, asks the screen for its mode (EDID), shows the boot menu. The default entry starts when the countdown ends.
Hand-over Before the jump the host writes a 4 KiB page at 0x03EFF000: the path of the bundle, the core name and version, the host key, the picture mode.
Wrong core The core application compares the ID block with its descriptor. On a mismatch it reports it and keeps the core held.

Sequence: power-on to the boot menu with the per-start check

Sequence of 6.1 and the per-start check of 6.7. The host application shows rows; a difference marks the row "changed" or "missing" and drops nothing.

6.2 HOST → CORE: the swap

  • Verify: Bundle header, contract, host key. The SHA-256 of the parts was checked when the entry was added; a start trusts it while the directory entry and the package header are unchanged (6.7).
  • Decouple: ICAP_DC = 1, wait 10 ms for the DDR2 requests in flight, read the status bit back.
  • Load: The partial through the ICAP. Compare the word count.
  • Release: ICAP_DC = 0. The core starts cold. The machine reset is held by the host until the application releases it.
  • Jump and seed: The trampoline in DDR2 copies the application to its load address (0x30000 to 0xE80000) and jumps. The application seeds ROMs and settings.

Caution: The user can abort with RUN/STOP or Esc only while this is safe. After the ICAP stage the core is loaded but not started. The core stays cut off. The user must pick a core again or switch the board off and on.

Sequence: DFX swap, core application load and ROM seeding

Sequence of 6.2. The core application is loaded by the trampoline after the release; the machine reset stays held by the host until the application releases it.

6.3 Channels of the contract

Channel Content
Clocks, resets The host owns every clock generator. The core receives cpu_clk, sys_clk, ui_clk, mclk and resets.
Register window cw_*: 24-bit address, 8-bit data, acknowledge, interrupt.
Memory Two command ports into the DDR2 arbiter (c_*, e_*), gated while decoupled.
Video, audio Palette raster or none (idle); audio samples at the core's rate with audio_sample_en.
Input 64-bit key matrix, two joysticks.
Connectors Cartridge port raw, IEC levels, tape pins, paddles, SID sockets.
Events, identity, debug Interrupt and event lines read 0 while decoupled. host_caps is a constant of the host.

6.4 APPLICATION ↔ CORE: windows and seeding

Overview, section 6 lists the windows and their addresses. The application reaches a window at 0x10000000 plus the local address.

  • After a start, the application writes the ROMs and the configuration into the core, then releases the machine reset.
  • ROM files are found in <root>/roms/<folder> on /flash, /usb0 to /usb3, /sd. The names come from the descriptor and are matched without regard to case. A file of the wrong size is reported by name and size.
  • Media images are served to the core as sectors (64-bit offsets) or through window slots with write-back to the file.

Sequence: core application and core

Sequence of 6.4: the core application and the running core.

6.5 Return and full firmware

  • Return: the core application sends IPROG with the start address 0. The host bitstream loads again.
  • Full firmware: the host checks the .cfw, writes the matching bitstream into /Flash/legacy/fullcore.bit when it differs, stages the application in DDR2, writes the factory default into both clock synthesizers (the host gateware lets the application reach them only for this), and sends IPROG with the flash address of that file. There is no return except a power cycle.
  • Reload core (F8): on a partial core the core application loads its own partial again from the .cor of the hand-over (checks, decouple, ICAP, release), then seeds ROMs and settings as a start does. Every flip-flop and block RAM of the core returns to its configuration value: a cold start without leaving the core.

6.6 Large cores

A core that does not fit the partition comfortably is built flat: the whole FPGA, host blocks and machine in one bitstream, with the same core application. It is packaged as a large .cor (7). The start uses the path of a .cfw.

Caution: The hand-over page of 6.1 survives the IPROG. On the board (2026-10-26) a large Amiga 1200 core read the page that the host had written for the ZX core before, and the core application refused to run ("The bundle is ZX, the core in the FPGA is Amiga"). With the page empty (after a power cycle) it could not choose either, because the Amiga 500 and 1200 descriptors share the ID AMIG. Fixed on main and proven on the board: the start of a large .cor writes the page itself, with the path and the manifest name, and the start of a .cfw wipes it.

  • Select: The boot menu lists the large core beside the partial cores and the firmwares.
  • Stage: The full-firmware path of 6.5: the bitstream into the scratch file of the flash drive only when it differs, the application into DDR2, the factory default into the clock synthesizers.
  • Jump: IPROG to the scratch file. The flash at 0x000000 is never written.
  • Run: The core application starts, seeds ROMs and settings. F8 is Restart core: a cold-start line in the core resets every register, the video timing included.
  • Return: IPROG with start address 0: the host bitstream loads again.

Sequence: start of a large core and the way back

Sequence of 6.6. A large core returns by IPROG 0 from the core menu; the application of a .cfw firmware has no return except a power cycle.

6.7 Per-start check of the boot menu

  • Adding is the full check. F3 reads and hashes every part of a .cor (SHA-256) or parses a .cfw. The entry stores size, modification time and a digest of the package header next to the hash.
  • A start reads two things: (a) size and modification time from the directory entry, (b) the package header (manifest with the SHA-256 of every part, contract, host key; under 2.2 KB). A .cfw gets (a) only.
  • A difference marks the row "changed", a missing file "missing". Nothing is dropped. A changed row still starts, with the full check of its parts. R checks the selected entry again and accepts it.
  • The application does not search the media for bundles or images. Only entries added by hand are listed.

Note: Measured on the board (2026-10-26): this check stood 11 s at "Checking the cores in the menu". It goes. The menu comes up from boot.cfg alone and opens no entry before it is shown; the icon and the state of an entry are read afterwards, one entry at a time, never holding a key. A core start keeps its own verification (the SHA-256 of every part while it loads), so a changed or missing file is refused at its start with the reason and R. This is on main (T101); the rules above describe the check that the host application in the flash no longer runs at the start.

7. Deployment view

Artefact Location Rule
Host bitstream flash 0x000000 The host with the null core in the partition (null_full.bit; no machine in the flash). Never reconfigured while the board runs. Routed with c64ref, which is never shipped.
Host application flash 0x220000 Image in the format {destination, length, run} followed by the data.
Boot menu file Flash:/boot.cfg Countdown, default entry, picture mode, up to 16 entries (path, name, SHA-256, size, modification time and header digest).
Scratch file /Flash/legacy/fullcore.bit One file. It holds the bitstream of the last full firmware that was started.
.cor bundle USB or SD, in a root or in cores/ Three parts: partial, application, optional icon. Manifest with SHA-256 per part, the contract and the host key.
Large core USB or SD, in a root or in cores/ The ten large cores: a large .cor (kind "large"; manifest, application, optional icon, record 5 with the full bitstream; IDCODE and map instead of contract and host key). Started through the scratch file, never written to 0x000000.
.cfw firmware USB or SD, beside the bundles The C64: Ultimate firmware 3.15, Commodore 1.1.0, TRX64-Ultimate. Pre-header, updater image with one or more bitstreams, application record. Not built in this repository; cores/c64u and cores/trx64 are source trees only.
Libraries <root>/trx/lib/*.u2a Files on the medium. They are not part of a bundle.
ROMs <root>/roms/<folder>/ From the user. Never in a bitstream, bundle or release.
Release package release archive Built by tools/release_mc.sh from the .cor files (partial and large) and the checksums. A release is made by hand on GitHub.

7.1 Deployment diagram

Deployment diagram: CI lanes produce packages that reach the board flash, SD card and USB stick

From the CI lanes to the board. A lane runs only on its triggers (8.1); the package collects what the lanes built.

Note: The core application serves media images with 64-bit offsets. The file browser of the host application lists sizes as 32-bit values.

8. Cross-cutting concepts

Concept Rule
Contract versioning An addition is a new port. The version is checked by the lint stage, by the packer and by the host application.
Cold start A swap is a cold start. The application seeds the core.
Absent-device answer A window that has no device answers reads with 0.
Timeouts 65,536 clocks, then 0. At once while decoupled.
Host key A bundle names the host it was routed against. A mismatch is refused before the ICAP is touched ("other host").
Boot menu badges hash ok, ready, changed, missing, damaged, unusable, other host, contract N != M.
Crash rescue The Commodore key held at start skips all libraries. A boot-attempt counter in boot.cfg does the same after a start that did not finish.
Build switches The host's optional blocks (UCI, UDP streams, JTAG debug master) follow the TRX_FEATURES of the reference core's descriptor. The JTAG debug master stays in the host.
Build-only cores flash_filler (null) and the build-only flag (c64ref) keep a core out of every .cor list, release set and boot menu.
JTAG debug master The JTAG debug master stays in the host.
JTAG has priority An application or bitstream loaded over JTAG overrides the flash. A core shifted in over JTAG was not handed over by the host.
Experimental cores A core with experimental = true is built and reported like any other. Its failure turns the run red.

8.1 Builds

Builds run by change: a plan step diffs a push against the last green run, maps the changed files to targets (the host, each partial core, each large core, the applications, the benches) and builds only those; everything else comes from the cache. A partial core is built against the cached host result, a large core flat on its own. Time limits per target: partial core 45 min, large core 120 min, host with reference core 150 min. A target that exceeds its limit is stopped and turns the run red at the end; the other targets are still built and packed. host/trx_constraints.tcl stops a host build before opt_design when a constraint resolved to no object. The file VERSION is the SemVer (0.2.0): 0.2.0+<sha8> on main, <branch>@<sha8> on a branch, <VERSION> on a tag. A board installer (.cfw, .ue2, .txu) of any branch is built on request. Releases are made by hand on GitHub.

9. Architecture decisions

ID Decision
ADR-0055 Cores load through the ICAP, not through the ESP32.
ADR-0056 Each Amiga core chooses its own Kickstart. No core starts with a disk in the drive.
ADR-0057 Every application sets the video mode, not only the host application.
ADR-0058 Full-bitstream firmwares start by IPROG from a file in the flash drive.
ADR-0059 The picture path from the sources to the pins is the host's, for every core.
ADR-0060 Low-rate modes repeat TMDS bits, not pixels.
ADR-0061 One video-out source for the host and every large core (each large core builds its own copy of it, T164 3a Q1).
ADR-0062 The screen decides which modes are offered; the host holds a default, each core its own.
ADR-0063 The host region grows with the video path; a core that no longer fits becomes a large core.
Contract rules Native picture, windowed memory, peripherals in the host, IEC levels only, 8-bit register bus.
Host pin A core never edits host files. The host is pinned by hash.
Generic core application One application for every core built here. Behavior comes from the descriptor.
T115 §7 The host is routed with the build-only c64ref. Machines that do not fit the partition are large cores. The C64U and TRX64 cores stay as source trees and are never built: the C64 comes from Ultimate firmware 3.15, Commodore 1.1.0 and TRX64-Ultimate as .cfw.
T101 S10, T115 §7 Adding an entry is the only full check. A start checks size, modification time and the package header. The application searches no medium.
T100 D9-D12 The build is by change, one lane per target, in parallel.
T101 The start does not check the entries. The menu comes from boot.cfg alone; icon and state are read afterwards; a core start verifies its parts while loading. This replaces the per-start check above once merged.
T112 Q1 A large core follows the folder logic of the partial cores: the start writes the hand-over page with the path and the manifest name; the ROM search starts beside the .cor, then follows the cascade.
T104.3 D0 (branch) Applications bring a declarative UI description and never call LVGL.
T177 (decided, not built) A recovery start at power-on (RESTORE held, then F1): recovery.cor or the installer backup, no flash write, case LED pattern, decided in the host application.
T123 The flash holds the host and a null core, not a machine.

10. Quality requirements

Requirement Verification
A bundle for another contract or another host is refused Bench tests/hostapp (bundle reader, with crafted files)
A damaged part is detected by its hash Same bench
A .cfw without a bitstream for the XC7A50T or without an application record is refused Bench tests/hostapp (cfw reader)
Every core has the ports of the contract Lint stage: tools/contract_ports.py --check
The host files are unchanged Lint stage: tools/host_pin.sh
A core routes against the fixed host Bitstream stage: pr_verify must pass for every core
A large .cor is read and refused correctly (wrong IDCODE, truncated, damaged, record 5 in a partial bundle) tools/test_cor_pack.py, bench tests/hostapp (test_corlarge)
The per-start check marks a changed or missing file and drops nothing Bench tests/hostapp (start check), render bench of the host application
The plan names the right targets Lint stage: ci/test_plan.sh (a host change, a core change, an application change, the diff base)
A core application follows its descriptor Native benches tests/coreapp, each with a negative control
A library that must be refused is refused Benches tests/loader, tests/coreapp

11. Risks and limits

Limit Effect
Layer 2 area Routing above about 80 % LUT use of the 13,600 LUT is not reliable (Floorplan), and the partition has 40 block-RAM tiles. Whatever is above either limit is a large core.
Layer 1 area The host uses 73.6 % of its region (12,802 of 17,400 LUT, WNS +0.138 ns, run 1122). A host change competes for the rest and moves the timing of the RISC-V instruction-cache loop, which is the critical path of layer 1.
Output mode The host offers the nine modes the screen names in its EDID; with no EDID a fixed television set is listed. C64-type cores (the VIC path) stay at 1080p. A changed mode is confirmed within 8 s or reverted. The V key of the boot menu steps through the same list.
No address check on the DDR2 ports A core can write anywhere in DDR2. Only the cores in the repository are supported.
No watchdog for a hanging core The host application cannot take the core away from a hanging machine except by IPROG through the menu or by a power cycle.
One scratch file Only one full bitstream is held in the flash drive at a time: switching between two large cores or firmwares writes the flash each time.
Reference core is not a product The host is routed together with c64ref (67.7 % of pb_l2); a partial core that is much denser than it may still fail to route.
Changed files The per-start check trusts size, modification time and the package header. A file edited without changing these is not noticed until it is added again (R).
Stale hand-over page The page in DDR2 is not cleared by an IPROG. A start that does not write it hands the next core the page of the previous one (see 6.6).
Core folders The host finds bundles in the roots and in one folder cores directly below a root, not deeper.

12. Glossary

Term Meaning
DFX Partial reconfiguration: a static part keeps running while a region is rewritten.
Partial bitstream Configuration frames for layer 2 only.
ICAP Internal configuration port. The host application feeds it through the ICAP window.
IPROG, WBSTAR The ICAP command that reloads the FPGA, and the register for its start address (0 = flash 0x000000).
Decoupler Gating at the edge of the partition. It holds every channel idle while layer 2 is undefined.
.cor Core bundle: manifest, partial bitstream, core application, optional icon. A large .cor carries a full bitstream instead of the partial.
.cfw Full firmware image with its own bitstream and application.
.u2a Library of the core application.
Descriptor The description of a core for the generic core application: menus, settings, ROM set, media slots, operations.
Contract The 247 ports between host and core (version 2).
Host key Eight hex digits that identify the host a partial was routed against.
Reference core The core the host is routed together with (c64ref). Built only, never shipped.
Large core A machine built as a full bitstream of the whole FPGA, started from the host by IPROG.
Layer 1, 2, 3 Host gateware, core gateware (pb_l2), software.
Pixel layer The host block that shows an RGB565 frame buffer from DDR2 over the picture.
RESET_AFTER_RECONFIG Region property: registers start at their initial value after a partial load.

Clone this wiki locally