Go to the source code of this file.
◆ main()
Definition at line 40 of file test_port_table.cpp.
42 #pragma HLS inline region off
45 stream<ap_uint<16> > rxPortTableIn(
"rxPortTableIn");
46 stream<bool> rxPortTableOut(
"rxPortTableOut");
47 stream<ap_uint<16> > rxAppListenIn(
"rxAppListenIn");
48 stream<bool> rxAppListenOut(
"rxAppListenOut");
51 stream<ap_uint<16> > txAppGetPortOut(
"txAppGetPortOut");
52 stream<ap_uint<16> > txAppFreePort(
"txAppFreePort");
54 std::ifstream inputFile;
55 std::ofstream outputFile;
64 outputFile.open(
"/home/dasidler/toe/hls/toe/port_table/out.dat");
67 std::cout <<
"Error: could not open test output file." << std::endl;
89 bool currBool =
false;
90 ap_uint<16> currPort = 0;
130 rxPortTableOut, rxAppListenOut,txAppGetPortOut);
131 if (!rxPortTableOut.empty())
133 rxPortTableOut.read(currBool);
134 outputFile <<
"Port 80 is open: " << (currBool ?
"yes" :
"no");
135 outputFile << std::endl;
137 if (!rxAppListenOut.empty())
139 rxAppListenOut.read(currBool);
140 outputFile <<
"Listening " << (currBool ?
"" :
"not") <<
" successful" << std::endl;
150 rxAppListenIn.write(0x0007);
154 rxPortTableIn.write(0x0700);
void port_table(StsBool &poTOE_Ready, stream< TcpPort > &siRXe_GetPortStateReq, stream< RepBit > &soRXe_GetPortStateRep, stream< TcpPort > &siRAi_OpenLsnPortReq, stream< AckBit > &soRAi_OpenLsnPortAck, stream< ReqBit > &siTAi_GetFreePortReq, stream< TcpPort > &soTAi_GetFreePortRep, stream< TcpPort > &siSLc_CloseActPortCmd)
Port Table (PRt)
◆ swappedBytes()
ap_uint<16> swappedBytes |
( |
ap_uint< 16 > |
in | ) |
|
Definition at line 32 of file test_port_table.cpp.
35 swapped(7, 0) = in(15, 8);
36 swapped(15, 8) = in(7, 0);