1 unstable release

Uses new Rust 2024

new 0.4.0 Feb 21, 2026

#4 in #stenm

MIT license

235KB
4.5K SLoC

core1

The I/O Router and Northbridge (Core 1).

Purpose

This crate implements the communications and routing layer. It bridges the high-speed Physics Core (Core 0) with external interfaces: sensors, visualiser, and inter-MCU grid. Designed to run on Core 1 of the RP2350.

Key Types

Type Description
CommsKernel<G, C> Generic kernel over grid/control transceivers
DebugAgent Manages debug subscriptions and command processing

Responsibilities

  1. Packet Routing

    • Receives Packet from Core 0 via internal bus.
    • Routes spikes to Bus B (PIO Mesh) for inter-cluster traffic.
    • Forwards DebugEvent telemetry to host via Bus D (Diagnostic).
  2. Regulator Snooping

    • Inspects DebugEvent::Cluster telemetry packets
    • Extracts queue depth and quadrant activity for regulator
    • Supports deterministic draining for DST tests
  3. I/O Management

    • Manages grid transceiver (inter-MCU PIO)
    • Manages control transceiver (USB/SPI to host)

Kernel Loop

The CommsKernel multiplexes three streams:

  1. Control Stream — Commands from UI/Regulator → Forward to Core 0
  2. Internal Stream — Packets from Core 0 → Route to Vis or PIO
  3. IO Stream — Packets from PIO → Convert to Events for Core 0

Dependencies

  • io_bus — Transceiver traits and packet types
  • debug_interfaceDebugEvent for telemetry forwarding
  • control_interfaceControlEvent, RegulatorInput
  • inter_coreNeuronEvent for spike routing

Dependencies

~1.8–8.5MB
~146K SLoC