cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
memtest.hpp File Reference

The Role for a Memtest Example application (UDP or TCP) More...

#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <string.h>
#include <math.h>
#include <hls_stream.h>
#include "ap_int.h"
#include <stdint.h>
#include <bitset>
#include "network.hpp"
Include dependency graph for memtest.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ENABLE_DDR
 
#define ROLE_IS_MEMTEST
 
#define MEMTEST_COMMANDS_HIGH_BIT   MEMTEST_COMMANDS_BITWIDTH-1
 
#define MEMTEST_COMMANDS_LOW_BIT   0
 
#define MEMTEST_COMMANDS_BITWIDTH   8
 
#define WAIT_FOR_META   0
 
#define WAIT_FOR_STREAM_PAIR   1
 
#define PROCESSING_PACKET   2
 
#define MEMTEST_RETURN_RESULTS   3
 
#define PacketFsmType   uint8_t
 
#define FSM_WRITE_NEW_DATA   0
 
#define FSM_DONE   1
 
#define PortFsmType   uint8_t
 
#define DEFAULT_TX_PORT   2718
 
#define DEFAULT_RX_PORT   2718
 
#define MEMDW_512   512
 
#define TOTMEMDW_512   16384
 
#define CYCLES_UNTIL_TIMEOUT   0x0100
 
#define TYPICAL_DDR_LATENCY   4
 
#define DDR_LATENCY   52
 
#define EXTRA_DDR_LATENCY_DUE_II   (64 + 8)
 

Typedefs

typedef ap_uint< 512 > membus_512_t
 
typedef membus_512_t membus_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...
 

Detailed Description

The Role for a Memtest Example application (UDP or TCP)

Author
FAB, WEI, NGL, DID, DCO

@date September 2021

: This application implements a set of UDP-oriented tests and functions which are embedded into the Flash of the cloudFPGA role.

Deprecated:
For the time being, we continue designing with the DEPRECATED directives because the new PRAGMAs do not work for us.

Definition in file memtest.hpp.