ChampSim
champsim::channel Class Reference

#include <channel.h>

Collaboration diagram for champsim::channel:
[legend]

Classes

struct  request
 
struct  response
 

Public Types

using response_type = response
 
using request_type = request
 
using stats_type = cache_queue_stats
 

Public Member Functions

 channel ()=default
 
 channel (std::size_t rq_size, std::size_t pq_size, std::size_t wq_size, unsigned offset_bits, bool match_offset)
 
bool add_rq (const request_type &packet)
 
bool add_wq (const request_type &packet)
 
bool add_pq (const request_type &packet)
 
std::size_t rq_occupancy () const
 
std::size_t wq_occupancy () const
 
std::size_t pq_occupancy () const
 
std::size_t rq_size () const
 
std::size_t wq_size () const
 
std::size_t pq_size () const
 
void check_collision ()
 

Public Attributes

std::deque< request_typeRQ {}
 
std::deque< request_typePQ {}
 
std::deque< request_typeWQ {}
 
std::deque< response_typereturned {}
 
stats_type sim_stats {}
 
stats_type roi_stats {}
 

Private Member Functions

template<typename R >
bool do_add_queue (R &queue, std::size_t queue_size, const typename R::value_type &packet)
 

Private Attributes

std::size_t RQ_SIZE = std::numeric_limits<std::size_t>::max()
 
std::size_t PQ_SIZE = std::numeric_limits<std::size_t>::max()
 
std::size_t WQ_SIZE = std::numeric_limits<std::size_t>::max()
 
unsigned OFFSET_BITS = 0
 
bool match_offset_bits = false
 

Member Typedef Documentation

◆ request_type

◆ response_type

◆ stats_type

Constructor & Destructor Documentation

◆ channel() [1/2]

champsim::channel::channel ( )
default

◆ channel() [2/2]

champsim::channel::channel ( std::size_t  rq_size,
std::size_t  pq_size,
std::size_t  wq_size,
unsigned  offset_bits,
bool  match_offset 
)

Member Function Documentation

◆ add_pq()

bool champsim::channel::add_pq ( const request_type packet)

◆ add_rq()

bool champsim::channel::add_rq ( const request_type packet)

◆ add_wq()

bool champsim::channel::add_wq ( const request_type packet)

◆ check_collision()

void champsim::channel::check_collision ( )

◆ do_add_queue()

template<typename R >
bool champsim::channel::do_add_queue ( R &  queue,
std::size_t  queue_size,
const typename R::value_type &  packet 
)
private

◆ pq_occupancy()

std::size_t champsim::channel::pq_occupancy ( ) const

◆ pq_size()

std::size_t champsim::channel::pq_size ( ) const

◆ rq_occupancy()

std::size_t champsim::channel::rq_occupancy ( ) const

◆ rq_size()

std::size_t champsim::channel::rq_size ( ) const

◆ wq_occupancy()

std::size_t champsim::channel::wq_occupancy ( ) const

◆ wq_size()

std::size_t champsim::channel::wq_size ( ) const

Member Data Documentation

◆ match_offset_bits

bool champsim::channel::match_offset_bits = false
private

◆ OFFSET_BITS

unsigned champsim::channel::OFFSET_BITS = 0
private

◆ PQ

std::deque<request_type> champsim::channel::PQ {}

◆ PQ_SIZE

std::size_t champsim::channel::PQ_SIZE = std::numeric_limits<std::size_t>::max()
private

◆ returned

std::deque<response_type> champsim::channel::returned {}

◆ roi_stats

stats_type champsim::channel::roi_stats {}

◆ RQ

std::deque<request_type> champsim::channel::RQ {}

◆ RQ_SIZE

std::size_t champsim::channel::RQ_SIZE = std::numeric_limits<std::size_t>::max()
private

◆ sim_stats

stats_type champsim::channel::sim_stats {}

◆ WQ

std::deque<request_type> champsim::channel::WQ {}

◆ WQ_SIZE

std::size_t champsim::channel::WQ_SIZE = std::numeric_limits<std::size_t>::max()
private

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