scc  2022.4.0
SystemC components library
scc::fifo_w_cb< T > Class Template Reference

fifo with callbacks More...

#include <fifo_w_cb.h>

Inheritance diagram for scc::fifo_w_cb< T >:
Collaboration diagram for scc::fifo_w_cb< T >:

Public Member Functions

 fifo_w_cb (const char *name)
 
void push_back (T &t)
 
void push_back (const T &t)
 
T & back ()
 
const T & back () const
 
void pop_front ()
 
T & front ()
 
const T & front () const
 
size_t avail () const
 
bool empty () const
 
void set_avail_cb (std::function< void(void)> f)
 
void set_empty_cb (std::function< void(void)> f)
 
sc_core::sc_event const & data_written_event () const
 

Protected Member Functions

virtual void update ()
 

Protected Attributes

std::deque< T > in_queue {}
 
std::deque< T > out_queue {}
 
std::function< void(void)> avail_cb {}
 
std::function< void(void)> empty_cb {}
 
sc_core::sc_event data_written_evt {}
 

Detailed Description

template<typename T>
class scc::fifo_w_cb< T >

fifo with callbacks

A fifo with callbacks upon running empty or being filled. The registered callbacks are triggered if the fifo is empty or if an element is inserted. This can be used to control the sensitivity of processes reading this fifo.

Template Parameters
Tthe type name of the elements to be store in the fifo

Definition at line 38 of file fifo_w_cb.h.


The documentation for this class was generated from the following file: