Adapting the Actor Model of Concurrency to Hybrid CPU/FPGA Architectures: FPGA Actors, CPU-FPGA Messaging over PCIe, and a Market-Data Handler Without a Decode Tail
A companion paper adapted the actor model to the CPU side of a high-frequency trading (HFT) system by introducing synchronous delivery (fast_send), actor groups, selectable mailboxes and a memory pool, and measured a live CME tick-to-book path built on the resulting framework. This paper extends the same modelacross the PCIe bus to a field-programmable gate array (FPGA). An FPGA actor is written in C++ in the same form as a CPU actor (private state, handlers, send and reply) and is compiled to a circuit by high-level synthesis (AMD Vitis HLS). Each process is implemented as a free-running hls::task; a send is a single write into a single-writer, single-reader hardware FIFO; and the actors of a group share one process, within which fast_send is an inline call thatthe build verifies cannot leave the group. Because a circuit has no run-time addresses, the framework stores no pointers: an actor reference is a port numberand an actor id, a handler's sends are written to a fixed outbox, and each actor type has a single instance in the design. When pipelined, a process acceptsa new message every clock cycle, and an actor-to-actor round trip on the card takes 5 cycles (20 ns at 250 MHz) in RTL co-simulation. Across PCIe, CPU actors and FPGA actors form a single system. A CPU actor holds an ordinary reference to a CPU-side stand-in for the FPGA actor; an FPGA actor holds a port and the CPU actor's id. Each message type is declared once and has a representation on each side, between which a codec converts. The two sides exchange 64-byte envelopes through single-writer, single-reader rings arranged so that each side only writes across the bus and only reads its own memory; the reader consumes a slot once the slot's sequence number, which is written last, appears. The mailbox of the receiving CPU thread polls the card's rings directly, so no routing thread is required, and neither side's handlers can distinguish a peer on the card from a peer on the CPU. We apply the framework to the CME MDP3 market-data handler. In a CPU implementation, the latency tail of the handler is a queueing tail: during a burst at the matching engine, packets arrive aboutone publisher period (approximately 7.5 µs) apart, and a handler whose time per packet exceeds that period accumulates a queue; a packet, moreover, is decoded only after it has been received in full, so its processing time grows with its length. In the proposed design, five actors on an AMD Alveo X3522PV decode, filter and pack each packet as its bytes arrive, and the CPU builds the books from 64-byte lines, most of which are applied while the packet is stillon the wire. In a clock-by-clock C++ model of the pipeline, run over all 30,044,560 packets of a CME session, the card's work after a packet's last byte never exceeded 8 clocks, for the longest and the shortest packets alike. From the pipeline depths reported by synthesis, the same work is estimated at about 25 clocks (roughly 100 ns); after place and route, the design meets 250 MHz on the card's device while using under 1% of it. Two proposed designs extend the framework beyond market data: iLink 3 order entry, with the encoding and TCP on the card and the session, sequence numbers and risk on the CPU; and a full hybrid trading system, in which both protocol endpoints are actors on the card, the books, strategy and risk checks remain actors on the CPU, and the same strategy runs unmodified in backtest, on the CPU alone, and with the card.
Authors
- Vincent Maciejewski
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-27
- DOI
- https://doi.org/10.5281/zenodo.24573047
- Primary Topic
- Embedded Systems Design Techniques
- Type
- preprint