26 #include "close_timer.hpp"
32 #pragma HLS inline region off
35 stream<ap_uint<16> > timeWaitFifo;
36 stream<ap_uint<16> > sessionReleaseFifo;
39 std::ofstream outputFile;
48 outputFile.open(
"/home/dasidler/toe/hls/toe/close_timer/out.dat");
51 std::cout <<
"Error: could not open test output file." << std::endl;
55 uint32_t setCount = 0;
56 timeWaitFifo.write(1);
57 timeWaitFifo.write(2);
58 while (
count < 2147483647)
61 if ((
count % 1000000000) == 0)
63 outputFile <<
"set new timer, count: " <<
count << std::endl;
64 timeWaitFifo.write(1);
68 close_timer(timeWaitFifo, sessionReleaseFifo);
69 while(!sessionReleaseFifo.empty())
71 double dbcount =
count - setCount;
72 sessionReleaseFifo.read(outData);
73 outputFile <<
"Event fired at count: " <<
count;
74 outputFile <<
" ID: " << outData;
75 outputFile <<
" Time[s]: " << ((dbcount * 6.66) /1000000000) << std::endl;