diff options
Diffstat (limited to 'src/systemc/ext/tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h')
-rw-r--r-- | src/systemc/ext/tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h | 75 |
1 files changed, 36 insertions, 39 deletions
diff --git a/src/systemc/ext/tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h b/src/systemc/ext/tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h index d9b2b985b..57418ae92 100644 --- a/src/systemc/ext/tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h +++ b/src/systemc/ext/tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h @@ -17,17 +17,15 @@ *****************************************************************************/ -// -// Note to the LRM writer : These interfaces are channel specific interfaces -// useful in the context of tlm_fifo. -// - -#ifndef __TLM_FIFO_IFS_H__ -#define __TLM_FIFO_IFS_H__ +#ifndef \ + __SYSTEMC_EXT_TLM_CORE_TLM_1_TLM_REQ_RSP_TLM_1_INTERFACES_TLM_FIFO_IFS_H__ +#define \ + __SYSTEMC_EXT_TLM_CORE_TLM_1_TLM_REQ_RSP_TLM_1_INTERFACES_TLM_FIFO_IFS_H__ #include "tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_core_ifs.h" -namespace tlm { +namespace tlm +{ // // Fifo specific interfaces @@ -35,51 +33,50 @@ namespace tlm { // Fifo Debug Interface -template< typename T > +template <typename T> class tlm_fifo_debug_if : public virtual sc_core::sc_interface { -public: - virtual int used() const = 0; - virtual int size() const = 0; - virtual void debug() const = 0; - - // - // non blocking peek and poke - no notification - // - // n is index of data : - // 0 <= n < size(), where 0 is most recently written, and size() - 1 - // is oldest ie the one about to be read. - // - - virtual bool nb_peek( T & , int n ) const = 0; - virtual bool nb_poke( const T & , int n = 0 ) = 0; - + public: + virtual int used() const = 0; + virtual int size() const = 0; + virtual void debug() const = 0; + + // + // non blocking peek and poke - no notification + // + // n is index of data : + // 0 <= n < size(), where 0 is most recently written, and size() - 1 + // is oldest ie the one about to be read. + // + + virtual bool nb_peek(T &, int n) const = 0; + virtual bool nb_poke(const T&, int n=0) = 0; }; // fifo interfaces = extended + debug -template < typename T > -class tlm_fifo_put_if : - public virtual tlm_put_if<T> , - public virtual tlm_fifo_debug_if<T> {}; +template <typename T> +class tlm_fifo_put_if : public virtual tlm_put_if<T>, + public virtual tlm_fifo_debug_if<T> +{}; -template < typename T > +template <typename T> class tlm_fifo_get_if : - public virtual tlm_get_peek_if<T> , - public virtual tlm_fifo_debug_if<T> {}; + public virtual tlm_get_peek_if<T>, + public virtual tlm_fifo_debug_if<T> +{}; class tlm_fifo_config_size_if : public virtual sc_core::sc_interface { -public: - virtual void nb_expand( unsigned int n = 1 ) = 0; - virtual void nb_unbound( unsigned int n = 16 ) = 0; - - virtual bool nb_reduce( unsigned int n = 1 ) = 0; - virtual bool nb_bound( unsigned int n ) = 0; + public: + virtual void nb_expand(unsigned int n=1) = 0; + virtual void nb_unbound(unsigned int n=16) = 0; + virtual bool nb_reduce(unsigned int n=1) = 0; + virtual bool nb_bound(unsigned int n) = 0; }; } // namespace tlm #endif - +/* __SYSTEMC_EXT_TLM_CORE_TLM_1_TLM_REQ_RSP_TLM_1_INTERFACES_TLM_FIFO_IFS_H__*/ |