Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | |
2 | ||
3 | /***************************************************************************** | |
4 | ||
5 | The following code is derived, directly or indirectly, from the SystemC | |
6 | source code Copyright (c) 1996-2004 by all Contributors. | |
7 | All Rights reserved. | |
8 | ||
9 | The contents of this file are subject to the restrictions and limitations | |
10 | set forth in the SystemC Open Source License Version 2.4 (the "License"); | |
11 | You may not use this file except in compliance with such restrictions and | |
12 | limitations. You may obtain instructions on how to receive a copy of the | |
13 | License at http://www.systemc.org/. Software distributed by Contributors | |
14 | under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF | |
15 | ANY KIND, either express or implied. See the License for the specific | |
16 | language governing rights and limitations under the License. | |
17 | ||
18 | *****************************************************************************/ | |
19 | ||
20 | #ifndef TLM_MASTER_SLAVE_IFS_HEADER | |
21 | #define TLM_MASTER_SLAVE_IFS_HEADER | |
22 | ||
23 | // | |
24 | // req/rsp combined interfaces | |
25 | // | |
26 | ||
27 | #include "tlm_core/tlm_interfaces/tlm_core_ifs.h" | |
28 | ||
29 | // blocking | |
30 | ||
31 | template < typename REQ , typename RSP> | |
32 | class tlm_blocking_master_if : | |
33 | public virtual tlm_blocking_put_if< REQ > , | |
34 | public virtual tlm_blocking_get_peek_if< RSP > {}; | |
35 | ||
36 | template < typename REQ , typename RSP> | |
37 | class tlm_blocking_slave_if : | |
38 | public virtual tlm_blocking_put_if< RSP > , | |
39 | public virtual tlm_blocking_get_peek_if< REQ > {}; | |
40 | ||
41 | // nonblocking | |
42 | ||
43 | template < typename REQ , typename RSP > | |
44 | class tlm_nonblocking_master_if : | |
45 | public virtual tlm_nonblocking_put_if< REQ > , | |
46 | public virtual tlm_nonblocking_get_peek_if< RSP > {}; | |
47 | ||
48 | template < typename REQ , typename RSP > | |
49 | class tlm_nonblocking_slave_if : | |
50 | public virtual tlm_nonblocking_put_if< RSP > , | |
51 | public virtual tlm_nonblocking_get_peek_if< REQ > {}; | |
52 | ||
53 | // combined | |
54 | ||
55 | template < typename REQ , typename RSP > | |
56 | class tlm_master_if : | |
57 | public virtual tlm_put_if< REQ > , | |
58 | public virtual tlm_get_peek_if< RSP > , | |
59 | public virtual tlm_blocking_master_if< REQ , RSP > , | |
60 | public virtual tlm_nonblocking_master_if< REQ , RSP > {}; | |
61 | ||
62 | template < typename REQ , typename RSP > | |
63 | class tlm_slave_if : | |
64 | public virtual tlm_put_if< RSP > , | |
65 | public virtual tlm_get_peek_if< REQ > , | |
66 | public virtual tlm_blocking_slave_if< REQ , RSP > , | |
67 | public virtual tlm_nonblocking_slave_if< REQ , RSP > {}; | |
68 | ||
69 | #endif |