gem5  v20.1.0.0
fifo_ifs.hh
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 #ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__
21 #define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__
22 
23 #include "core_ifs.hh"
24 
25 namespace tlm
26 {
27 
28 //
29 // Fifo specific interfaces
30 //
31 
32 // Fifo Debug Interface
33 
34 template <typename T>
35 class tlm_fifo_debug_if : public virtual sc_core::sc_interface
36 {
37  public:
38  virtual int used() const = 0;
39  virtual int size() const = 0;
40  virtual void debug() const = 0;
41 
42  //
43  // non blocking peek and poke - no notification
44  //
45  // n is index of data :
46  // 0 <= n < size(), where 0 is most recently written, and size() - 1
47  // is oldest ie the one about to be read.
48  //
49 
50  virtual bool nb_peek(T &, int n) const = 0;
51  virtual bool nb_poke(const T&, int n=0) = 0;
52 };
53 
54 // fifo interfaces = extended + debug
55 
56 template <typename T>
57 class tlm_fifo_put_if : public virtual tlm_put_if<T>,
58  public virtual tlm_fifo_debug_if<T>
59 {};
60 
61 template <typename T>
62 class tlm_fifo_get_if :
63  public virtual tlm_get_peek_if<T>,
64  public virtual tlm_fifo_debug_if<T>
65 {};
66 
67 class tlm_fifo_config_size_if : public virtual sc_core::sc_interface
68 {
69  public:
70  virtual void nb_expand(unsigned int n=1) = 0;
71  virtual void nb_unbound(unsigned int n=16) = 0;
72 
73  virtual bool nb_reduce(unsigned int n=1) = 0;
74  virtual bool nb_bound(unsigned int n) = 0;
75 };
76 
77 } // namespace tlm
78 
79 #endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__ */
tlm::tlm_fifo_debug_if::debug
virtual void debug() const =0
tlm::tlm_fifo_debug_if::used
virtual int used() const =0
tlm::tlm_fifo_debug_if::nb_poke
virtual bool nb_poke(const T &, int n=0)=0
tlm::tlm_put_if
Definition: core_ifs.hh:104
tlm::tlm_fifo_debug_if::size
virtual int size() const =0
core_ifs.hh
sc_core::sc_interface
Definition: sc_interface.hh:37
tlm::tlm_fifo_debug_if
Definition: fifo_ifs.hh:52
ArmISA::n
Bitfield< 31 > n
Definition: miscregs_types.hh:450
tlm::tlm_fifo_put_if
Definition: fifo_ifs.hh:74
tlm::tlm_fifo_config_size_if::nb_unbound
virtual void nb_unbound(unsigned int n=16)=0
tlm
Definition: analysis_fifo.hh:27
tlm::tlm_fifo_config_size_if::nb_bound
virtual bool nb_bound(unsigned int n)=0
tlm::tlm_fifo_config_size_if::nb_expand
virtual void nb_expand(unsigned int n=1)=0
tlm::tlm_fifo_debug_if::nb_peek
virtual bool nb_peek(T &, int n) const =0
tlm::tlm_fifo_config_size_if::nb_reduce
virtual bool nb_reduce(unsigned int n=1)=0

Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17