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

#include <InputUnit.hh>

Inheritance diagram for InputUnit:
Consumer

Public Member Functions

 InputUnit (int id, PortDirection direction, Router *router)
 
 ~InputUnit ()=default
 
void wakeup ()
 
void print (std::ostream &out) const
 
PortDirection get_direction ()
 
void set_vc_idle (int vc, Tick curTime)
 
void set_vc_active (int vc, Tick curTime)
 
void grant_outport (int vc, int outport)
 
void grant_outvc (int vc, int outvc)
 
int get_outport (int invc)
 
int get_outvc (int invc)
 
Tick get_enqueue_time (int invc)
 
void increment_credit (int in_vc, bool free_signal, Tick curTime)
 
flitpeekTopFlit (int vc)
 
flitgetTopFlit (int vc)
 
bool need_stage (int vc, flit_stage stage, Tick time)
 
bool isReady (int invc, Tick curTime)
 
flitBuffergetCreditQueue ()
 
void set_in_link (NetworkLink *link)
 
int get_inlink_id ()
 
void set_credit_link (CreditLink *credit_link)
 
double get_buf_read_activity (unsigned int vnet) const
 
double get_buf_write_activity (unsigned int vnet) const
 
uint32_t functionalWrite (Packet *pkt)
 
void resetStats ()
 
- 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 m_id
 
PortDirection m_direction
 
int m_vc_per_vnet
 
NetworkLinkm_in_link
 
CreditLinkm_credit_link
 
flitBuffer creditQueue
 
std::vector< VirtualChannelvirtualChannels
 
std::vector< double > m_num_buffer_writes
 
std::vector< double > m_num_buffer_reads
 

Detailed Description

Definition at line 46 of file InputUnit.hh.

Constructor & Destructor Documentation

◆ InputUnit()

InputUnit::InputUnit ( int  id,
PortDirection  direction,
Router router 
)

◆ ~InputUnit()

InputUnit::~InputUnit ( )
default

Member Function Documentation

◆ functionalWrite()

uint32_t InputUnit::functionalWrite ( Packet pkt)

Definition at line 149 of file InputUnit.cc.

References virtualChannels.

◆ get_buf_read_activity()

double InputUnit::get_buf_read_activity ( unsigned int  vnet) const
inline

Definition at line 141 of file InputUnit.hh.

References m_num_buffer_reads.

◆ get_buf_write_activity()

double InputUnit::get_buf_write_activity ( unsigned int  vnet) const
inline

Definition at line 143 of file InputUnit.hh.

References m_num_buffer_writes.

◆ get_direction()

PortDirection InputUnit::get_direction ( )
inline

Definition at line 55 of file InputUnit.hh.

References m_direction.

◆ get_enqueue_time()

Tick InputUnit::get_enqueue_time ( int  invc)
inline

Definition at line 94 of file InputUnit.hh.

References virtualChannels.

Referenced by SwitchAllocator::send_allowed().

◆ get_inlink_id()

int InputUnit::get_inlink_id ( )
inline

Definition at line 133 of file InputUnit.hh.

References NetworkLink::get_id(), and m_in_link.

◆ get_outport()

int InputUnit::get_outport ( int  invc)
inline

Definition at line 82 of file InputUnit.hh.

References virtualChannels.

Referenced by SwitchAllocator::arbitrate_inports().

◆ get_outvc()

int InputUnit::get_outvc ( int  invc)
inline

Definition at line 88 of file InputUnit.hh.

References virtualChannels.

◆ getCreditQueue()

flitBuffer* InputUnit::getCreditQueue ( )
inline

Definition at line 125 of file InputUnit.hh.

References creditQueue.

Referenced by Router::addInPort().

◆ getTopFlit()

flit* InputUnit::getTopFlit ( int  vc)
inline

Definition at line 108 of file InputUnit.hh.

References virtualChannels.

◆ grant_outport()

void InputUnit::grant_outport ( int  vc,
int  outport 
)
inline

Definition at line 70 of file InputUnit.hh.

References virtualChannels.

Referenced by wakeup().

◆ grant_outvc()

void InputUnit::grant_outvc ( int  vc,
int  outvc 
)
inline

Definition at line 76 of file InputUnit.hh.

References virtualChannels.

Referenced by SwitchAllocator::vc_allocate().

◆ increment_credit()

void InputUnit::increment_credit ( int  in_vc,
bool  free_signal,
Tick  curTime 
)

◆ isReady()

bool InputUnit::isReady ( int  invc,
Tick  curTime 
)
inline

Definition at line 120 of file InputUnit.hh.

References virtualChannels.

◆ need_stage()

bool InputUnit::need_stage ( int  vc,
flit_stage  stage,
Tick  time 
)
inline

Definition at line 114 of file InputUnit.hh.

References virtualChannels.

Referenced by SwitchAllocator::check_for_wakeup().

◆ peekTopFlit()

flit* InputUnit::peekTopFlit ( int  vc)
inline

Definition at line 102 of file InputUnit.hh.

References virtualChannels.

◆ print()

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

Implements Consumer.

Definition at line 53 of file InputUnit.hh.

◆ resetStats()

void InputUnit::resetStats ( )

Definition at line 160 of file InputUnit.cc.

References ArmISA::j, m_num_buffer_reads, and m_num_buffer_writes.

◆ set_credit_link()

void InputUnit::set_credit_link ( CreditLink credit_link)
inline

Definition at line 136 of file InputUnit.hh.

References m_credit_link.

Referenced by Router::addInPort().

◆ set_in_link()

void InputUnit::set_in_link ( NetworkLink link)
inline

Definition at line 128 of file InputUnit.hh.

References m_in_link.

Referenced by Router::addInPort().

◆ set_vc_active()

void InputUnit::set_vc_active ( int  vc,
Tick  curTime 
)
inline

Definition at line 64 of file InputUnit.hh.

References virtualChannels.

Referenced by wakeup().

◆ set_vc_idle()

void InputUnit::set_vc_idle ( int  vc,
Tick  curTime 
)
inline

Definition at line 58 of file InputUnit.hh.

References virtualChannels.

◆ wakeup()

void InputUnit::wakeup ( )
virtual

Member Data Documentation

◆ creditQueue

flitBuffer InputUnit::creditQueue
private

Definition at line 156 of file InputUnit.hh.

Referenced by getCreditQueue(), and increment_credit().

◆ m_credit_link

CreditLink* InputUnit::m_credit_link
private

Definition at line 155 of file InputUnit.hh.

Referenced by increment_credit(), and set_credit_link().

◆ m_direction

PortDirection InputUnit::m_direction
private

Definition at line 152 of file InputUnit.hh.

Referenced by get_direction(), and wakeup().

◆ m_id

int InputUnit::m_id
private

Definition at line 151 of file InputUnit.hh.

Referenced by wakeup().

◆ m_in_link

NetworkLink* InputUnit::m_in_link
private

Definition at line 154 of file InputUnit.hh.

Referenced by get_inlink_id(), set_in_link(), and wakeup().

◆ m_num_buffer_reads

std::vector<double> InputUnit::m_num_buffer_reads
private

Definition at line 163 of file InputUnit.hh.

Referenced by get_buf_read_activity(), InputUnit(), resetStats(), and wakeup().

◆ m_num_buffer_writes

std::vector<double> InputUnit::m_num_buffer_writes
private

Definition at line 162 of file InputUnit.hh.

Referenced by get_buf_write_activity(), InputUnit(), resetStats(), and wakeup().

◆ m_router

Router* InputUnit::m_router
private

Definition at line 150 of file InputUnit.hh.

Referenced by increment_credit(), InputUnit(), and wakeup().

◆ m_vc_per_vnet

int InputUnit::m_vc_per_vnet
private

Definition at line 153 of file InputUnit.hh.

Referenced by InputUnit(), and wakeup().

◆ virtualChannels

std::vector<VirtualChannel> InputUnit::virtualChannels
private

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

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