Skip to content
Devin AI edited this page Aug 7, 2026 · 3 revisions

Architecture

Wiki hero

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)

Layout

thalamic-relay/
├── src/
│   ├── main.rs      # CLI, lockfile, main loop, UDP, SNN step
│   ├── lib.rs       # re-exports cpu + gpu modules
│   ├── gpu.rs       # HardwareBridge, GpuTelemetry, safety, emergency brake
│   └── cpu.rs       # init_telemetry, RelayMetrics, metrics collector
├── Cargo.toml       # bin thalamic-relay; neuromod, tokio, nvml-wrapper, …
└── .github/workflows/ci.yml

Standalone crate (no workspace members). Former FPGA/silicon-bridge coupling removed — modularity over in-tree hardware export.

Main loop (simplified)

  1. Parse CLI; acquire /tmp/thalamic_relay.lock before binding ports
  2. init_telemetry → tracing + Prometheus listener
  3. Build SpikingNetwork::with_dimensions(num_lif, num_izh, num_channels)
  4. Bind UDP; each step:
    • Read telemetry (read_telemetry_force)
    • Handle emergency brake apply/release tasks
    • Every 10 steps: check_safety
    • process_udp_messages (stimuli / reward / GetNeuroState)
    • network.step(&stimuli, &modulators)
    • Update RelayMetrics / dashboard
    • Sleep step_interval_ms

Runtime stack

Piece Crate / type
Async tokio
SNN neuromod::{SpikingNetwork, NeuroModulators}
GPU nvml-wrapper + nvidia-smi fallbacks
Metrics metrics + metrics-exporter-prometheus
Logging tracing / tracing-subscriber
CLI clap derive + env

Related


Last updated: July 29, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: e09cd4a (main) Devin DeepWiki: commit e09cd4a · thalamic-relay

Clone this wiki locally