gem5
v20.0.0.2
|
#include <circular_buffer.hh>
Public Member Functions | |
circular_buffer (int size=0) | |
~circular_buffer () | |
void | resize (int size) |
void | clear () |
T | read () |
void | write (const T &) |
bool | is_empty () const |
bool | is_full () const |
int | size () const |
int | used () const |
int | free () const |
const T & | read_data () const |
const T & | peek_data (int i) const |
T & | poke_data (int i) |
void | debug () const |
Private Member Functions | |
void | increment_write_pos (int i=1) |
void | increment_read_pos (int i=1) |
void | init () |
circular_buffer (const circular_buffer< T > &b) | |
circular_buffer< T > & | operator= (const circular_buffer< T > &) |
void * | buf_alloc (int size) |
void | buf_free (void *&buf) |
void | buf_write (void *buf, int n, const T &t) |
T & | buf_read (void *buf, int n) const |
void | buf_clear (void *buf, int n) |
Private Attributes | |
int | m_size |
void * | m_buf |
int | m_free |
int | m_used |
int | m_ri |
int | m_wi |
Definition at line 29 of file circular_buffer.hh.
|
explicit |
Definition at line 112 of file circular_buffer.hh.
References tlm::circular_buffer< T >::init().
Referenced by tlm::circular_buffer< T >::poke_data().
tlm::circular_buffer< T >::~circular_buffer | ( | ) |
Definition at line 129 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_free(), tlm::circular_buffer< T >::clear(), and tlm::circular_buffer< T >::m_buf.
|
private |
|
inlineprivate |
Definition at line 213 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::poke_data(), and tlm::circular_buffer< T >::resize().
|
inlineprivate |
Definition at line 244 of file circular_buffer.hh.
References MipsISA::p.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::poke_data(), tlm::circular_buffer< T >::read(), and tlm::circular_buffer< T >::resize().
|
inlineprivate |
Definition at line 220 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::poke_data(), tlm::circular_buffer< T >::resize(), and tlm::circular_buffer< T >::~circular_buffer().
|
inlineprivate |
Definition at line 236 of file circular_buffer.hh.
References MipsISA::p.
Referenced by tlm::circular_buffer< T >::peek_data(), tlm::circular_buffer< T >::poke_data(), and tlm::circular_buffer< T >::read_data().
|
inlineprivate |
Definition at line 228 of file circular_buffer.hh.
References MipsISA::p.
Referenced by tlm::circular_buffer< T >::poke_data(), tlm::circular_buffer< T >::resize(), and tlm::circular_buffer< T >::write().
void tlm::circular_buffer< T >::clear | ( | ) |
Definition at line 119 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_clear(), ArmISA::i, tlm::circular_buffer< T >::m_buf, tlm::circular_buffer< T >::m_free, tlm::circular_buffer< T >::m_ri, tlm::circular_buffer< T >::m_size, tlm::circular_buffer< T >::m_used, tlm::circular_buffer< T >::m_wi, and tlm::circular_buffer< T >::used().
Referenced by tlm::circular_buffer< T >::~circular_buffer().
void tlm::circular_buffer< T >::debug | ( | ) | const |
Definition at line 90 of file circular_buffer.hh.
References tlm::circular_buffer< T >::free(), ArmISA::i, tlm::circular_buffer< T >::is_empty(), tlm::circular_buffer< T >::is_full(), tlm::circular_buffer< T >::m_ri, tlm::circular_buffer< T >::m_wi, tlm::circular_buffer< T >::peek_data(), tlm::circular_buffer< T >::size(), and tlm::circular_buffer< T >::used().
Referenced by tlm::circular_buffer< T >::poke_data().
|
inline |
Definition at line 46 of file circular_buffer.hh.
References tlm::circular_buffer< T >::m_free.
Referenced by tlm::circular_buffer< T >::debug(), and tlm::circular_buffer< T >::is_full().
|
private |
Definition at line 204 of file circular_buffer.hh.
References ArmISA::i, tlm::circular_buffer< T >::m_free, tlm::circular_buffer< T >::m_ri, tlm::circular_buffer< T >::m_size, and tlm::circular_buffer< T >::m_used.
Referenced by tlm::circular_buffer< T >::poke_data(), and tlm::circular_buffer< T >::read().
|
private |
Definition at line 195 of file circular_buffer.hh.
References ArmISA::i, tlm::circular_buffer< T >::m_free, tlm::circular_buffer< T >::m_size, tlm::circular_buffer< T >::m_used, and tlm::circular_buffer< T >::m_wi.
Referenced by tlm::circular_buffer< T >::poke_data(), and tlm::circular_buffer< T >::write().
|
private |
Definition at line 161 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_alloc(), tlm::circular_buffer< T >::m_buf, tlm::circular_buffer< T >::m_free, tlm::circular_buffer< T >::m_ri, tlm::circular_buffer< T >::m_size, tlm::circular_buffer< T >::m_used, and tlm::circular_buffer< T >::m_wi.
Referenced by tlm::circular_buffer< T >::circular_buffer(), and tlm::circular_buffer< T >::poke_data().
|
inline |
Definition at line 41 of file circular_buffer.hh.
References tlm::circular_buffer< T >::used().
Referenced by tlm::circular_buffer< T >::debug().
|
inline |
Definition at line 42 of file circular_buffer.hh.
References tlm::circular_buffer< T >::free().
Referenced by tlm::circular_buffer< T >::debug().
|
private |
Referenced by tlm::circular_buffer< T >::poke_data().
|
inline |
Definition at line 50 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_read(), tlm::circular_buffer< T >::m_buf, tlm::circular_buffer< T >::m_ri, and tlm::circular_buffer< T >::size().
Referenced by tlm::circular_buffer< T >::debug(), and tlm::circular_buffer< T >::resize().
|
inline |
Definition at line 56 of file circular_buffer.hh.
References ArmISA::b, tlm::circular_buffer< T >::buf_alloc(), tlm::circular_buffer< T >::buf_clear(), tlm::circular_buffer< T >::buf_free(), tlm::circular_buffer< T >::buf_read(), tlm::circular_buffer< T >::buf_write(), tlm::circular_buffer< T >::circular_buffer(), tlm::circular_buffer< T >::debug(), ArmISA::i, tlm::circular_buffer< T >::increment_read_pos(), tlm::circular_buffer< T >::increment_write_pos(), tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::m_buf, tlm::circular_buffer< T >::m_wi, ArmISA::n, tlm::circular_buffer< T >::operator=(), tlm::circular_buffer< T >::size(), and ArmISA::t.
T tlm::circular_buffer< T >::read | ( | ) |
Definition at line 175 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_clear(), tlm::circular_buffer< T >::increment_read_pos(), tlm::circular_buffer< T >::m_buf, tlm::circular_buffer< T >::m_ri, tlm::circular_buffer< T >::read_data(), and ArmISA::t.
|
inline |
Definition at line 48 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_read(), tlm::circular_buffer< T >::m_buf, and tlm::circular_buffer< T >::m_ri.
Referenced by tlm::circular_buffer< T >::read().
void tlm::circular_buffer< T >::resize | ( | int | size | ) |
Definition at line 137 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_alloc(), tlm::circular_buffer< T >::buf_clear(), tlm::circular_buffer< T >::buf_free(), tlm::circular_buffer< T >::buf_write(), ArmISA::i, tlm::circular_buffer< T >::m_buf, tlm::circular_buffer< T >::m_free, tlm::circular_buffer< T >::m_ri, tlm::circular_buffer< T >::m_size, tlm::circular_buffer< T >::m_used, tlm::circular_buffer< T >::m_wi, tlm::circular_buffer< T >::peek_data(), tlm::circular_buffer< T >::size(), and tlm::circular_buffer< T >::used().
|
inline |
Definition at line 44 of file circular_buffer.hh.
References tlm::circular_buffer< T >::m_size.
Referenced by tlm::circular_buffer< T >::debug(), tlm::circular_buffer< T >::peek_data(), tlm::circular_buffer< T >::poke_data(), and tlm::circular_buffer< T >::resize().
|
inline |
Definition at line 45 of file circular_buffer.hh.
References tlm::circular_buffer< T >::m_used.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::debug(), tlm::circular_buffer< T >::is_empty(), and tlm::circular_buffer< T >::resize().
void tlm::circular_buffer< T >::write | ( | const T & | t | ) |
Definition at line 187 of file circular_buffer.hh.
References tlm::circular_buffer< T >::buf_write(), tlm::circular_buffer< T >::increment_write_pos(), tlm::circular_buffer< T >::m_buf, and tlm::circular_buffer< T >::m_wi.
|
private |
Definition at line 81 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::peek_data(), tlm::circular_buffer< T >::poke_data(), tlm::circular_buffer< T >::read(), tlm::circular_buffer< T >::read_data(), tlm::circular_buffer< T >::resize(), tlm::circular_buffer< T >::write(), and tlm::circular_buffer< T >::~circular_buffer().
|
private |
Definition at line 82 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::free(), tlm::circular_buffer< T >::increment_read_pos(), tlm::circular_buffer< T >::increment_write_pos(), tlm::circular_buffer< T >::init(), and tlm::circular_buffer< T >::resize().
|
private |
Definition at line 84 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::debug(), tlm::circular_buffer< T >::increment_read_pos(), tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::peek_data(), tlm::circular_buffer< T >::read(), tlm::circular_buffer< T >::read_data(), and tlm::circular_buffer< T >::resize().
|
private |
Definition at line 80 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::increment_read_pos(), tlm::circular_buffer< T >::increment_write_pos(), tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::resize(), and tlm::circular_buffer< T >::size().
|
private |
Definition at line 83 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::increment_read_pos(), tlm::circular_buffer< T >::increment_write_pos(), tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::resize(), and tlm::circular_buffer< T >::used().
|
private |
Definition at line 85 of file circular_buffer.hh.
Referenced by tlm::circular_buffer< T >::clear(), tlm::circular_buffer< T >::debug(), tlm::circular_buffer< T >::increment_write_pos(), tlm::circular_buffer< T >::init(), tlm::circular_buffer< T >::poke_data(), tlm::circular_buffer< T >::resize(), and tlm::circular_buffer< T >::write().