69 explicit sc_fifo(
const char* name_,
int size_ = 16 )
88 virtual void read( T& );
108 virtual void write(
const T& );
133 {
write( a );
return *
this; }
139 virtual void print( ::std::ostream& = ::std::cout )
const;
140 virtual void dump( ::std::ostream& = ::std::cout )
const;
142 virtual const char*
kind()
const 143 {
return "sc_fifo"; }
189 const char* if_typename_ )
191 std::string nm( if_typename_ );
214 "sc_fifo<T> port not recognized" );
254 bool read_success =
buf_read( val_ );
292 return write_success;
302 #if defined(DEBUG_SYSTEMC) 304 std::string nm =
name();
305 for(
int i = 0; i <
m_size; ++ i ) {
306 std::sprintf( buf,
"_%d", i );
321 os <<
m_buf[i] << ::std::endl;
323 }
while( i !=
m_wi );
332 os <<
"name = " <<
name() << ::std::endl;
337 os <<
"value[" << i <<
"] = " <<
m_buf[i] << ::std::endl;
340 }
while( i !=
m_wi );
431 operator << ( ::std::ostream& os, const sc_fifo<T>& a )
sc_event m_data_written_event
SC_API const sc_time SC_ZERO_TIME
virtual void register_port(sc_port_base &, const char *)
virtual bool nb_write(const T &)
void sc_trace(sc_trace_file *tf, const sc_in< T > &port, const std::string &name)
The sc_fifo<T> input blocking interface class.
virtual int num_free() const
sc_fifo< T > & operator=(const T &a)
sc_event m_data_read_event
Abstract base class of all primitive channel classes.
Abstract base class for class sc_port_b.
void trace(sc_trace_file *tf) const
virtual void write(const T &)
The sc_fifo<T> output interface class.
The sc_fifo<T> input interface class.
The sc_fifo<T> interface classes.
virtual bool nb_read(T &)
virtual const char * kind() const
const char * name() const
bool buf_write(const T &)
SC_API const char * sc_gen_unique_name(const char *, bool preserve_first)
Report ids for the communication code.
Definition of the simulation context class.
sc_fifo(const char *name_, int size_=16)
virtual void dump(::std::ostream &=::std::cout) const
virtual const sc_event & data_written_event() const
#define SC_REPORT_ERROR(msg_type, msg)
virtual void print(::std::ostream &=::std::cout) const
virtual const sc_event & data_read_event() const
The sc_fifo<T> primitive channel class.
virtual int num_available() const
Abstract base class of all primitive channel classes.
The sc_fifo<T> blocking output interface class.
Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21.
void SC_API wait(int, sc_simcontext *)