41 stream<txAppTxSarQuery> txAppReqFifo;
42 stream<txAppTxSarReply> txAppRspFifo;
43 stream<txAppTxSarPush> txAppPushFifo;
44 stream<txTxSarQuery> txReqFifo;
45 stream<txSarEntry> txRspFifo;
46 stream<rxTxSarQuery> rxQueryFifo;
47 stream<ap_uint<32> > rxRespFifo;
49 txTxSarQuery txInData;
50 rxTxSarQuery rxInData;
53 std::ifstream inputFile;
54 std::ofstream outputFile;
62 outputFile.open(
"/home/dasidler/toe/hls/toe/tx_sar_table/out.dat");
65 std::cout <<
"Error: could not open test output file." << std::endl;
75 std::vector<readVerify> reads;
80 if ((
count % 10) == 0)
82 if (inputFile >> fifoTemp >> sessionIDTemp >> opTemp >> valueTemp >> exp_valueTemp)
86 txInData.sessionID = sessionIDTemp;
89 txInData.write = (opTemp ==
'W');;
90 txReqFifo.write(txInData);
93 reads.push_back( (
readVerify){sessionIDTemp, fifoTemp[0], exp_valueTemp});
98 rxInData.sessionID = sessionIDTemp;
99 rxInData.recv_window = valueTemp;
101 rxQueryFifo.write(rxInData);
110 tx_sar_table(rxQueryFifo, txAppReqFifo, txReqFifo, txAppPushFifo, rxRespFifo, txAppRspFifo, txRspFifo);
114 std::vector<readVerify>::const_iterator it;
116 bool readData =
false;
118 while (it != reads.end())
123 if (!txRspFifo.empty())
125 txRspFifo.read(response);
132 if (((
int)response.recv_window) != it->exp)
134 outputFile <<
"Error at ID " << it->id <<
" on fifo ";
135 outputFile << it->fifo <<
" response value was " << response.recv_window <<
" instead of " << it->exp << std::endl;
149 outputFile <<
"No errors coccured." << std::endl;
153 outputFile << errCount <<
" errors coccured." << std::endl;
void tx_sar_table(stream< RXeTxSarQuery > &siRXe_TxSarQry, stream< RXeTxSarReply > &soRXe_TxSarRep, stream< TXeTxSarQuery > &siTXe_TxSarQry, stream< TXeTxSarReply > &soTXe_TxSarRep, stream< TAiTxSarPush > &siTAi_PushCmd, stream< TStTxSarPush > &soTAi_PushCmd)
Tx Sar Table (TSt). Stores the data structures for managing the TCP Tx buffer and Tx sliding window.
: Tx Segmentation and re-assembly Table (TSt)