TLM-2.0  2.0.3
Accellera TLM-2.0 proof-of-concept library
tlm_master_slave_ifs.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  The following code is derived, directly or indirectly, from the SystemC
4  source code Copyright (c) 1996-2014 by all Contributors.
5  All Rights reserved.
6 
7  The contents of this file are subject to the restrictions and limitations
8  set forth in the SystemC Open Source License (the "License");
9  You may not use this file except in compliance with such restrictions and
10  limitations. You may obtain instructions on how to receive a copy of the
11  License at http://www.accellera.org/. Software distributed by Contributors
12  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13  ANY KIND, either express or implied. See the License for the specific
14  language governing rights and limitations under the License.
15 
16  *****************************************************************************/
17 
18 #ifndef __TLM_MASTER_SLAVE_IFS_H__
19 #define __TLM_MASTER_SLAVE_IFS_H__
20 
22 
23 namespace tlm {
24 
25 //
26 // req/rsp combined interfaces
27 //
28 
29 // blocking
30 
31 template < typename REQ , typename RSP>
33  public virtual tlm_blocking_put_if< REQ > ,
34  public virtual tlm_blocking_get_peek_if< RSP > {};
35 
36 template < typename REQ , typename RSP>
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 >
45  public virtual tlm_nonblocking_put_if< REQ > ,
46  public virtual tlm_nonblocking_get_peek_if< RSP > {};
47 
48 template < typename REQ , typename RSP >
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 >
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 } // namespace tlm
70 
71 #endif