ull
ull is the core of the other crates in this project as it contains the type-safe numeric
wrappers (Nibble, Byte, Word) plus the Bus trait. Higher-level crates supply ready-to-use
bus implementations (e.g., SimpleBus in ull65) while sharing the same address and DMA semantics.
Other crates leverage these fundamental building blocks so they can share the same semantics for addresses, DMA, and
memory I/O. While not every system will use every aspect of this crate, they will all still use this as the foundation.
Bus trait
The Bus trait models a synchronous, byte-addressed data bus:
- Each bus chooses its own
Accesstype (or()if it doesn’t care) so higher-level CPUs can tag reads/writes however they see fit. on_ticklets peripherals run “in parallel” with the CPU by giving the bus a chance to advance its own notion of time each time the CPU consumes cycles.request_dma/poll_dma_cycleallow the bus to enqueue DMA work that should be factored into the CPU’s total cycles.
Reference buses
The companion ull65 crate ships two simple 8-bit implementations built on this trait:
SimpleBus– a flat 64KiB RAM array with helpers to load buffers and update the reset vector.TestingBus– a 64KiB RAM array backed byBox<[u8]>that records total cycles, DMA cycles, and lets you enqueue DMA bursts up front.
They’re deliberately minimal so you can embed them into examples or as a starting point for a richer memory map.
Quick start
use ;
use ;
/// Example of embedding `SimpleBus` inside a richer memory map.
;