C:/ESLX/projects/TLMWG/tlm2/include/tlm/tlm_h/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_core.h"
00022 
00023 #include "tlm_h/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h"
00024 #include "tlm_h/tlm_analysis/tlm_analysis_if.h"
00025 #include "tlm_h/tlm_analysis/tlm_analysis_triple.h"
00026 
00027 namespace tlm {
00028 
00029 template< typename T >
00030 class tlm_analysis_fifo :
00031   public tlm_fifo< T > ,
00032   public virtual tlm_analysis_if< T > ,
00033   public virtual tlm_analysis_if< tlm_analysis_triple< T > > {
00034 
00035  public:
00036 
00037  // analysis fifo is an unbounded tlm_fifo
00038 
00039   tlm_analysis_fifo( const char *nm ) : tlm_fifo<T>( nm , -16 ) {}
00040   tlm_analysis_fifo() : tlm_fifo<T>( -16 ) {}
00041 
00042   void write( const tlm_analysis_triple<T> &t ) {
00043     nb_put( t );
00044   }
00045 
00046   void write( const T &t ) {
00047     nb_put( t );
00048   }
00049 
00050 };
00051 
00052 } // namespace tlm
00053 
00054 #endif

Generated on Thu Jun 5 17:43:03 2008 for TLM 2 by  doxygen 1.5.3