High-Level Synthesis — C/C++ algorithm analysis, HLS directive optimisation, synthesis execution, and co-simulation verification. Use when converting C/C++ to synthesisable RTL, optimising for latency/throughput/area targets using pragmas, or verifying that generated RTL matches the golden C model.
digital-chip-design-agents:hls-orchestrator agent and pass the full user
request and any available context. Do not execute stages directly.hls-orchestrator mid-flow: do not spawn a new agent.
Treat this file as read-only — return the requested stage rules, sign-off
criteria, or loop-back guidance to the calling orchestrator.Spawning the orchestrator from within an active orchestrator run causes recursive delegation and must never happen.
Convert C/C++/SystemC algorithmic descriptions to synthesisable RTL. Covers algorithm analysis for HLS compatibility, pragma/directive optimisation, and co-simulation to verify RTL matches the golden C model.
bambu) — open-source HLS from Politecnico di Milanocirct-opt) — compiler infrastructure for hardware designvitis_hls) — C/C++ to RTL for AMD/Xilinx devicesstratus) — SystemC/C++ HLS for ASIC and FPGAcatapult) — algorithmic synthesis from C++/SystemCrestrict keyword or restructure accesses#ifndef __SYNTHESIS__ap_fixed<W,I> for Vitis HLS)#pragma HLS PIPELINE II=1 // Pipeline loop, target II=1
#pragma HLS DATAFLOW // Task-level pipelining
#pragma HLS LOOP_FLATTEN // Flatten nested loops
#pragma HLS LOOP_MERGE // Merge sequential loops
#pragma HLS UNROLL factor=4 // Partial unroll (4 parallel copies)
#pragma HLS UNROLL // Full unroll (small trip counts only)
#pragma HLS ARRAY_PARTITION variable=buf cyclic factor=4
#pragma HLS INTERFACE mode=axis port=data // AXI4-Stream
#pragma HLS INTERFACE mode=m_axi port=mem // AXI4 master
#pragma HLS INTERFACE mode=s_axilite port=ctrl // AXI4-Lite registers
#pragma HLS BIND_OP op=mul impl=dsp // Force multiply to DSP
#pragma HLS ALLOCATION operation=mul limit=4 // Cap DSP count
| Target | Primary Directives |
|---|---|
| Low latency | UNROLL + PIPELINE II=1 |
| High throughput | PIPELINE + DATAFLOW + ARRAY_PARTITION |
| Low area | ALLOCATION limits + no UNROLL |
| Balanced | PIPELINE II=1 inner loop + ARRAY_PARTITION |
| Failure | Fix |
|---|---|
| Output mismatch | Check fixed-point overflow; increase bit widths |
| AXI handshake error | Fix INTERFACE pragma configuration |
| Latency differs | Verify loop bounds are static |
| X propagation | Initialise all variables in C source |
After each stage completes (regardless of whether an orchestrator session is active),
write or overwrite one JSON record in memory/hls/experiences.jsonl keyed by
run_id. This ensures data is persisted even if the flow is interrupted or called
without full orchestrator context.
Use run_id = hls_<YYYYMMDD>_<HHMMSS> (set once at flow start; reuse on each
stage update). Every JSON record written must include a top-level "run_id" field
whose value matches this key — this is what makes overwrites unambiguous. Set
signoff_achieved: false until the final sign-off stage completes.