cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
This is a subgroup of Memtest accelerated function with only synthesizable (HLS) functions/classes. More...
Files | |
file | memtest.hpp |
The Role for a Memtest Example application (UDP or TCP) | |
file | memtest_library.hpp |
A library for some common functionalities: Network-Related Memory interaction Performance Counters. | |
file | memtest_pattern_library.hpp |
A library for memory test functionalities: sequence generation, reading, writing. | |
file | memtest_processing.hpp |
The processing template for the memory test. | |
file | memtest.cpp |
The Role for a Memtest Example application (UDP or TCP) | |
Typedefs | |
typedef ap_uint< 512 > | membus_512_t |
typedef membus_512_t | membus_t |
typedef ap_uint< 512 > | local_mem_word_t |
typedef ap_uint< 40 > | local_mem_addr_t |
typedef ap_uint< 40 > | local_mem_addr_non_byteaddressable_t |
Enumerations | |
enum | EchoCtrl { ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_STORE_FWD = 0 , ECHO_PATH_THRU = 1 , ECHO_CTRL_DISABLED = 0 , ECHO_PATH_THRU = 1 , ECHO_STORE_FWD = 2 , ECHO_OFF = 3 } |
enum | MemTestCmd { TEST_BURSTSIZE_CMD = 4 , TEST_ENDOFTESTS_CMD = 3 , TEST_STOP_CMD = 2 , TEST_START_CMD = 1 , TEST_INVLD_CMD = 0 , WRPTX_IMG_CMD = 2 , WRPTX_TXMAT_CMD = 1 , WRPTX_INVLD_CMD = 0 } |
Functions | |
void | memtest (ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NetworkWord > &siSHL_This_Data, stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &soNrc_meta, ap_uint< 32 > *po_rx_ports, membus_t *lcl_mem0, membus_t *lcl_mem1) |
Main process of the Memtest Application directives. More... | |
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... | |
template<typename Tin , typename Tout > | |
Tout | genNextFibonacciNumber (Tin curr, Tin prev) |
template<typename ADDR_T , unsigned int sequenceDim, typename BIGWORD_T , typename SMALLWORD_T , unsigned int smallWordDim> | |
void | genFibonacciNumbers (ADDR_T curr, BIGWORD_T *outBigWord) |
template<typename ADDR_T , unsigned int sequenceDim, typename BIGWORD_T , typename SMALLWORD_T , unsigned int smallWordDim> | |
void | genXoredSequentialNumbers (ADDR_T curr, BIGWORD_T *outBigWord) |
template<typename ADDR_T , unsigned int sequenceDim, typename BIGWORD_T , typename SMALLWORD_T , unsigned int smallWordDim> | |
void | genXoredSequentialNumbersSecondVersion (ADDR_T curr, BIGWORD_T *outBigWord) |
template<typename ADDR_T , typename BIGWORD_T > | |
void | genXoredNumbersSingleWord (ADDR_T curr, BIGWORD_T *outBigWord) |
template<typename ADDR_T , typename BIGWORD_T > | |
void | genSequentialNumbers (ADDR_T curr, BIGWORD_T *outBigWord) |
template<const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 16> | |
void | pWRGenerateData2WriteOnStream (hls::stream< local_mem_word_t > &sOutGeneratedData, ap_uint< 32 > *testCounter, local_mem_addr_t max_addr_ut) |
A function that generate a streams of data according to function and writes them on a stream CHECK: FAULT_INJECTION define insert after the third test some faults. More... | |
template<typename Tcntr , const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 64*2> | |
void | pWRStream2WriteMainMemory (hls::stream< Tcntr > &sOutCmd, hls::stream< local_mem_word_t > &sInGeneratedData, membus_t *lcl_mem, local_mem_addr_t max_addr_ut, unsigned int burst_size) |
A function that read a stream of data and write them in a run-time variable burst-size. More... | |
template<typename Tcntr , const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 64*2> | |
void | pWriteSimplerTestMemTest (hls::stream< Tcntr > &sOutCmd, membus_t *lcl_mem, local_mem_addr_t max_addr_ut, unsigned int burst_size) |
Simple version of a write memtest that write up to a given maximum address No control on the burst size or on the first faulty address. More... | |
template<typename Tcntr , const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 64*2> | |
void | pReadSimplerTestMemTest (hls::stream< Tcntr > &sOutCmd, membus_t *lcl_mem, local_mem_addr_t max_addr_ut, unsigned int burst_size, ap_uint< 32 > *faulty_addresses_cntr, local_mem_addr_t *first_faulty_address) |
Simple version of a read memtest that read up to a given maximum address No control on the burst size or on the first faulty address. More... | |
template<typename Tcntr , const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 64*2> | |
void | pRDRead2StreamDataVariableBurstNoMemCpy (hls::stream< Tcntr > &sOutCmd, hls::stream< local_mem_word_t > &sOutReadData, membus_t *lcl_mem, local_mem_addr_t max_addr_ut, unsigned int burst_size) |
Read a variable burst_size amount of data and output on a stream and count the cc needed just 4 transfer but without using memcpy. More... | |
template<const unsigned int max_iterations = 4000000> | |
void | pRDReadDataStreamAndProduceGold (hls::stream< local_mem_word_t > &sInReadData, local_mem_addr_t max_addr_ut, hls::stream< local_mem_word_t > &sOutReadData, hls::stream< local_mem_word_t > &sOutGoldData) |
Read a data stream and produce the gold expected value. More... | |
template<const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 16> | |
void | pRDCmpStreamsCntWordAligned (local_mem_addr_t max_addr_ut, hls::stream< local_mem_word_t > &sInReadData, hls::stream< local_mem_word_t > &sInGoldData, ap_uint< 32 > *faulty_addresses_cntr, local_mem_addr_t *first_faulty_address) |
Read two streams, compare them and output the number of faults and the first faulty address. More... | |
template<const unsigned int max_iterations = 4000000, const unsigned int unrolling_factor = ( 512 /8), const unsigned int buff_dim = 16> | |
void | pRDCompareDataStreamsCount (local_mem_addr_t max_addr_ut, hls::stream< local_mem_word_t > &sInReadData, hls::stream< local_mem_word_t > &sInGoldData, ap_uint< 32 > *faulty_addresses_cntr, local_mem_addr_t *first_faulty_address) |
Read two streams, compare them and output the number of faults and the first faulty address, but check every single byte NOT USED. More... | |
template<typename Tcntr , const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 64*2> | |
void | pRDMainMemoryRead2StreamData (hls::stream< Tcntr > &sOutCmd, hls::stream< local_mem_word_t > &sOutreadData, membus_t *lcl_mem, local_mem_addr_t max_addr_ut, unsigned int burst_size) |
Read a single word of data and output on a stream and count the cc needed just 4 transfer NOT USED. More... | |
template<typename Tcntr , const unsigned int max_iterations = 4000000, const unsigned int buff_dim = 64*2> | |
void | pRDRead2StreamDataVariableBurst (hls::stream< Tcntr > &sOutCmd, hls::stream< local_mem_word_t > &sOutreadData, membus_t *lcl_mem, local_mem_addr_t max_addr_ut, unsigned int burst_size) |
Read a variable burst_size amount of data and output on a stream and count the cc needed just 4 transfer THIS FUNCTION SUFFER FIFO OVERFLOW 4 transfer different from power of 2 numbers NOT USED. More... | |
template<const unsigned int maximum_number_of_beats = 512> | |
void | pWriteDataflowMemTest (membus_t *lcl_mem0, local_mem_addr_t max_address_under_test, ap_uint< 64 > *writing_cntr, ap_uint< 32 > *testCounter, unsigned int burst_size) |
template<const unsigned int maximum_number_of_beats = 512> | |
void | pReadDataflowMemTest (membus_t *lcl_mem1, local_mem_addr_t max_address_under_test, ap_uint< 64 > *reading_cntr, ap_uint< 32 > *faulty_addresses_cntr, local_mem_addr_t *first_faulty_address, unsigned int burst_size) |
template<const unsigned int counter_width = 64> | |
void | pTHISProcessingData (stream< NetworkWord > &sRxpToProcp_Data, stream< NetworkWord > &sProcpToTxp_Data, stream< NetworkMetaStream > &sRxtoProc_Meta, stream< NetworkMetaStream > &sProctoTx_Meta, bool *start_stop) |
THIS processing the data once recieved a start command Template function for custom processing. More... | |
Variables | |
const unsigned long int | max_counter_cc = 4000000 |
const unsigned int | top_param_maximum_number_of_beats = 4096 |
This is a subgroup of Memtest accelerated function with only synthesizable (HLS) functions/classes.
#define CYCLES_UNTIL_TIMEOUT 0x0100 |
Definition at line 96 of file memtest.hpp.
#define Data_t_in ap_axiu<INPUT_PTR_WIDTH, 0, 0, 0> |
Definition at line 29 of file memtest.cpp.
#define Data_t_out ap_axiu<OUTPUT_PTR_WIDTH, 0, 0, 0> |
Definition at line 30 of file memtest.cpp.
#define DDR_LATENCY 52 |
Definition at line 98 of file memtest.hpp.
#define DEFAULT_RX_PORT 2718 |
Definition at line 83 of file memtest.hpp.
#define DEFAULT_TX_PORT 2718 |
Definition at line 82 of file memtest.hpp.
#define ENABLE_DDR |
Definition at line 42 of file memtest.hpp.
#define EXTRA_DDR_LATENCY_DUE_II (64 + 8) |
Definition at line 99 of file memtest.hpp.
#define FAULT_INJECTION |
Definition at line 35 of file memtest_processing.hpp.
#define FSM_DONE 1 |
Definition at line 79 of file memtest.hpp.
#define FSM_PROCESSING_BURST_READING 4 |
Definition at line 42 of file memtest_processing.hpp.
#define FSM_PROCESSING_CONTINUOUS_RUN 12 |
Definition at line 50 of file memtest_processing.hpp.
#define FSM_PROCESSING_DATAFLOW_READ 6 |
Definition at line 44 of file memtest_processing.hpp.
#define FSM_PROCESSING_DATAFLOW_WRITE 5 |
Definition at line 43 of file memtest_processing.hpp.
#define FSM_PROCESSING_OUTPUT 7 |
Definition at line 45 of file memtest_processing.hpp.
#define FSM_PROCESSING_OUTPUT_2 8 |
Definition at line 46 of file memtest_processing.hpp.
#define FSM_PROCESSING_OUTPUT_3 9 |
Definition at line 47 of file memtest_processing.hpp.
#define FSM_PROCESSING_OUTPUT_4 10 |
Definition at line 48 of file memtest_processing.hpp.
#define FSM_PROCESSING_OUTPUT_5 11 |
Definition at line 49 of file memtest_processing.hpp.
#define FSM_PROCESSING_PCKT_PROC 1 |
Definition at line 39 of file memtest_processing.hpp.
#define FSM_PROCESSING_START 3 |
Definition at line 41 of file memtest_processing.hpp.
#define FSM_PROCESSING_STOP 2 |
Definition at line 40 of file memtest_processing.hpp.
#define FSM_PROCESSING_WAIT_FOR_DDR_CONTROLLER_EMPTYNESS 13 |
Definition at line 51 of file memtest_processing.hpp.
#define FSM_PROCESSING_WAIT_FOR_META 0 |
Definition at line 38 of file memtest_processing.hpp.
#define FSM_WRITE_NEW_DATA 0 |
Definition at line 78 of file memtest.hpp.
#define LOCAL_MEM_ADDR_OFFSET (LOCAL_MEM_WORD_SIZE/8) |
Definition at line 48 of file memtest_pattern_library.hpp.
#define LOCAL_MEM_ADDR_SIZE 40 |
Definition at line 42 of file memtest_pattern_library.hpp.
#define LOCAL_MEM_ADDR_SIZE_NON_BYTE_ADDRESSABLE 40 |
Definition at line 46 of file memtest_pattern_library.hpp.
#define LOCAL_MEM_WORD_BYTE_SIZE (LOCAL_MEM_WORD_SIZE/8) |
Definition at line 49 of file memtest_pattern_library.hpp.
#define LOCAL_MEM_WORD_SIZE 512 |
Definition at line 41 of file memtest_pattern_library.hpp.
#define MEMDW_512 512 |
Definition at line 90 of file memtest.hpp.
#define MEMTEST_ADDRESS_BITWIDTH 40 |
Definition at line 56 of file memtest_processing.hpp.
#define MEMTEST_ADDRESS_HIGH_BIT NETWORK_WORD_BIT_WIDTH-1 |
Definition at line 60 of file memtest_processing.hpp.
#define MEMTEST_ADDRESS_LOW_BIT NETWORK_WORD_BIT_WIDTH-MEMTEST_ADDRESS_BITWIDTH |
Definition at line 61 of file memtest_processing.hpp.
#define MEMTEST_BURST_BITWIDTH 16 |
Definition at line 58 of file memtest_processing.hpp.
#define MEMTEST_BURST_HIGH_BIT MEMTEST_BURST_BITWIDTH-1+MEMTEST_COMMANDS_BITWIDTH |
Definition at line 66 of file memtest_processing.hpp.
#define MEMTEST_BURST_LOW_BIT MEMTEST_BURST_HIGH_BIT+1-MEMTEST_BURST_BITWIDTH |
Definition at line 67 of file memtest_processing.hpp.
#define MEMTEST_COMMANDS_BITWIDTH 8 |
Definition at line 69 of file memtest.hpp.
#define MEMTEST_COMMANDS_HIGH_BIT MEMTEST_COMMANDS_BITWIDTH-1 |
Definition at line 67 of file memtest.hpp.
#define MEMTEST_COMMANDS_LOW_BIT 0 |
Definition at line 68 of file memtest.hpp.
#define MEMTEST_ITERATION_BITWIDTH 16 |
Definition at line 57 of file memtest_processing.hpp.
#define MEMTEST_ITERATIONS_HIGH_BIT MEMTEST_ADDRESS_LOW_BIT-1 |
Definition at line 63 of file memtest_processing.hpp.
#define MEMTEST_ITERATIONS_LOW_BIT MEMTEST_ITERATIONS_HIGH_BIT+1-MEMTEST_ITERATION_BITWIDTH |
Definition at line 64 of file memtest_processing.hpp.
#define MEMTEST_RETURN_RESULTS 3 |
Definition at line 74 of file memtest.hpp.
#define PacketFsmType uint8_t |
Definition at line 76 of file memtest.hpp.
#define PortFsmType uint8_t |
Definition at line 80 of file memtest.hpp.
#define PROCESSING_PACKET 2 |
Definition at line 73 of file memtest.hpp.
#define ProcessingFsmType uint8_t |
Definition at line 52 of file memtest_processing.hpp.
#define ROLE_IS_MEMTEST |
Definition at line 44 of file memtest.hpp.
#define TOTMEMDW_512 16384 |
Definition at line 93 of file memtest.hpp.
#define TYPICAL_DDR_LATENCY 4 |
Definition at line 97 of file memtest.hpp.
#define WAIT_FOR_META 0 |
Definition at line 71 of file memtest.hpp.
#define WAIT_FOR_STREAM_PAIR 1 |
Definition at line 72 of file memtest.hpp.
typedef ap_uint< 40 > local_mem_addr_non_byteaddressable_t |
Definition at line 47 of file memtest_pattern_library.hpp.
typedef ap_uint< 40 > local_mem_addr_t |
Definition at line 45 of file memtest_pattern_library.hpp.
typedef ap_uint< 512 > local_mem_word_t |
Definition at line 44 of file memtest_pattern_library.hpp.
typedef ap_uint< 512 > membus_512_t |
Definition at line 91 of file memtest.hpp.
typedef membus_512_t membus_t |
Definition at line 92 of file memtest.hpp.
enum EchoCtrl |
SHELL/MMIO/EchoCtrl - Config Register
Definition at line 49 of file memtest.hpp.
enum MemTestCmd |
Internal MemTest accelerator command
Enumerator | |
---|---|
TEST_BURSTSIZE_CMD | |
TEST_ENDOFTESTS_CMD | |
TEST_STOP_CMD | |
TEST_START_CMD | |
TEST_INVLD_CMD | |
WRPTX_IMG_CMD | |
WRPTX_TXMAT_CMD | |
WRPTX_INVLD_CMD |
Definition at line 58 of file memtest.hpp.
void genFibonacciNumbers | ( | ADDR_T | curr, |
BIGWORD_T * | outBigWord | ||
) |
Definition at line 65 of file memtest_pattern_library.hpp.
Tout genNextFibonacciNumber | ( | Tin | curr, |
Tin | prev | ||
) |
Functions for generating (pseudo)random sequences or for pattern generation
Definition at line 59 of file memtest_pattern_library.hpp.
void genSequentialNumbers | ( | ADDR_T | curr, |
BIGWORD_T * | outBigWord | ||
) |
Definition at line 139 of file memtest_pattern_library.hpp.
void genXoredNumbersSingleWord | ( | ADDR_T | curr, |
BIGWORD_T * | outBigWord | ||
) |
Definition at line 130 of file memtest_pattern_library.hpp.
void genXoredSequentialNumbers | ( | ADDR_T | curr, |
BIGWORD_T * | outBigWord | ||
) |
Definition at line 89 of file memtest_pattern_library.hpp.
void genXoredSequentialNumbersSecondVersion | ( | ADDR_T | curr, |
BIGWORD_T * | outBigWord | ||
) |
Definition at line 111 of file memtest_pattern_library.hpp.
void memtest | ( | ap_uint< 32 > * | pi_rank, |
ap_uint< 32 > * | pi_size, | ||
stream< NetworkWord > & | siSHL_This_Data, | ||
stream< NetworkWord > & | soTHIS_Shl_Data, | ||
stream< NetworkMetaStream > & | siNrc_meta, | ||
stream< NetworkMetaStream > & | soNrc_meta, | ||
ap_uint< 32 > * | po_rx_ports, | ||
membus_t * | lcl_mem0, | ||
membus_t * | lcl_mem1 | ||
) |
Main process of the Memtest Application directives.
Definition at line 39 of file memtest.cpp.
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.
[in] | sOfEnableCCIncrement | |
[in] | sOfResetCounter | |
[in] | sOfGetTheCounter | |
[in] | oSClockCounter | |
[in] | Tevent | the event datatype |
[in] | counter_width | the counter precision |
[in] | maximum_counter_value_before_reset | the maxmimum amount of cc count before auto reset |
Definition at line 730 of file memtest_library.hpp.
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.
[in] | cmd | the performance counter cmd stream, first is init second stop(0)/continue(everything else) |
[out] | out | the output register of where store the incremental counter value |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | counter_precision | the maxmimum amount of data |
Definition at line 683 of file memtest_library.hpp.
void perfCounterProc | ( | hls::stream< Tin > & | cmd, |
hls::stream< Tout > & | out, | ||
int | direction, | ||
int | burst_length, | ||
int | nmbr_outstanding | ||
) |
Definition at line 546 of file memtest_library.hpp.
void perfCounterProc2Mem | ( | hls::stream< Tin > & | cmd, |
Tout * | out, | ||
int | direction, | ||
int | burst_length, | ||
int | nmbr_outstanding | ||
) |
Definition at line 581 of file memtest_library.hpp.
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.
[in] | cmd | the performance counter cmd stream, first is init second stop |
[out] | out | the output register of where increment the counter value |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | counter_precision | the maxmimum amount of data |
Definition at line 651 of file memtest_library.hpp.
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.
[in] | cmd | the performance counter cmd stream, first is init second stop |
[out] | out | the output register of where store the counter value |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | counter_precision | the maxmimum amount of data |
Definition at line 615 of file memtest_library.hpp.
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.
[out] | out_mem | the dst ptr |
[in] | buff | the src ptr, or the circular buffer |
[in] | elems | the current amount of data to tx |
[in] | offset_buff | the initial offest in the circular buffer |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | arraysize | the maxmimum amount of data |
Definition at line 398 of file memtest_library.hpp.
void pMyMemtestMemCpy | ( | Tin * | in, |
Tout * | out | ||
) |
Copy a fixed compile time amount of data to another array.
[out] | out | the dst ptr |
[in] | in | the src ptr |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | arraysize | the fixed amount of data |
Definition at line 373 of file memtest_library.hpp.
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.
[in] | pi_rank | |
[in] | pi_size | |
[out] | sDstNode_sig | |
[out] | po_rx_ports |
Definition at line 71 of file memtest_library.hpp.
void pRDCmpStreamsCntWordAligned | ( | local_mem_addr_t | max_addr_ut, |
hls::stream< local_mem_word_t > & | sInReadData, | ||
hls::stream< local_mem_word_t > & | sInGoldData, | ||
ap_uint< 32 > * | faulty_addresses_cntr, | ||
local_mem_addr_t * | first_faulty_address | ||
) |
Read two streams, compare them and output the number of faults and the first faulty address.
[in] | max_addr_ut | the maximum address to test |
[in] | sInReadData | the read data stream |
[in] | sInGoldData | the gold data stream |
[out] | faulty_addresses_cntr | the fault cntr ptr |
[out] | first_faulty_address | the first fault address ptr |
Definition at line 601 of file memtest_pattern_library.hpp.
void pRDCompareDataStreamsCount | ( | local_mem_addr_t | max_addr_ut, |
hls::stream< local_mem_word_t > & | sInReadData, | ||
hls::stream< local_mem_word_t > & | sInGoldData, | ||
ap_uint< 32 > * | faulty_addresses_cntr, | ||
local_mem_addr_t * | first_faulty_address | ||
) |
Read two streams, compare them and output the number of faults and the first faulty address, but check every single byte NOT USED.
[in] | max_addr_ut | the maximum address to test |
[in] | sInReadData | the read data stream |
[in] | sInGoldData | the gold data stream |
[out] | faulty_addresses_cntr | the fault cntr ptr |
[out] | first_faulty_address | the first fault address ptr |
Definition at line 688 of file memtest_pattern_library.hpp.
void pRDMainMemoryRead2StreamData | ( | hls::stream< Tcntr > & | sOutCmd, |
hls::stream< local_mem_word_t > & | sOutreadData, | ||
membus_t * | lcl_mem, | ||
local_mem_addr_t | max_addr_ut, | ||
unsigned int | burst_size | ||
) |
Read a single word of data and output on a stream and count the cc needed just 4 transfer
NOT USED.
[out] | sOutCmd | the perf counter cmd stream |
[out] | sOutreadData | the read data stream |
[in] | lcl_mem | the virtual memory mapped pointer |
[in] | max_addr_ut | the maximum address to test |
[in] | burst_size | the run-time variable burst size |
Definition at line 795 of file memtest_pattern_library.hpp.
void pRDRead2StreamDataVariableBurst | ( | hls::stream< Tcntr > & | sOutCmd, |
hls::stream< local_mem_word_t > & | sOutreadData, | ||
membus_t * | lcl_mem, | ||
local_mem_addr_t | max_addr_ut, | ||
unsigned int | burst_size | ||
) |
Read a variable burst_size amount of data and output on a stream and count the cc needed just 4 transfer
THIS FUNCTION SUFFER FIFO OVERFLOW 4 transfer different from power of 2 numbers NOT USED.
[out] | sOutCmd | the perf counter cmd stream |
[out] | sOutreadData | the read data stream |
[in] | lcl_mem | the virtual memory mapped pointer |
[in] | max_addr_ut | the maximum address to test |
[in] | burst_size | the run-time variable burst size |
Definition at line 892 of file memtest_pattern_library.hpp.
void pRDRead2StreamDataVariableBurstNoMemCpy | ( | hls::stream< Tcntr > & | sOutCmd, |
hls::stream< local_mem_word_t > & | sOutReadData, | ||
membus_t * | lcl_mem, | ||
local_mem_addr_t | max_addr_ut, | ||
unsigned int | burst_size | ||
) |
Read a variable burst_size amount of data and output on a stream and count the cc needed just 4 transfer but without using memcpy.
[out] | sOutCmd | the perf counter cmd stream |
[out] | sOutReadData | the read data stream |
[in] | lcl_mem | the virtual memory mapped pointer |
[in] | max_addr_ut | the maximum address to test |
[in] | burst_size | the run-time variable burst size |
Definition at line 434 of file memtest_pattern_library.hpp.
void pRDReadDataStreamAndProduceGold | ( | hls::stream< local_mem_word_t > & | sInReadData, |
local_mem_addr_t | max_addr_ut, | ||
hls::stream< local_mem_word_t > & | sOutReadData, | ||
hls::stream< local_mem_word_t > & | sOutGoldData | ||
) |
Read a data stream and produce the gold expected value.
[in] | sInReadData | the input read data stream |
[in] | max_addr_ut | the maximum address to test |
[in] | sOutReadData | the copy of the input data stream |
[in] | sOutGoldData | the golden expected value stream |
Definition at line 554 of file memtest_pattern_library.hpp.
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.
[out] | main_mem | the src ptr to read |
[in] | sOut | the dst hls stream |
[in] | elems | the current amount of data to tx |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | burstsize | the maxmimum amount of data |
Definition at line 432 of file memtest_library.hpp.
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.
[out] | main_mem | the src ptr to read |
[in] | sOut | the dst hls stream |
[in] | elems | the current amount of data to tx |
[in] | cmd | the performance counter cmd stream |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | burstsize | the maxmimum amount of data |
[in] | Tcntr | the cmd perf counter datatype |
Definition at line 491 of file memtest_library.hpp.
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.
[out] | main_mem | the src ptr to read |
[in] | sOut | the dst hls stream |
[in] | elems | the current amount of data to tx |
[in] | cmd | the performance counter cmd stream |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | burstsize | the maxmimum amount of data |
[in] | Tcntr | the cmd perf counter datatype |
Definition at line 520 of file memtest_library.hpp.
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.
[out] | main_mem | the src ptr to read |
[in] | sOut | the dst hls stream |
[in] | elems | the current amount of data to tx |
[in] | cmd | the performance counter cmd stream |
[in] | Tin | the input datatype |
[in] | Tout | the output datatype |
[in] | burstsize | the maxmimum amount of data |
[in] | Tcntr | the cmd perf counter datatype |
Definition at line 461 of file memtest_library.hpp.
void pReadDataflowMemTest | ( | membus_t * | lcl_mem1, |
local_mem_addr_t | max_address_under_test, | ||
ap_uint< 64 > * | reading_cntr, | ||
ap_uint< 32 > * | faulty_addresses_cntr, | ||
local_mem_addr_t * | first_faulty_address, | ||
unsigned int | burst_size | ||
) |
Definition at line 107 of file memtest_processing.hpp.
void pReadSimplerTestMemTest | ( | hls::stream< Tcntr > & | sOutCmd, |
membus_t * | lcl_mem, | ||
local_mem_addr_t | max_addr_ut, | ||
unsigned int | burst_size, | ||
ap_uint< 32 > * | faulty_addresses_cntr, | ||
local_mem_addr_t * | first_faulty_address | ||
) |
Simple version of a read memtest that read up to a given maximum address No control on the burst size or on the first faulty address.
[out] | sOutCmd | the perf counter cmd stream |
[in] | lcl_mem | the virtual memory mapped pointer |
[in] | max_addr_ut | the maximum address to test |
[in] | burst_size | the run-time variable burst size NOT MEANINGFUL HERE |
[out] | faulty_addresses_cntr | the fault cntr |
[out] | first_faulty_address | the fairst faulty address NOT MEANINGFUL HERE |
Definition at line 390 of file memtest_pattern_library.hpp.
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.
[in] | siSHL_This_Data | |
[in] | siNrc_meta | |
[out] | sRxtoTx_Meta | |
[out] | sRxpToProcp_Data | |
[out] | start_stop | |
[out] | meta_tmp | |
[out] | processed_word |
Definition at line 121 of file memtest_library.hpp.
void pTHISProcessingData | ( | stream< NetworkWord > & | sRxpToProcp_Data, |
stream< NetworkWord > & | sProcpToTxp_Data, | ||
stream< NetworkMetaStream > & | sRxtoProc_Meta, | ||
stream< NetworkMetaStream > & | sProctoTx_Meta, | ||
bool * | start_stop | ||
) |
THIS processing the data once recieved a start command Template function for custom processing.
[in] | sRxpToProcp_Data | stream of data from rx to proc interface |
[out] | sProcpToTxp_Data | stream of data from proc to tx interface |
[in] | start_stop | start and stop command |
[in] | lcl_mem0 | shell-role mp1 memory mapped interfce virtual ptr 0 |
[in] | lcl_mem1 | shell-role mp1 memory mapped interfce virtual ptr 1 |
Definition at line 191 of file memtest_processing.hpp.
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.
[out] | soTHIS_Shl_Data | |
[out] | soNrc_meta | |
[in] | sProcpToTxp_Data | |
[in] | sRxtoTx_Meta | |
[in] | pi_rank | |
[in] | sDstNode_sig |
Definition at line 251 of file memtest_library.hpp.
void pWRGenerateData2WriteOnStream | ( | hls::stream< local_mem_word_t > & | sOutGeneratedData, |
ap_uint< 32 > * | testCounter, | ||
local_mem_addr_t | max_addr_ut | ||
) |
A function that generate a streams of data according to function and writes them on a stream CHECK: FAULT_INJECTION define insert after the third test some faults.
[out] | sOutGeneratedData | the output stream for deta generation |
[in] | max_addr_ut | the maximum address to test |
[in] | testCounter | the current times of re-executing this test |
Definition at line 164 of file memtest_pattern_library.hpp.
void pWriteDataflowMemTest | ( | membus_t * | lcl_mem0, |
local_mem_addr_t | max_address_under_test, | ||
ap_uint< 64 > * | writing_cntr, | ||
ap_uint< 32 > * | testCounter, | ||
unsigned int | burst_size | ||
) |
Definition at line 76 of file memtest_processing.hpp.
void pWriteSimplerTestMemTest | ( | hls::stream< Tcntr > & | sOutCmd, |
membus_t * | lcl_mem, | ||
local_mem_addr_t | max_addr_ut, | ||
unsigned int | burst_size | ||
) |
Simple version of a write memtest that write up to a given maximum address No control on the burst size or on the first faulty address.
[out] | sOutCmd | the perf counter cmd stream |
[in] | lcl_mem | the virtual memory mapped pointer |
[in] | max_addr_ut | the maximum address to test |
[in] | burst_size | the run-time variable burst size NOT MEANINGFUL HERE |
Definition at line 343 of file memtest_pattern_library.hpp.
void pWRStream2WriteMainMemory | ( | hls::stream< Tcntr > & | sOutCmd, |
hls::stream< local_mem_word_t > & | sInGeneratedData, | ||
membus_t * | lcl_mem, | ||
local_mem_addr_t | max_addr_ut, | ||
unsigned int | burst_size | ||
) |
A function that read a stream of data and write them in a run-time variable burst-size.
[out] | sOutCmd | the output stream for cmd generation |
[in] | sInGeneratedData | the input stream of generated data |
[out] | lcl_mem | the memory mapped ptr |
[in] | max_addr_ut | the maximum address to test |
[in] | burst_size | the run-time variable burst size to write |
Definition at line 228 of file memtest_pattern_library.hpp.
const unsigned long int max_counter_cc = 4000000 |
Definition at line 540 of file memtest_library.hpp.
const unsigned int top_param_maximum_number_of_beats = 4096 |
Definition at line 69 of file memtest_processing.hpp.