Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | |
2 | #ifndef TLM_ANNOTATED_IFS_HEADER | |
3 | #define TLM_ANNOTATED_IFS_HEADER | |
4 | ||
5 | #include "tlm_core.h" | |
6 | ||
7 | using tlm_core::tlm_transport_if; | |
8 | ||
9 | using tlm_core::tlm_nonblocking_put_if; | |
10 | using tlm_core::tlm_blocking_put_if; | |
11 | using tlm_core::tlm_put_if; | |
12 | ||
13 | using tlm_core::tlm_nonblocking_get_if; | |
14 | using tlm_core::tlm_blocking_get_if; | |
15 | using tlm_core::tlm_get_if; | |
16 | ||
17 | using tlm_core::tlm_nonblocking_peek_if; | |
18 | using tlm_core::tlm_blocking_peek_if; | |
19 | using tlm_core::tlm_peek_if; | |
20 | ||
21 | using tlm_core::tlm_nonblocking_get_peek_if; | |
22 | using tlm_core::tlm_blocking_get_peek_if; | |
23 | using tlm_core::tlm_get_peek_if; | |
24 | ||
25 | using tlm_core::tlm_tag; | |
26 | ||
27 | template< typename REQ , typename RSP > | |
28 | class tlm_delayed_transport_if : public virtual sc_interface { | |
29 | public: | |
30 | virtual void transport( const REQ &req , RSP &rsp , sc_time &t ) = 0; | |
31 | }; | |
32 | ||
33 | template < typename REQ , typename RSP > | |
34 | class tlm_annotated_transport_if : | |
35 | public virtual tlm_transport_if< REQ , RSP > , | |
36 | public virtual tlm_delayed_transport_if< REQ , RSP > | |
37 | {}; | |
38 | ||
39 | ||
40 | ||
41 | template< typename T > | |
42 | class tlm_annotated_nonblocking_get_if : | |
43 | public virtual tlm_nonblocking_get_if< T > | |
44 | { | |
45 | public: | |
46 | tlm_nonblocking_get_if< T >::nb_get; | |
47 | tlm_nonblocking_get_if< T >::nb_can_get; | |
48 | ||
49 | virtual bool nb_get( T & , const sc_time & ) = 0; | |
50 | virtual bool nb_can_get( const sc_time & , tlm_tag<T> *t = 0 ) const = 0; | |
51 | }; | |
52 | ||
53 | ||
54 | ||
55 | template < typename T > | |
56 | class tlm_annotated_nonblocking_put_if : | |
57 | public virtual tlm_nonblocking_put_if < T > | |
58 | { | |
59 | public: | |
60 | tlm_nonblocking_put_if< T >::nb_put; | |
61 | tlm_nonblocking_put_if< T >::nb_can_put; | |
62 | ||
63 | virtual bool nb_put( const T & , const sc_time & ) = 0; | |
64 | virtual bool nb_can_put( const sc_time & , tlm_tag<T> *t = 0 ) const = 0; | |
65 | }; | |
66 | ||
67 | template < typename T > | |
68 | class tlm_annotated_get_if : | |
69 | public virtual tlm_blocking_get_if< T > , | |
70 | public virtual tlm_annotated_nonblocking_get_if< T > , | |
71 | public virtual tlm_get_if< T > {}; | |
72 | ||
73 | template < typename T > | |
74 | class tlm_annotated_put_if : | |
75 | public virtual tlm_blocking_put_if< T > , | |
76 | public virtual tlm_annotated_nonblocking_put_if< T > , | |
77 | public virtual tlm_put_if<T>{}; | |
78 | ||
79 | template < typename T > | |
80 | class tlm_annotated_nonblocking_get_peek_if : | |
81 | public virtual tlm_annotated_nonblocking_get_if<T> , | |
82 | public virtual tlm_nonblocking_peek_if< T > , | |
83 | tlm_nonblocking_get_peek_if< T > {}; | |
84 | ||
85 | template < typename T > | |
86 | class tlm_annotated_get_peek_if : | |
87 | public virtual tlm_annotated_get_if< T > , | |
88 | public virtual tlm_peek_if<T> , | |
89 | public virtual tlm_blocking_get_peek_if<T> , | |
90 | public virtual tlm_annotated_nonblocking_get_peek_if< T > , | |
91 | public virtual tlm_get_peek_if< T > | |
92 | {}; | |
93 | ||
94 | #endif |