Legacy examples

These three examples are the worked material of the sequential (host-activated) flow, now under Legacy flows in the guide: one control-driven kernel – ap_ctrl_hs and an s_axilite register map – that a host launches and waits on, verified by a sequential C++ testbench (SeqTB) in Vitis C-simulation and C/RTL co-simulation. New designs use the system flow, which the examples before this group teach.


Table of contents

  • Register mapped simple function - The first end-to-end example: design, simulation, synthesis and RTL co-simulation of a standalone control-driven Vitis kernel, over the simplest AXI interface there is — an AXI-Lite register map. A host modelled as a SimObj drives the launch protocol (write the inputs, assert ap_start, wait for the interrupt, read the result), so a system simulation confirms the design works before any testbench exists, and the measured RTL cycles are compared back against the Python estimate.
  • Streaming polynomial - The command-response contract between a host and a streaming kernel, taught on a polynomial accelerator. Commands and their configuration travel on the input stream -- each DATA header carries its own coefficients -- responses on the output stream, and AXI-Lite carries only ap_start/ap_done and a halted/error/tx_id status. On an error the kernel closes its output burst with TLAST and returns; the host resets and starts again. Seven numbered rules, the reason for each, the alternatives and why they are worse, then the build: a pure bit-exact model, pysim, a hand-written C++ body behind a generated boundary, csim and cosim at 32 and 64 bits, all checked against expected responses computed from intent.
  • Histogram with shared memory - The payload moves off the control plane and into memory. A histogram accelerator takes three buffer addresses in its command, reads samples and bin edges and writes counts back over a single AXI4 memory-mapped master, while a stream still carries the command and the status response. The first example to exercise multiple distinct buffers at independent addresses, two element types over one bundle, and bounds checks that select a typed error status.