fifo Class Reference

#include <fifo.h>

Inheritance diagram for fifo:

sc_core::sc_module write_if read_if sc_core::sc_module write_if read_if sc_core::sc_interface sc_core::sc_interface sc_core::sc_interface sc_core::sc_interface sc_core::sc_process_host sc_core::sc_interface sc_core::sc_interface sc_core::sc_interface sc_core::sc_interface sc_core::sc_process_host

List of all members.

Public Member Functions

 fifo ()
void pkt_in (const pkt &data_pkt)
pkt pkt_out ()
 fifo (sc_module_name name)
void write (char c)
void read (char &c)
void reset ()
int num_available ()
 fifo (sc_module_name name, int size_)
 ~fifo ()
void write (char c)
void read (char &c)
void reset ()
int num_available ()

Public Attributes

pkt regs [4]
bool full
bool empty
sc_uint< 3 > pntr

Private Types

enum  e { max = 10 }

Private Member Functions

void compute_stats ()

Private Attributes

char data [max]
int num_elements
int first
sc_event write_event
sc_event read_event
char * data
int size
int num_read
int max_used
int average
sc_time last_time


Member Enumeration Documentation

enum fifo::e [private]

Enumerator:
max 


Constructor & Destructor Documentation

fifo::fifo (  )  [inline]

References empty, full, and pntr.

fifo::fifo ( sc_module_name  name  )  [inline]

fifo::fifo ( sc_module_name  name,
int  size_ 
) [inline]

fifo::~fifo (  )  [inline]

References average, data, last_time, max_used, num_read, and size.


Member Function Documentation

void fifo::compute_stats (  )  [inline, private]

References average, max_used, num_elements, and num_read.

Referenced by read().

int fifo::num_available (  )  [inline, virtual]

Implements read_if.

References num_elements.

int fifo::num_available (  )  [inline, virtual]

Implements read_if.

References num_elements.

void fifo::pkt_in ( const pkt data_pkt  ) 

References empty, full, pntr, and regs.

Referenced by mcast_pkt_switch::entry().

pkt fifo::pkt_out (  ) 

References empty, pntr, and regs.

Referenced by mcast_pkt_switch::entry().

void fifo::read ( char &  c  )  [inline, virtual]

void fifo::read ( char &  c  )  [inline, virtual]

void fifo::reset (  )  [inline, virtual]

Implements write_if.

References first, and num_elements.

void fifo::reset (  )  [inline, virtual]

Implements write_if.

References first, and num_elements.

void fifo::write ( char  c  )  [inline, virtual]

void fifo::write ( char  c  )  [inline, virtual]


Member Data Documentation

int fifo::average [private]

Referenced by compute_stats(), fifo(), and ~fifo().

char* fifo::data [private]

char fifo::data[max] [private]

Referenced by fifo(), read(), write(), and ~fifo().

int fifo::first [private]

Referenced by fifo(), read(), reset(), and write().

bool fifo::full

Referenced by fifo(), read(), and ~fifo().

int fifo::max_used [private]

Referenced by compute_stats(), fifo(), and ~fifo().

int fifo::num_elements [private]

int fifo::num_read [private]

Referenced by compute_stats(), fifo(), and ~fifo().

sc_uint<3> fifo::pntr

Referenced by read(), and write().

Referenced by pkt_in(), and pkt_out().

int fifo::size [private]

Referenced by fifo(), read(), write(), and ~fifo().

Referenced by read(), and write().


The documentation for this class was generated from the following files:
Generated by
Matthieu Moy <Matthieu.Moy@st.com>
Back to Pinapa Home Page