Cycle-accurate CGRA / wafer-scale accelerator simulator with a fast verification toolkit.
- Built on Akita v4 for timing-accurate simulation of CGRA tiles and interconnect.
- Driver + device builder to map kernels, feed/collect data, and configure memory topology.
verify/package: static lint + functional simulator + reporting (fast semantic verification before full simulation).- Reference kernels live in the
test/Zeonica_Testbenchsubmodule (AXPY, histogram, etc.).
- Go 1.24+ (see
go.modtoolchain). - Git with submodules enabled.
git clone https://github.com/sarchlab/zeonica.git
cd zeonica
git submodule update --init --recursive # brings in test/Zeonica_Testbench
go mod download- Library API:
programs := core.LoadProgramFileFromYAML("kernel.yaml")
arch := &verify.ArchInfo{Rows: 4, Columns: 4, Topology: "mesh", HopLatency: 1, MemCapacity: 1024}
verify.GenerateReport(programs, arch, 100).SaveReportToFile("report.txt")- CLI tools:
go run ./verify/cmd/verify-axpy # outputs verification_report.txt
go run ./verify/cmd/verify-histogram # outputs histogram_verification_report.txt- Verify package only:
go test ./verify -v - Full suite (longer):
go test ./...
core/— cycle-accurate CGRA core, instruction emulator, tracing utilities.cgra/— common CGRA data structures, ports, messages, device/tile interfaces.api/— driver that maps kernels, feeds/collects data, and runs the engine.config/— device builder, mesh wiring, and memory modes (simple/shared/local).verify/— lint + functional simulator + report generator; CLI underverify/cmd/.test/— regression tests and sample kernels;test/Zeonica_Testbenchis a submodule with YAML kernels.
- Tile/Core (
core/): Instruction emulator + cycle-accurate send/recv paths on Akita ports; traces dataflow/memory events. Opcodes implemented incore/emu.go, state incore/core.go. - CGRA device (
cgra/,config/): Mesh wiring of tiles; configurable memory mode (simple,shared,local) viaconfig.DeviceBuilder. Uses Akita direct connections and optional shared memory controllers. - Driver (
api/driver.go): Maps per-PE kernels, feeds inputs, collects outputs, and ticks the simulation engine. Supports preload/read of per-PE memory. - Verification fast path (
verify/): Static lint (STRUCT/TIMING) + functional simulator + report generator. Mirrors opcode semantics without timing/backpressure; CLIs inverify/cmd/. - Testbench (
test/Zeonica_Testbenchsubmodule): Reference kernels (AXPY, histogram, etc.) consumed by verify and simulation tests.
flowchart LR
Driver --> DeviceBuilder --> Device --> Cores --> AkitaEngine
Driver -->|Map programs| Cores
Driver -->|Feed/Collect| Cores
flowchart LR
KernelYAML -->|core.LoadProgramFileFromYAML| Programs
Programs -->|RunLint| Lint
Programs -->|FunctionalSim| FuncSim
Lint --> Report
FuncSim --> Report
- Author kernel YAML (per-PE programs) under
test/Zeonica_Testbench/kernel/.... - Lint + functional verify with
verify.GenerateReportor the CLI tools. - For timing-accurate runs, map programs via the driver/config packages and use Akita simulation (see tests under
test/for patterns).
- Submodule is required for the bundled kernels; re-run
git submodule update --init --recursiveafter pulling. - Opcode semantics are implemented in
core/emu.go;verifymirrors these for functional simulation. - If adding opcodes, update
core/emu.goandverify/funcsim.go, plus unit tests inverify/.
See LICENSE for details.