C:/ESLX/projects/TLMWG/tlm2/include/tlm/tlm_h/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.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 //
00019 // Note to the LRM writer : These interfaces are channel specific interfaces
00020 // useful in the context of tlm_fifo.
00021 //
00022 
00023 #ifndef __TLM_FIFO_IFS_H__
00024 #define __TLM_FIFO_IFS_H__
00025 
00026 #include "tlm_h/tlm_req_rsp/tlm_1_interfaces/tlm_core_ifs.h"
00027 
00028 namespace tlm {
00029 
00030 // 
00031 // Fifo specific interfaces
00032 //
00033 
00034 // Fifo Debug Interface
00035 
00036 template< typename T >
00037 class tlm_fifo_debug_if : public virtual sc_core::sc_interface
00038 {
00039 public:
00040   virtual int used() const = 0;
00041   virtual int size() const = 0;
00042   virtual void debug() const = 0;
00043 
00044   //
00045   // non blocking peek and poke - no notification
00046   //
00047   // n is index of data :
00048   // 0 <= n < size(), where 0 is most recently written, and size() - 1
00049   // is oldest ie the one about to be read.
00050   //
00051 
00052   virtual bool nb_peek( T & , int n ) const = 0;
00053   virtual bool nb_poke( const T & , int n = 0 ) = 0;
00054 
00055 };
00056 
00057 // fifo interfaces = extended + debug
00058 
00059 template < typename T >
00060 class tlm_fifo_put_if :
00061   public virtual tlm_put_if<T> ,
00062   public virtual tlm_fifo_debug_if<T> {};
00063 
00064 template < typename T >
00065 class tlm_fifo_get_if :
00066   public virtual tlm_get_peek_if<T> ,
00067   public virtual tlm_fifo_debug_if<T> {};
00068 
00069 class tlm_fifo_config_size_if : public virtual sc_core::sc_interface
00070 {
00071 public:
00072   virtual void nb_expand( unsigned int n = 1 ) = 0;
00073   virtual void nb_unbound( unsigned int n = 16 ) = 0;
00074 
00075   virtual bool nb_reduce( unsigned int n = 1 ) = 0;
00076   virtual bool nb_bound( unsigned int n ) = 0;
00077 
00078 };
00079 
00080 } // namespace tlm
00081 
00082 #endif
00083 

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