113521Sgabeblack@google.com/*****************************************************************************
213521Sgabeblack@google.com
313521Sgabeblack@google.com  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
413521Sgabeblack@google.com  more contributor license agreements.  See the NOTICE file distributed
513521Sgabeblack@google.com  with this work for additional information regarding copyright ownership.
613521Sgabeblack@google.com  Accellera licenses this file to you under the Apache License, Version 2.0
713521Sgabeblack@google.com  (the "License"); you may not use this file except in compliance with the
813521Sgabeblack@google.com  License.  You may obtain a copy of the License at
913521Sgabeblack@google.com
1013521Sgabeblack@google.com    http://www.apache.org/licenses/LICENSE-2.0
1113521Sgabeblack@google.com
1213521Sgabeblack@google.com  Unless required by applicable law or agreed to in writing, software
1313521Sgabeblack@google.com  distributed under the License is distributed on an "AS IS" BASIS,
1413521Sgabeblack@google.com  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1513521Sgabeblack@google.com  implied.  See the License for the specific language governing
1613521Sgabeblack@google.com  permissions and limitations under the License.
1713521Sgabeblack@google.com
1813521Sgabeblack@google.com *****************************************************************************/
1913521Sgabeblack@google.com
2013521Sgabeblack@google.com#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__
2113521Sgabeblack@google.com#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__
2213521Sgabeblack@google.com
2313586Sgabeblack@google.com#include "core_ifs.hh"
2413521Sgabeblack@google.com
2513521Sgabeblack@google.comnamespace tlm
2613521Sgabeblack@google.com{
2713521Sgabeblack@google.com
2813521Sgabeblack@google.com//
2913521Sgabeblack@google.com// Fifo specific interfaces
3013521Sgabeblack@google.com//
3113521Sgabeblack@google.com
3213521Sgabeblack@google.com// Fifo Debug Interface
3313521Sgabeblack@google.com
3413521Sgabeblack@google.comtemplate <typename T>
3513521Sgabeblack@google.comclass tlm_fifo_debug_if : public virtual sc_core::sc_interface
3613521Sgabeblack@google.com{
3713521Sgabeblack@google.com  public:
3813521Sgabeblack@google.com    virtual int used() const = 0;
3913521Sgabeblack@google.com    virtual int size() const = 0;
4013521Sgabeblack@google.com    virtual void debug() const = 0;
4113521Sgabeblack@google.com
4213521Sgabeblack@google.com    //
4313521Sgabeblack@google.com    // non blocking peek and poke - no notification
4413521Sgabeblack@google.com    //
4513521Sgabeblack@google.com    // n is index of data :
4613521Sgabeblack@google.com    // 0 <= n < size(), where 0 is most recently written, and size() - 1
4713521Sgabeblack@google.com    // is oldest ie the one about to be read.
4813521Sgabeblack@google.com    //
4913521Sgabeblack@google.com
5013521Sgabeblack@google.com    virtual bool nb_peek(T &, int n) const = 0;
5113521Sgabeblack@google.com    virtual bool nb_poke(const T&, int n=0) = 0;
5213521Sgabeblack@google.com};
5313521Sgabeblack@google.com
5413521Sgabeblack@google.com// fifo interfaces = extended + debug
5513521Sgabeblack@google.com
5613521Sgabeblack@google.comtemplate <typename T>
5713521Sgabeblack@google.comclass tlm_fifo_put_if : public virtual tlm_put_if<T>,
5813521Sgabeblack@google.com    public virtual tlm_fifo_debug_if<T>
5913521Sgabeblack@google.com{};
6013521Sgabeblack@google.com
6113521Sgabeblack@google.comtemplate <typename T>
6213521Sgabeblack@google.comclass tlm_fifo_get_if :
6313521Sgabeblack@google.com    public virtual tlm_get_peek_if<T>,
6413521Sgabeblack@google.com    public virtual tlm_fifo_debug_if<T>
6513521Sgabeblack@google.com{};
6613521Sgabeblack@google.com
6713521Sgabeblack@google.comclass tlm_fifo_config_size_if : public virtual sc_core::sc_interface
6813521Sgabeblack@google.com{
6913521Sgabeblack@google.com  public:
7013521Sgabeblack@google.com    virtual void nb_expand(unsigned int n=1) = 0;
7113521Sgabeblack@google.com    virtual void nb_unbound(unsigned int n=16) = 0;
7213521Sgabeblack@google.com
7313521Sgabeblack@google.com    virtual bool nb_reduce(unsigned int n=1) = 0;
7413521Sgabeblack@google.com    virtual bool nb_bound(unsigned int n) = 0;
7513521Sgabeblack@google.com};
7613521Sgabeblack@google.com
7713521Sgabeblack@google.com} // namespace tlm
7813521Sgabeblack@google.com
7913521Sgabeblack@google.com#endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__ */
80