TLM-2.0  2.0.4
Accellera TLM-2.0 proof-of-concept library
tlm_nonblocking_port.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 #ifndef __TLM_NONBLOCKING_PORT_H__
21 #define __TLM_NONBLOCKING_PORT_H__
22 
25 
26 namespace tlm {
27 
28 template < typename T >
30 public sc_core::sc_port< tlm_nonblocking_get_if< T > , 1 >
31 {
32 public:
34 
35  tlm_nonblocking_get_port( const char *port_name ) :
36  sc_core::sc_port< tlm_nonblocking_get_if< T > , 1 >( port_name ) {}
37 
39 
41  *this,
43 
44  }
45 
46 };
47 
48 template < typename T >
50 public sc_core::sc_port< tlm_nonblocking_peek_if< T > , 1 >
51 {
52 public:
54 
55  tlm_nonblocking_peek_port( const char *port_name ) :
56  sc_core::sc_port< tlm_nonblocking_peek_if< T > , 1 >( port_name ) {}
57 
59 
61  *this,
62  &peek_if_type::ok_to_peek );
63 
64  }
65 
66 };
67 
68 
69 template < typename T >
71 public sc_core::sc_port< tlm_nonblocking_put_if< T > , 1 >
72 {
73 public:
75 
76  tlm_nonblocking_put_port( const char *port_name ) :
77  sc_core::sc_port< tlm_nonblocking_put_if< T > , 1 >( port_name ) {}
78 
80 
82  *this,
83  &put_if_type::ok_to_put );
84 
85  }
86 
87 };
88 
89 } // namespace tlm
90 
91 #endif
tlm_nonblocking_get_port(const char *port_name)
tlm_nonblocking_peek_if< T > peek_if_type
tlm_nonblocking_put_if< T > put_if_type
tlm_nonblocking_put_port(const char *port_name)
tlm_nonblocking_get_if< T > get_if_type
sc_core::sc_event_finder & ok_to_put() const
virtual const sc_core::sc_event & ok_to_get(tlm_tag< T > *t=0) const =0
sc_core::sc_event_finder & ok_to_get() const
sc_core::sc_event_finder & ok_to_peek() const
tlm_nonblocking_peek_port(const char *port_name)