CCLO_BFM Reference
-
class CCLO_BFM
Class providing a bus-functional model (at HLS Stream level) of the ACCL CCLO kernel.
Connects to the emulator/simulator.
Public Functions
-
CCLO_BFM(unsigned int zmqport, unsigned int local_rank, unsigned int world_size, const std::vector<unsigned int> &krnl_dest, hlslib::Stream<command_word> &callreq, hlslib::Stream<command_word> &callack, hlslib::Stream<stream_word> &data_cclo2krnl, hlslib::Stream<stream_word> &data_krnl2cclo, int target_ctrl_stream = 2)
Construct a new CCLO_BFM object.
- Parameters:
zmqport – Number of port which connects to the ACCL emulator/simulator
local_rank – ID of local rank
world_size – Total number of ranks
krnl_dest – A vector of CCLO data port destination IDs to which to subscribe
callreq – HLS Stream for call commands issued by HLS functions
callreq – HLS Stream for call responses to HLS functions
data_cclo2krnl – HLS Stream for data provided by the (emulated) CCLO to HLS functions
data_krnl2cclo – HLS Stream for data provided by the HLS functions to the (emulated) CCLO
target_ctrl_stream – Control stream to use inside emulator/simulator. Do not change.
-
void run()
Start BFM.
-
void stop()
Stop BFM.
-
CCLO_BFM(unsigned int zmqport, unsigned int local_rank, unsigned int world_size, const std::vector<unsigned int> &krnl_dest, hlslib::Stream<command_word> &callreq, hlslib::Stream<command_word> &callack, hlslib::Stream<stream_word> &data_cclo2krnl, hlslib::Stream<stream_word> &data_krnl2cclo, int target_ctrl_stream = 2)