Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | |
2 | #ifndef ANALYSIS_FIFO_HEADER | |
3 | #define ANALYSIS_FIFO_HEADER | |
4 | ||
5 | #include "analysis_if.h" | |
6 | #include "analysis_triple.h" | |
7 | #include "tlm_core.h" | |
8 | ||
9 | using tlm_core::tlm_fifo; | |
10 | ||
11 | template< typename T > | |
12 | class analysis_fifo : | |
13 | public tlm_fifo< T > , | |
14 | public virtual analysis_if< T > , | |
15 | public virtual analysis_if< analysis_triple< T > > { | |
16 | ||
17 | public: | |
18 | ||
19 | // analysis fifo is an unbounded tlm_fifo | |
20 | ||
21 | analysis_fifo( const char *nm ) : tlm_fifo<T>( nm , -16 ) {} | |
22 | analysis_fifo() : tlm_fifo<T>( -16 ) {} | |
23 | ||
24 | void write( const analysis_triple<T> &t ) { | |
25 | nb_put( t ); | |
26 | } | |
27 | ||
28 | void write( const T &t ) { | |
29 | nb_put( t ); | |
30 | } | |
31 | ||
32 | }; | |
33 | ||
34 | #endif |