TLM-2.0: include/tlm/tlm_1/tlm_analysis/tlm_analysis_fifo.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# include/tlm/tlm_1/tlm_analysis/tlm_analysis_fifo.h

Go to the documentation of this file.

    00001 /*****************************************************************************
    00002
    00003   The following code is derived, directly or indirectly, from the SystemC
    00004   source code Copyright (c) 1996-2008 by all Contributors.
    00005   All Rights reserved.
    00006
    00007   The contents of this file are subject to the restrictions and limitations
    00008   set forth in the SystemC Open Source License Version 3.0 (the "License");
    00009   You may not use this file except in compliance with such restrictions and
    00010   limitations. You may obtain instructions on how to receive a copy of the
    00011   License at http://www.systemc.org/. Software distributed by Contributors
    00012   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
    00013   ANY KIND, either express or implied. See the License for the specific
    00014   language governing rights and limitations under the License.
    00015
    00016  *****************************************************************************/
    00017
    00018 #ifndef __TLM_ANALYSIS_FIFO_H__
    00019 #define __TLM_ANALYSIS_FIFO_H__
    00020
    00021 #include "tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h"
    00022 #include "tlm_1/tlm_analysis/tlm_analysis_if.h"
    00023 #include "tlm_1/tlm_analysis/tlm_analysis_triple.h"
    00024
    00025 namespace tlm {
    00026
    00027 template< typename T >
    00028 class tlm_analysis_fifo :
    00029   public tlm_fifo< T > ,
    00030   public virtual tlm_analysis_if< T > ,
    00031   public virtual tlm_analysis_if< tlm_analysis_triple< T > > {
    00032
    00033  public:
    00034
    00035  // analysis fifo is an unbounded tlm_fifo
    00036
    00037   tlm_analysis_fifo( const char *nm ) : tlm_fifo<T>( nm , -16 ) {}
    00038   tlm_analysis_fifo() : tlm_fifo<T>( -16 ) {}
    00039
    00040   void write( const tlm_analysis_triple<T> &t ) {
    00041     nb_put( t );
    00042   }
    00043
    00044   void write( const T &t ) {
    00045     nb_put( t );
    00046   }
    00047
    00048 };
    00049
    00050 } // namespace tlm
    00051
    00052 #endif