SST/macro
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
sstmac::hw::packet_flow_switch Class Reference

A switch in the network that arbitrates/routes packet_trains to the next link in the network. More...

#include <packet_flow_switch.h>

Inheritance diagram for sstmac::hw::packet_flow_switch:
Inheritance graph
Collaboration diagram for sstmac::hw::packet_flow_switch:
Collaboration graph

Public Member Functions

 packet_flow_switch ()
 
virtual ~packet_flow_switch ()
 
virtual void initialize ()
 
packet_flow_crossbar * crossbar (config *cfg)
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
int queue_length (int port) const
 
int initial_credits () const
 
virtual void connect (int src_outport, int dst_inport, connection_type_t ty, connectable *mod, config *cfg)
 
std::vector< switch_id > connected_switches () const
 
void handle (event *ev)
 Cast message and pass to #send. More...
 
void deadlock_check ()
 
void deadlock_check (event *ev)
 
void add_ejector (node_id addr, event_handler *link)
 Set the link to use when ejecting packets at their endpoint. More...
 
virtual void set_event_manager (event_manager *m)
 
void set_topology (topology *top)
 
virtual std::string to_string () const
 
- Public Member Functions inherited from sstmac::hw::packet_flow_abstract_switch
timestamp hop_latency () const
 
timestamp lookahead () const
 
double hop_bandwidth () const
 
packet_sent_stats * xbar_stats () const
 
packet_sent_stats * buf_stats () const
 

Protected Member Functions

virtual void connect_injector (int src_outport, int dst_inport, event_handler *nic)
 
virtual void connect_ejector (int src_outport, int dst_inport, event_handler *nic)
 
- Protected Member Functions inherited from sstmac::hw::packet_flow_abstract_switch
 packet_flow_abstract_switch ()
 
virtual ~packet_flow_abstract_switch ()
 

Protected Attributes

sprockit::sim_parameters * params_
 
std::vector< packet_flow_sender * > out_buffers_
 
packet_flow_crossbar * xbar_
 
- Protected Attributes inherited from sstmac::hw::packet_flow_abstract_switch
int packet_size_
 
double link_bw
 
double ej_bw
 
int xbar_output_buffer_num_bytes
 
int xbar_input_buffer_num_bytes
 
double xbar_bw
 
int row_buffer_num_bytes
 
timestamp hop_lat
 
packet_flow_bandwidth_arbitrator * link_arbitrator_template
 
packet_sent_stats * xbar_stats_
 
packet_sent_stats * buf_stats_
 

Private Member Functions

void connect_output (int src_outport, int dst_inport, connectable *mod, config *cfg)
 
void connect_input (int src_outport, int dst_inport, connectable *mod, config *cfg)
 
void resize_buffers ()
 
packet_flow_sender * output_buffer (int port, config *cfg)
 

Detailed Description

A switch in the network that arbitrates/routes packet_trains to the next link in the network.

Definition at line 95 of file packet_flow_switch.h.

Constructor & Destructor Documentation

sstmac::hw::packet_flow_switch::packet_flow_switch ( )
virtual sstmac::hw::packet_flow_switch::~packet_flow_switch ( )
virtual

Member Function Documentation

void sstmac::hw::packet_flow_switch::add_ejector ( node_id  addr,
event_handler *  link 
)

Set the link to use when ejecting packets at their endpoint.

A packet_flow_switch can have any number of ejectors, corresponding to the number of nodes per switch.

Parameters
addrThe compute node address of the endpoint to eject to
linkThe link to the compute node for ejection
virtual void sstmac::hw::packet_flow_switch::connect ( int  src_outport,
int  dst_inport,
connection_type_t  ty,
connectable *  mod,
config *  cfg 
)
virtual
virtual void sstmac::hw::packet_flow_switch::connect_ejector ( int  src_outport,
int  dst_inport,
event_handler *  nic 
)
protectedvirtual
virtual void sstmac::hw::packet_flow_switch::connect_injector ( int  src_outport,
int  dst_inport,
event_handler *  nic 
)
protectedvirtual
void sstmac::hw::packet_flow_switch::connect_input ( int  src_outport,
int  dst_inport,
connectable *  mod,
config *  cfg 
)
private
void sstmac::hw::packet_flow_switch::connect_output ( int  src_outport,
int  dst_inport,
connectable *  mod,
config *  cfg 
)
private
std::vector<switch_id> sstmac::hw::packet_flow_switch::connected_switches ( ) const
packet_flow_crossbar* sstmac::hw::packet_flow_switch::crossbar ( config *  cfg)
void sstmac::hw::packet_flow_switch::deadlock_check ( )
void sstmac::hw::packet_flow_switch::deadlock_check ( event *  ev)
void sstmac::hw::packet_flow_switch::handle ( event *  ev)

Cast message and pass to #send.

Parameters
msgIncoming message (should cast to packet_train)
virtual void sstmac::hw::packet_flow_switch::init_factory_params ( sprockit::sim_parameters *  params)
virtual
int sstmac::hw::packet_flow_switch::initial_credits ( ) const
inlinevirtual
virtual void sstmac::hw::packet_flow_switch::initialize ( )
virtual
packet_flow_sender* sstmac::hw::packet_flow_switch::output_buffer ( int  port,
config *  cfg 
)
private
int sstmac::hw::packet_flow_switch::queue_length ( int  port) const
void sstmac::hw::packet_flow_switch::resize_buffers ( )
private
virtual void sstmac::hw::packet_flow_switch::set_event_manager ( event_manager *  m)
virtual
void sstmac::hw::packet_flow_switch::set_topology ( topology *  top)
virtual std::string sstmac::hw::packet_flow_switch::to_string ( ) const
virtual

Member Data Documentation

std::vector<packet_flow_sender*> sstmac::hw::packet_flow_switch::out_buffers_
protected

Definition at line 181 of file packet_flow_switch.h.

sprockit::sim_parameters* sstmac::hw::packet_flow_switch::params_
protected

Definition at line 179 of file packet_flow_switch.h.

packet_flow_crossbar* sstmac::hw::packet_flow_switch::xbar_
protected

Definition at line 183 of file packet_flow_switch.h.


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