76 stream<stateQuery> rxIn;
77 stream<sessionState> rxOut;
78 stream<stateQuery> txAppIn;
79 stream<sessionState> txAppOut;
80 stream<stateQuery> txApp2In;
81 stream<sessionState> txApp2Out;
82 stream<ap_uint<16> > timerIn;
83 stream<ap_uint<16> > slupOut;
88 std::ifstream inputFile;
89 std::ofstream outputFile;
97 outputFile.open(
"/home/dasidler/toe/hls/toe/state_table/out.dat");
100 std::cout <<
"Error: could not open test output file." << std::endl;
109 ap_uint<16>
id = 0x57;
110 outputFile <<
"Test 1" << std::endl;
111 outputFile <<
"ID: " <<
id << std::endl;
129 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
133 outputFile <<
"------------------------------------------------" << std::endl;
139 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
149 ap_uint<16> id2 = 0x3a;
150 outputFile <<
"Test 2" << std::endl;
151 outputFile <<
"ID: " <<
id <<
" ID2: " << id2 << std::endl;
175 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
179 outputFile <<
"------------------------------------------------" << std::endl;
184 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
196 outputFile <<
"Test 3" << std::endl;
197 outputFile <<
"ID: " <<
id <<
" ID2: " << id2 << std::endl;
203 rxIn.write(stateQuery(
id));
212 rxIn.write(stateQuery(id2));
215 txAppIn.write(stateQuery(id2));
218 rxIn.write(stateQuery(id2,
CLOSING, 1));
221 txAppIn.write(stateQuery(id2,
SYN_SENT, 1));
230 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
234 outputFile <<
"------------------------------------------------" << std::endl;
239 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
250 outputFile <<
"Test 4" << std::endl;
251 outputFile <<
"ID: " <<
id << std::endl;
257 txAppIn.write(stateQuery(
id));
260 rxIn.write(stateQuery(
id));
263 txAppIn.write(stateQuery(
id,
SYN_SENT, 1));
275 state_table(rxIn, txAppIn, txApp2In, timerIn, rxOut, txAppOut, txApp2Out, slupOut);
279 outputFile <<
"------------------------------------------------" << std::endl;
void state_table(stream< StateQuery > &siRXe_SessStateQry, stream< TcpState > &soRXe_SessStateRep, stream< StateQuery > &siTAi_ConnectStateQry, stream< TcpState > &soTAi_ConnectStateRep, stream< SessionId > &siTAi_StreamStateReq, stream< TcpState > &soTAi_StreamStateRep, stream< SessionId > &siTIm_SessCloseCmd, stream< SessionId > &soSLc_SessReleaseCmd)
State Table (STt)
void emptyFifos(std::ofstream &out, stream< sessionState > &rxFifoOut, stream< sessionState > &appFifoOut, stream< sessionState > &app2FifoOut, stream< ap_uint< 16 > > &slupOut, int iter)