Classic to AXI Migration Guide
FrontPanel Classic gives your design a fixed set of named endpoints: WireIn and WireOut, TriggerIn and TriggerOut, PipeIn and PipeOut, the addressable Register Bridge, and Block-Throttled Pipes. Moving to a FrontPanel AXI board changes only the design interface. FrontPanel AXI okHost replaces those named endpoints with three standard AXI interfaces that it presents to your logic.
The Core Conceptual Shift
In FrontPanel Classic, your design is built from a fixed set of predefined endpoint types. Each type has a fixed behavior and its own reserved address range, you instantiate up to 32 of each, and the host addresses them by endpoint.
FrontPanel AXI removes those predefined types. okHost presents three standard AXI interfaces, and you lay out the register map on AXI-Lite, the memory map on AXI-Full, and the stream or streams on AXI-Stream. The host reaches them with generic AXI reads and writes to the addresses you assign.
Because the design interface is now standard AXI, the whole AXI ecosystem is open to you, from interconnects and CSR generators to DDR and MIG controllers and third-party AXI IP.
Concept Mapping
Each Classic endpoint has a standard AXI equivalent that you build yourself.
| Classic Endpoint | What It Did | AXI Equivalent |
|---|---|---|
| WireIn | Host to FPGA control bits | Write-only AXI-Lite register |
| WireOut | FPGA to host status bits | Read-only AXI-Lite register |
| Register Bridge | Host and FPGA addressable 32-bit registers | AXI-Lite register space, or AXI-Full for a large memory map |
| TriggerIn | Host to FPGA one-shot | Write-only AXI-Lite register |
| TriggerOut | FPGA to host event | Read-only AXI-Lite register |
| PipeIn | Host to FPGA bulk | AXI-Stream m_axis, or an AXI-Full write |
| PipeOut | FPGA to host bulk | AXI-Stream s_axis, or an AXI-Full read |
| Block-Throttled Pipe | Throttled bulk | AXI-Stream with per-beat ready and valid |
The Wire and Trigger rows all become AXI-Lite registers, which you build following the CSR Recipe. For the Pipe rows, choose AXI-Stream for streaming data or AXI-Full for memory-mapped access; see okHost Core.
The Host Software
The migration also changes your host software. The FrontPanel API swaps the Classic endpoint methods for generic AXI reads and writes on the per-interface classes okCFrontPanelAXILite, okCFrontPanelAXIFull, and okCFrontPanelAXIStream. The full signatures are in the FrontPanel API reference.
| Classic Call | AXI Call |
|---|---|
SetWireInValue then UpdateWireIns | AXI-Lite Write(addr, value) |
UpdateWireOuts then GetWireOutValue | AXI-Lite Read(addr) |
ActivateTriggerIn | AXI-Lite Write(addr, mask) to the self-clearing register |
UpdateTriggerOuts then IsTriggered | AXI-Lite Read(addr) of the latch register, polled |
WriteToPipeIn | AXI-Stream Write, or AXI-Full Write |
ReadFromPipeOut | AXI-Stream Read, or AXI-Full Read |
WriteRegister and ReadRegister | AXI-Lite Write and Read, plus WriteBulk and ReadBulk |
The staged calls collapse. A Classic WireIn set-then-update,
dev.SetWireInValue(0x00, ctrl);
dev.UpdateWireIns();Code language: C++ (cpp)becomes a single AXI-Lite write:
axiLite.Write(CTRL_ADDR, ctrl);Code language: C++ (cpp)The CSR Recipe
The clearest way to see the whole conversion is our examples, which ship the Counters sample in both forms: the Classic Counters.v and its AXI rewrite counters_csr.v, a single AXI-Lite CSR block. Build your CSR the same way, by hand for a small map or with a generator for a larger one, under Building Your CSR.
Each Classic endpoint becomes one register pattern. The Counters sample implements all four.
| Classic Endpoint | Register Pattern | Counters Register |
|---|---|---|
| WireIn | A register the host writes | CTRL at 0x0000 |
| WireOut | A read-only register, value returned directly | COUNT1 at 0x0020 |
| TriggerIn | A write-only register; each written bit pulses for one clock cycle | TRIG_CTRL at 0x0040 |
| TriggerOut | A read-only register whose bits set on an event and clear when read | TRIG_STATUS at 0x0060 |
The two trigger patterns are the ones without a plain-register analog, so they are worth seeing in the gateware. A TriggerIn register clears to 0 every cycle by default. When an AXI-Lite write to the register is accepted, the case assignment overrides that default for one cycle, so each written bit pulses for a single clock:
// counters_csr.v: TriggerIn is a write-only register that pulses for one cycle
always @(posedge aclk) begin
trig_ctrl_reg <= 32'd0; // default: clear every cycle
if (/* an AXI-Lite write is accepted */) begin
case (s_axil_awaddr)
CSR_ADDR_TRIG_CTRL: trig_ctrl_reg <= s_axil_wdata; // the write overrides for one cycle
endcase
end
endCode language: Verilog (verilog)A TriggerOut register is the mirror. It accumulates each event bit by default, and when an AXI-Lite read of the register is accepted, the case returns those bits and clears them, so a polled read reports whether the event happened since the last read:
// counters_csr.v: TriggerOut holds each event until the host reads it
always @(posedge aclk) begin
trig_status_store <= trig_status_store | trig_status; // default: each event bit sticks
if (/* an AXI-Lite read is accepted */) begin
case (s_axil_araddr)
CSR_ADDR_TRIG_STATUS: begin
s_axil_rdata <= trig_status_store | trig_status; // return the bits
trig_status_store <= 32'd0; // the read clears them
end
endcase
end
endCode language: Verilog (verilog)The Pipe replacement, bulk data, takes two shapes in our PerfTest example. For memory-mapped access, an AXI-Full region maps the pattern space to 0x1000_0000 through 0x1FFF_FFFF. For streaming data, s_axis and m_axis carry the pattern to the stream checker and generator.
Migration Steps
With the mapping and the recipe in hand, a migration follows a fixed sequence.
- Pick an AXI board. Choose a FrontPanel AXI board and its bandwidth mode.
- Inventory your Classic design. List every Wire, Trigger, Pipe, and Block-Throttled Pipe with its role, direction, and width.
- Map each endpoint to AXI using the concept-mapping table.
- Copy the matching register pattern for each endpoint from The CSR Recipe and the Counters sample.
- Design the AXI side. Assemble the CSR block and your logic, and add an AXI interconnect if you have more than one Subordinate, under Interface Routing and AXI Libraries and IP.
- Instantiate and build. Bring okHost in place of the Classic okHost and build the bitstream, under Integrating okHost and Getting Started.
- Rework the host software to the FrontPanel API AXI calls.
- Verify in simulation with the okHost BFM, under Simulation, then on hardware.
See Also
- okHost Core: the AXI contract okHost presents, with its interfaces, behaviors, and per-interface specifics.
- System Design: interface routing, building your CSR, and the integration spine.
- Getting Started: get, build, and load a design.
- Simulation: verify against okHost with the BFM before hardware.
- FrontPanel API: the host-software side of the migration.
- FrontPanel Classic HDL: the endpoint model you are coming from.