IO Wrapper (gk_kernel.cpp) - 2023.1 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.1 English

The kernel is the HLS wrapper level which implements the pipelining and parallelization to allow high throughput. The kernel uses a dataflow methodology with streams to pass the data through the design.

The top level in and out ports are 512 bit wide, designed to match the whole DDR bus width and allowing vector access. In the case of float data type (4 bytes), sixteen parameters can be accessed from the bus in parallel. Each port is connected to its own AXI master with arbitration handled by the AXI switch and DDR controller under the hood.

These ports are interfaced via functions in bus_interface.hpp which convert between the wide bus and a template number of streams. Once input stream is formed, each stream is passed to a separate instance of the engine. The engine is wrapped inside bsm_stream_wrapper() which handles the stream processing. Here the initiation interval (II) and loop unrolling is controlled. One cfBSMEngine engine is instanced per stream allowing for parallel processing of multiple parameter sets. Additionally, the engines are in an II=1 loop, so that each engine can produce one price and its associated Greeks on each cycle.

This wrapper also handles the mapping between the Garman-Kohlhagen parameters (‘domestic interest rate’ and ‘foreign interest rate’) to the BSM parameters (‘risk free interest rate’ and ‘dividend yield’).