20 #ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_CHANNELS_FIFO_FIFO_HH__
21 #define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_CHANNELS_FIFO_FIFO_HH__
37 #include "../../interfaces/fifo_ifs.hh"
55 explicit tlm_fifo(
const char *name_,
int size_=1) :
115 std::cout <<
"empty" << std::endl;
117 std::cout <<
"full" << std::endl;
119 std::cout <<
"size " <<
size() <<
" - " <<
used() <<
" used "
176 template <
typename T>
185 template <
typename T>
190 buffer.resize( size_ );
191 }
else if (size_ < 0) {
192 buffer.resize(-size_);
202 m_num_read_no_notify =
false;
205 template <
typename T>
209 if (m_num_read > m_num_read_no_notify || m_expand) {
213 if (m_num_written > 0) {
220 m_num_readable = buffer.used();
221 m_num_read_no_notify = 0;
tlm_fifo(const tlm_fifo< T > &)
T peek(tlm_tag< T > *=nullptr) const
sc_core::sc_event & read_event(tlm_tag< T > *=nullptr)
const sc_core::sc_event & ok_to_put(tlm_tag< T > *=nullptr) const
bool nb_can_peek(tlm_tag< T > *=nullptr) const
const char * kind() const
void nb_unbound(unsigned int n=16)
bool nb_reduce(unsigned int n=1)
bool nb_can_get(tlm_tag< T > *=nullptr) const
sc_core::sc_event m_data_written_event
bool nb_bound(unsigned int n)
const sc_core::sc_event & ok_to_peek(tlm_tag< T > *=nullptr) const
sc_core::sc_event m_data_read_event
T get(tlm_tag< T > *=nullptr)
bool nb_poke(const T &, int n=0)
const sc_core::sc_event & ok_to_get(tlm_tag< T > *=nullptr) const
circular_buffer< T > buffer
void nb_expand(unsigned int n=1)
static const char *const kind_string
tlm_fifo & operator=(const tlm_fifo< T > &)
tlm_fifo(const char *name_, int size_=1)
bool nb_can_put(tlm_tag< T > *=nullptr) const
const sc_time SC_ZERO_TIME
const char * sc_gen_unique_name(const char *seed)