31 void emptyFifos(std::ofstream&
out, stream<rxSarEntry>& rxFifoOut, stream<rxSarAppd>& appFifoOut, stream<rxSarEntry>& txFifoOut,
int iter)
35 while (!(rxFifoOut.empty()))
37 rxFifoOut.read(outData);
38 out <<
"Step " << iter <<
": RX Fifo\t\t";
40 out << std::setfill(
'0');
41 out << std::setw(8) << outData.recvd <<
" " << std::setw(4) << outData.appd <<
" ";
45 while (!(appFifoOut.empty()))
47 appFifoOut.read(outAppData);
48 out <<
"Step " << iter <<
": App Fifo\t\t";
50 out << std::setfill(
'0');
51 out << std::setw(8) << outData.recvd <<
" " << std::setw(4) << outData.appd <<
" ";
55 while (!(txFifoOut.empty()))
57 txFifoOut.read(outData);
58 out <<
"Step " << iter <<
": TX Fifo\t\t";
60 out << std::setfill(
'0');
61 out << std::setw(8) << outData.recvd <<
" " << std::setw(4) << outData.appd <<
" ";
68 #pragma HLS inline region off
72 stream<ap_uint<16> > txFifoIn;
74 stream<rxSarRecvd> rxFifoIn;
75 stream<rxSarAppd> appFifo;
76 stream<rxSarAppd> appFifoOut;
77 stream<rxSarEntry> rxFifoOut;
78 stream<rxSarEntry> txFifoOut;
85 std::ifstream inputFile;
86 std::ofstream outputFile;
95 outputFile.open(
"/home/dasidler/toe/hls/toe/rx_sar_table/out.dat");
98 std::cout <<
"Error: could not open test output file." << std::endl;
112 ap_uint<16>
id = 0x57;
113 ap_uint<32> val = 0x25ca;
114 outputFile <<
"Test1" << std::endl;
115 outputFile <<
"ID: " <<
id <<
" Write value: " << val << std::endl;
124 rxFifoIn.write(rxSarRecvd(
id, val, 1));
135 rx_sar_table(rxFifoIn, appFifo, txFifoIn, rxFifoOut, appFifoOut, txFifoOut);
140 outputFile <<
"------------------------------------------------" << std::endl;
147 rx_sar_table(rxFifoIn, appFifo, txFifoIn, rxFifoOut, appFifoOut, txFifoOut);
void rx_sar_table(stream< RXeRxSarQuery > &siRXe_RxSarQry, stream< RxSarReply > &soRXe_RxSarRep, stream< RAiRxSarQuery > &siRAi_RxSarQry, stream< RAiRxSarReply > &soRAi_RxSarRep, stream< SessionId > &siTXe_RxSarReq, stream< RxSarReply > &soTxe_RxSarRep)
Rx SAR Table (RSt)
: Rx Segmentation And Re-assembly Table (RSt).
void emptyFifos(std::ofstream &out, stream< rxSarEntry > &rxFifoOut, stream< rxSarAppd > &appFifoOut, stream< rxSarEntry > &txFifoOut, int iter)