cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
test_rx_app_interface_todo.cpp File Reference
#include "rx_app_if.hpp"
#include <iostream>
Include dependency graph for test_rx_app_interface_todo.cpp:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 31 of file test_rx_app_interface_todo.cpp.

32 {
33  stream<ap_uint<16> > appListenPortReq;
34  stream<bool> portTable2rxApp_listen_rsp;
35  stream<bool> appListenPortRsp;
36  stream<ap_uint<16> > rxApp2porTable_listen_req;
37 
38  bool response;
39  int count = 0;
40  while (count < 50)
41  {
42  rx_app_if( appListenPortReq,
43  portTable2rxApp_listen_rsp,
44  appListenPortRsp,
45  rxApp2porTable_listen_req);
46  if (!rxApp2porTable_listen_req.empty())
47  {
48  rxApp2porTable_listen_req.read();
49  portTable2rxApp_listen_rsp.write(true);
50  }
51 
52  if (count == 20)
53  {
54  appListenPortReq.write(80);
55  }
56  if (!appListenPortRsp.empty())
57  {
58  appListenPortRsp.read(response);
59  std::cout << "Response: " << ((response) ? "true" : "false") << std::endl;
60  }
61 
62 
63  count++;
64  }
65  return 0;
66 }