cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
simu_udp_app_flash_env.hpp File Reference
#include <stdio.h>
#include <fstream>
#include <iostream>
#include <hls_stream.h>
#include "../src/udp_app_flash.hpp"
#include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/SimNtsUtils.hpp"
#include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/SimAppData.hpp"
#include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/SimUdpDatagram.hpp"
Include dependency graph for simu_udp_app_flash_env.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TB_MAX_CYCLES   500
 
#define TB_GRACE_TIME   500
 
#define VALID   true
 
#define UNVALID   false
 
#define DEBUG_TRACE   true
 
#define ENABLED   (ap_uint<1>)1
 
#define DISABLED   (ap_uint<1>)0
 
#define DEFAULT_FPGA_IP4_ADDR   0x0A0CC801
 
#define DEFAULT_FPGA_LSN_PORT   0x2263
 
#define DEFAULT_FPGA_SND_PORT   0xA263
 
#define DEFAULT_HOST_IP4_ADDR   0x0A0CC832
 
#define DEFAULT_HOST_LSN_PORT   0x80
 
#define DEFAULT_HOST_SND_PORT   0x8080
 
#define DEFAULT_DATAGRAM_LEN   32
 

Functions

void stepSim ()
 Increment the simulation counter. More...
 
void increaseSimTime (unsigned int cycles)
 Increase the simulation time of the testbench. More...
 
bool readDatagramFromFile (const char *myName, SimUdpDatagram &appDatagram, ifstream &ifsData, SocketPair &sockPair, queue< UdpAppMeta > &udpMetaQueue, queue< UdpAppDLen > &udpDLenQueue, int &inpChunks, int &inpDgrms, int &inpBytes)
 Read a datagram from a DAT file. More...
 
int createGoldenTxFiles (EchoCtrl tbCtrlMode, string inpData_FileName, queue< UdpAppMeta > &udpMetaQueue, queue< UdpAppDLen > &udpDLenQueue, string outData_GoldName, string outMeta_GoldName, string outDLen_GoldName)
 Create the golden UDP Tx files from an input test file. More...
 
int createUdpRxTraffic (stream< AxisApp > &ssData, const string ssDataName, stream< UdpAppMeta > &ssMeta, const string ssMetaName, stream< UdpAppDLen > &ssDLen, const string ssMDLenName, string datFile, queue< UdpAppMeta > &metaQueue, queue< UdpAppDLen > &dlenQueue, int &nrFeededChunks)
 Create the UDP Rx traffic as streams from an input test file. More...
 
bool drainUdpMetaStreamToFile (stream< UdpAppMeta > &ss, string ssName, string datFile, int &nrChunks, int &nrFrames, int &nrBytes)
 Empty an UdpMeta stream to a DAT file. More...
 
bool drainUdpDLenStreamToFile (stream< UdpAppDLen > &ss, string ssName, string datFile, int &nrChunks, int &nrFrames, int &nrBytes)
 Empty a UdpDLen stream to a DAT file. More...