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

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 32 of file test_event_engine.cpp.

33 {
34  stream<event> txApp2eventEng_setEvent;
35  stream<extendedEvent> rxEng2eventEng_setEvent;
36  stream<event> timer2eventEng_setEvent;
37  stream<extendedEvent> eventEng2txEng_event;
38 
39  extendedEvent ev;
40  int count=0;
41  while (count < 50)
42  {
43  event_engine( txApp2eventEng_setEvent,
44  rxEng2eventEng_setEvent,
45  timer2eventEng_setEvent,
46  eventEng2txEng_event);
47 
48  if (count == 20)
49  {
50  fourTuple tuple;
51  tuple.srcIp = 0x0101010a;
52  tuple.srcPort = 12;
53  tuple.dstIp = 0x0101010b;
54  tuple.dstPort = 788789;
55  txApp2eventEng_setEvent.write(event(TX, 23));
56  rxEng2eventEng_setEvent.write(extendedEvent(rstEvent(0x8293479023), tuple));
57  timer2eventEng_setEvent.write(event(RT, 22));
58  }
59  if (!eventEng2txEng_event.empty())
60  {
61  eventEng2txEng_event.read(ev);
62  std::cout << ev.type << std::endl;
63  }
64  count++;
65  }
66  return 0;
67 }
void event_engine(stream< Event > &siTAi_Event, stream< ExtendedEvent > &siRXe_Event, stream< Event > &siTIm_Event, stream< ExtendedEvent > &soAKd_Event, stream< SigBit > &siAKd_RxEventSig, stream< SigBit > &siAKd_TxEventSig, stream< SigBit > &siTXe_RxEventSig)
The Event Engine (EVe) arbitrates the incoming events and forwards them to the Tx Engine (TXe) via th...
ap_uint< 32 > dstIp
Definition: nts_types.hpp:231
ap_uint< 32 > srcIp
Definition: nts_types.hpp:230
ap_uint< 16 > dstPort
Definition: nts_types.hpp:233
ap_uint< 16 > srcPort
Definition: nts_types.hpp:232
Here is the call graph for this function: