cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
A library for some common functionalities: Network-Related Memory interaction Performance Counters. More...
#include <stdio.h>
#include <iostream>
#include <hls_stream.h>
#include "ap_int.h"
#include <stdint.h>
#include "../../../../../HOST/custom/memtest/languages/cplusplus/include/config.h"
#include "network.hpp"
Go to the source code of this file.
Functions | |
void | pPortAndDestionation (ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NodeId > &sDstNode_sig, ap_uint< 32 > *po_rx_ports) |
pPortAndDestionation - Setup the port and the destination rank. More... | |
void | pRXPath (stream< NetworkWord > &siSHL_This_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &sRxtoProc_Meta, stream< NetworkWord > &sRxpToProcp_Data, NetworkMetaStream meta_tmp, bool *start_stop, unsigned int *processed_word_rx, unsigned int *processed_bytes_rx) |
Receive Path - From SHELL to THIS. More... | |
void | pTXPath (stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &soNrc_meta, stream< NetworkWord > &sProcpToTxp_Data, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NodeId > &sDstNode_sig, unsigned int *processed_word_tx, ap_uint< 32 > *pi_rank) |
Transmit Path - From THIS to SHELL. More... | |
template<typename Tin , typename Tout , unsigned int arraysize> | |
void | pMyMemtestMemCpy (Tin *in, Tout *out) |
Copy a fixed compile time amount of data to another array. More... | |
template<typename Tin , typename Tout , const unsigned int arraysize> | |
void | pMemCpyCircularBuff (Tin *buff, Tout *out_mem, unsigned int elems, unsigned int offset_buff) |
Copy a run-time variable amount of data to another array employing the src as circular buffer i.e., handling overflow. More... | |
template<typename Tin , typename Tout , const unsigned int burstsize> | |
void | pReadAxiMemMapped2HlsStream (Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems) |
Copy a run-time variable amount of data to an hls stream with a given max. More... | |
template<typename Tin , typename Tout , const unsigned int burstsize, typename Tcntr > | |
void | pReadAxiMemMapped2HlsStreamCountFirst (Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems, hls::stream< Tcntr > &cmd) |
Copy a run-time variable amount of data to an hls stream with a given max it assumes also the initialization of a perf counter of "perfCounterMultipleCounts" function. More... | |
template<typename Tin , typename Tout , const unsigned int burstsize, typename Tcntr > | |
void | pReadAxiMemMapped2HlsStreamCountActivated (Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems, hls::stream< Tcntr > &cmd) |
Copy a run-time variable amount of data to an hls stream with a given max it assumes "perfCounterMultipleCounts" function already initialized so it just incr. More... | |
template<typename Tin , typename Tout , const unsigned int burstsize, typename Tcntr > | |
void | pReadAxiMemMapped2HlsStreamCountExtern (Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems, hls::stream< Tcntr > &cmd, bool activated) |
Copy a run-time variable amount of data to an hls stream with a given max it assumes "perfCounterMultipleCounts" function already initialized so it just incr. More... | |
template<typename Tin , typename Tout , unsigned int counter_precision = 64> | |
void | perfCounterProc (hls::stream< Tin > &cmd, hls::stream< Tout > &out, int direction, int burst_length, int nmbr_outstanding) |
template<typename Tin , typename Tout , unsigned int counter_precision = 64> | |
void | perfCounterProc2Mem (hls::stream< Tin > &cmd, Tout *out, int direction, int burst_length, int nmbr_outstanding) |
template<typename Tin , typename Tout , unsigned int counter_precision = 64> | |
void | perfCounterProc2MemCountOnly (hls::stream< Tin > &cmd, Tout *out) |
Count Clock Cycles between two events, the first event init the counter the second stop the count. More... | |
template<typename Tin , typename Tout , unsigned int counter_precision = 64> | |
void | perfCounterProc2MemCountIncremental (hls::stream< Tin > &cmd, Tout *out) |
Count Clock Cycles between two events, the first event init the counter the second stop the count and increment the out register TODO: seems not working at the csim lvl (never tested below) when executing single DUT step, hanging stream values. More... | |
template<typename Tin , typename Tout , unsigned int counter_precision = 64> | |
void | perfCounterMultipleCounts (hls::stream< Tin > &cmd, Tout *out) |
Count Clock Cycles between two events, the first event init the counter the second stop the count, a 0 after the init stop definitevely the counter. More... | |
template<typename Tevent = bool, const unsigned int counter_width = 32, const unsigned int maximum_counter_value_before_reset = 4000000> | |
void | pCountClockCycles (hls::stream< Tevent > &sOfEnableCCIncrement, hls::stream< Tevent > &sOfResetCounter, hls::stream< Tevent > &sOfGetTheCounter, hls::stream< ap_uint< counter_width > > &oSClockCounter) |
Count Clock Cycles between two events first sketch TODO: make it working without counting with the stream or reshaping as FSM. More... | |
Variables | |
const unsigned long int | max_counter_cc = 4000000 |
A library for some common functionalities: Network-Related Memory interaction Performance Counters.
Implementations of library example functionalities Network-Related for setting the cluster port destination receiving(RX) some commands (generally data) transmitting(TX) the test results back
Memory interaction pMyMemtestMemCpy --> memcpy reimplementation pMemCpyCircularBuff --> memcpy using a circular buffer (not optimized) pReadAxiMemMapped2HlsStream --> read data and write on stream pReadAxiMemMapped2HlsStreamCountFirst --> as before but with the activation of perf counter pReadAxiMemMapped2HlsStreamCountActivated --> as before but with perf counter activated pReadAxiMemMapped2HlsStreamCountExtern --> summary of two function before but with activation as input param
Performance Counters perfCounterProc --> original function from Xilinx for perf counters that takes INIT and STOP (any) perfCounterProc2Mem --> first iteration on the original function perfCounterProc2MemCountOnly --> trimming unsued stuffs perfCounterProc2MemCountIncremental --> as before but incrementing the output register not overwriting perfCounterMultipleCounts --> as before but with multiple activations possible: INIT;ANY(repeat);STOP(0) pCountClockCycles --> alternative implementations that does not behave correctly in hls
Definition in file memtest_library.hpp.