TLM-2.0  2.0.3
Accellera TLM-2.0 proof-of-concept library
tlm_analysis_fifo.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_ANALYSIS_FIFO_H__
19 #define __TLM_ANALYSIS_FIFO_H__
20 
24 
25 namespace tlm {
26 
27 template< typename T >
29  public tlm_fifo< T > ,
30  public virtual tlm_analysis_if< T > ,
31  public virtual tlm_analysis_if< tlm_analysis_triple< T > > {
32 
33  public:
34 
35  // analysis fifo is an unbounded tlm_fifo
36 
37  tlm_analysis_fifo( const char *nm ) : tlm_fifo<T>( nm , -16 ) {}
38  tlm_analysis_fifo() : tlm_fifo<T>( -16 ) {}
39 
40  void write( const tlm_analysis_triple<T> &t ) {
41  nb_put( t );
42  }
43 
44  void write( const T &t ) {
45  nb_put( t );
46  }
47 
48 };
49 
50 } // namespace tlm
51 
52 #endif
void write(const T &t)
bool nb_put(const T &)
tlm_analysis_fifo(const char *nm)
void write(const tlm_analysis_triple< T > &t)