gem5  v20.1.0.0
Public Member Functions | Private Attributes | List of all members
OutputUnit Class Reference

#include <OutputUnit.hh>

Inheritance diagram for OutputUnit:
Consumer

Public Member Functions

 OutputUnit (int id, PortDirection direction, Router *router, uint32_t consumerVcs)
 
 ~OutputUnit ()=default
 
void set_out_link (NetworkLink *link)
 
void set_credit_link (CreditLink *credit_link)
 
void wakeup ()
 
flitBuffergetOutQueue ()
 
void print (std::ostream &out) const
 
void decrement_credit (int out_vc)
 
void increment_credit (int out_vc)
 
bool has_credit (int out_vc)
 
bool has_free_vc (int vnet)
 
int select_free_vc (int vnet)
 
PortDirection get_direction ()
 
int get_credit_count (int vc)
 
int get_outlink_id ()
 
void set_vc_state (VC_state_type state, int vc, Tick curTime)
 
bool is_vc_idle (int vc, Tick curTime)
 
void insert_flit (flit *t_flit)
 
int getVcsPerVnet ()
 
uint32_t functionalWrite (Packet *pkt)
 
- Public Member Functions inherited from Consumer
 Consumer (ClockedObject *_em)
 
virtual ~Consumer ()
 
virtual void storeEventInfo (int info)
 
bool alreadyScheduled (Tick time)
 
void insertScheduledWakeupTime (Tick time)
 
ClockedObjectgetObject ()
 
void scheduleEventAbsolute (Tick timeAbs)
 
void scheduleEvent (Cycles timeDelta)
 

Private Attributes

Routerm_router
 
int M5_CLASS_VAR_USED m_id
 
PortDirection m_direction
 
int m_vc_per_vnet
 
NetworkLinkm_out_link
 
CreditLinkm_credit_link
 
flitBuffer outBuffer
 
std::vector< OutVcStateoutVcState
 

Detailed Description

Definition at line 47 of file OutputUnit.hh.

Constructor & Destructor Documentation

◆ OutputUnit()

OutputUnit::OutputUnit ( int  id,
PortDirection  direction,
Router router,
uint32_t  consumerVcs 
)

◆ ~OutputUnit()

OutputUnit::~OutputUnit ( )
default

Member Function Documentation

◆ decrement_credit()

void OutputUnit::decrement_credit ( int  out_vc)

◆ functionalWrite()

uint32_t OutputUnit::functionalWrite ( Packet pkt)

Definition at line 167 of file OutputUnit.cc.

References flitBuffer::functionalWrite(), and outBuffer.

◆ get_credit_count()

int OutputUnit::get_credit_count ( int  vc)
inline

Definition at line 67 of file OutputUnit.hh.

References outVcState.

Referenced by decrement_credit(), and increment_credit().

◆ get_direction()

PortDirection OutputUnit::get_direction ( )
inline

Definition at line 64 of file OutputUnit.hh.

References m_direction.

Referenced by decrement_credit(), and increment_credit().

◆ get_outlink_id()

int OutputUnit::get_outlink_id ( )
inline

Definition at line 73 of file OutputUnit.hh.

References NetworkLink::get_id(), and m_out_link.

◆ getOutQueue()

flitBuffer * OutputUnit::getOutQueue ( )

Definition at line 142 of file OutputUnit.cc.

References outBuffer.

Referenced by Router::addOutPort().

◆ getVcsPerVnet()

int OutputUnit::getVcsPerVnet ( )
inline

Definition at line 93 of file OutputUnit.hh.

References m_vc_per_vnet.

◆ has_credit()

bool OutputUnit::has_credit ( int  out_vc)

Definition at line 80 of file OutputUnit.cc.

References ACTIVE_, curTick(), and outVcState.

Referenced by SwitchAllocator::send_allowed().

◆ has_free_vc()

bool OutputUnit::has_free_vc ( int  vnet)

Definition at line 89 of file OutputUnit.cc.

References curTick(), is_vc_idle(), and m_vc_per_vnet.

◆ increment_credit()

void OutputUnit::increment_credit ( int  out_vc)

◆ insert_flit()

void OutputUnit::insert_flit ( flit t_flit)

◆ is_vc_idle()

bool OutputUnit::is_vc_idle ( int  vc,
Tick  curTime 
)
inline

Definition at line 85 of file OutputUnit.hh.

References IDLE_, and outVcState.

Referenced by has_free_vc(), and select_free_vc().

◆ print()

void OutputUnit::print ( std::ostream &  out) const
inlinevirtual

Implements Consumer.

Definition at line 57 of file OutputUnit.hh.

◆ select_free_vc()

int OutputUnit::select_free_vc ( int  vnet)

Definition at line 102 of file OutputUnit.cc.

References ACTIVE_, curTick(), is_vc_idle(), m_vc_per_vnet, and outVcState.

Referenced by SwitchAllocator::vc_allocate().

◆ set_credit_link()

void OutputUnit::set_credit_link ( CreditLink credit_link)

Definition at line 154 of file OutputUnit.cc.

References m_credit_link.

Referenced by Router::addOutPort().

◆ set_out_link()

void OutputUnit::set_out_link ( NetworkLink link)

Definition at line 148 of file OutputUnit.cc.

References m_out_link.

Referenced by Router::addOutPort().

◆ set_vc_state()

void OutputUnit::set_vc_state ( VC_state_type  state,
int  vc,
Tick  curTime 
)
inline

Definition at line 79 of file OutputUnit.hh.

References outVcState.

Referenced by wakeup().

◆ wakeup()

void OutputUnit::wakeup ( )
virtual

Member Data Documentation

◆ m_credit_link

CreditLink* OutputUnit::m_credit_link
private

Definition at line 106 of file OutputUnit.hh.

Referenced by decrement_credit(), increment_credit(), set_credit_link(), and wakeup().

◆ m_direction

PortDirection OutputUnit::m_direction
private

Definition at line 103 of file OutputUnit.hh.

Referenced by get_direction().

◆ m_id

int M5_CLASS_VAR_USED OutputUnit::m_id
private

Definition at line 102 of file OutputUnit.hh.

◆ m_out_link

NetworkLink* OutputUnit::m_out_link
private

Definition at line 105 of file OutputUnit.hh.

Referenced by get_outlink_id(), insert_flit(), and set_out_link().

◆ m_router

Router* OutputUnit::m_router
private

Definition at line 101 of file OutputUnit.hh.

Referenced by decrement_credit(), increment_credit(), insert_flit(), and OutputUnit().

◆ m_vc_per_vnet

int OutputUnit::m_vc_per_vnet
private

Definition at line 104 of file OutputUnit.hh.

Referenced by getVcsPerVnet(), has_free_vc(), and select_free_vc().

◆ outBuffer

flitBuffer OutputUnit::outBuffer
private

Definition at line 109 of file OutputUnit.hh.

Referenced by functionalWrite(), getOutQueue(), and insert_flit().

◆ outVcState

std::vector<OutVcState> OutputUnit::outVcState
private

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

Generated on Wed Sep 30 2020 14:02:28 for gem5 by doxygen 1.8.17