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

Network interface compatible with sending packet trains. More...

#include <packet_flow_nic.h>

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

Public Member Functions

 packet_flow_nic (sprockit::factory_type *interconn)
 
std::string to_string () const
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 Initialize all member variables from the parameters object. More...
 
virtual ~packet_flow_nic () throw ()
 
void handle (event *ev)
 
void notify (int vn, message *msg)
 
virtual void connect (int src_outport, int dst_inport, connection_type_t ty, connectable *mod, config *cfg)
 connect More...
 
virtual void set_event_parent (event_scheduler *m)
 Set the eventmanager for this scheduler. More...
 
timestamp injection_latency () const
 
double injection_bandwidth () const
 
int initial_credits () const
 
- Public Member Functions inherited from sstmac::hw::nic
virtual ~nic ()
 
node_id addr () const
 
virtual void set_node (node *nd)
 Set an event handler wrapper encapsulation the parent computational unit. More...
 
virtual void finalize_init ()
 A final initialization function called for the object after all parameters have been read. More...
 
void mtl_handle (event *ev)
 
event_handlermtl_handler () const
 
void internode_send (network_message *payload)
 Perform the set of operations standard to all NICs. More...
 
void intranode_send (network_message *payload)
 Perform the set of operations standard to all NICs for transfers within a node. More...
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
- Public Member Functions inherited from sstmac::hw::failable
bool failed () const
 
void fail ()
 
- Public Member Functions inherited from sstmac::event_subscheduler
 event_subscheduler ()
 
timestamp now () const
 get the current time More...
 
void schedule (timestamp t, event_handler *handler, event *ev)
 Add an event to the event queue, where msg will get delivered to handler at time t. More...
 
void schedule (timestamp t, event_queue_entry *ev)
 
void schedule_now (event_queue_entry *ev)
 
void schedule_now (event_handler *handler, event *ev)
 
void schedule_delay (timestamp delay, event_handler *handler, event *ev)
 
void schedule_delay (timestamp delay, event_queue_entry *ev)
 
void send_self_event (timestamp arrival, event *ev)
 
void send_delayed_self_event (timestamp delay, event *ev)
 
void send_now_self_event (event *ev)
 
void send_self_event_queue (timestamp arrival, event_queue_entry *ev)
 
void send_delayed_self_event_queue (timestamp delay, event_queue_entry *ev)
 
void send_now_self_event_queue (event_queue_entry *ev)
 
event_schedulerparent () const
 
- Public Member Functions inherited from sstmac::event_handler
virtual ~event_handler ()
 
event_loc_id event_location () const
 
virtual bool ipc_handler () const
 Whether an event handler is a "fake" handler that represents logical process boundary. More...
 
int thread_id () const
 
virtual void deadlock_check (event *ev)
 
virtual void deadlock_check ()
 
- Public Member Functions inherited from sstmac::hw::packetizer_callback
virtual ~packetizer_callback ()
 

Protected Member Functions

virtual void do_send (network_message *payload)
 Start the message sending and inject it into the network This performs all model-specific work. More...
 
- Protected Member Functions inherited from sstmac::hw::nic
 nic (sprockit::factory_type *interconn)
 
void send_to_node (network_message *netmsg)
 
bool negligible_size (int bytes) const
 
void recv_message (message *msg)
 The NIC can either receive an entire message (bypass the byte-transfer layer) or it can receive packets. More...
 
- Protected Member Functions inherited from sstmac::hw::failable
 failable ()
 
- Protected Member Functions inherited from sstmac::event_handler
 event_handler ()
 
void init_loc_id (event_loc_id id)
 
void init_thread_id (int id)
 

Protected Attributes

packetizerpacketizer_
 
timestamp inj_lat_
 
int injection_credits_
 
- Protected Attributes inherited from sstmac::hw::nic
node_id my_addr_
 
int negligible_size_
 
interconnect * interconn_
 
nodeparent_
 
- Protected Attributes inherited from sstmac::hw::failable
bool failed_
 
- Protected Attributes inherited from sstmac::event_subscheduler
event_schedulerparent_
 

Additional Inherited Members

- Public Types inherited from sstmac::hw::connectable
enum  config_type_t {
  RedundantConnection =0, WeightedConnection =1, FixedBandwidthConnection =2, FixedConnection =3,
  BasicConnection =4
}
 
enum  connection_type_t { output, input }
 
- Static Public Member Functions inherited from sstmac::hw::nic
static void delete_statics ()
 Delete all static variables associated with this class. More...
 
- Static Public Member Functions inherited from sstmac::hw::connectable
static const char * str (connection_type_t ty)
 
- Static Public Attributes inherited from sstmac::event_handler
static const int null_lpid = -1
 
static const int null_threadid = -1
 
- Static Public Attributes inherited from sstmac::hw::connectable
static const int any_port = -1
 

Detailed Description

Network interface compatible with sending packet trains.

Definition at line 18 of file packet_flow_nic.h.

Constructor & Destructor Documentation

sstmac::hw::packet_flow_nic::packet_flow_nic ( sprockit::factory_type interconn)
inline

Definition at line 25 of file packet_flow_nic.h.

virtual sstmac::hw::packet_flow_nic::~packet_flow_nic ( )
throw (
)
virtual

Referenced by to_string().

Member Function Documentation

virtual void sstmac::hw::packet_flow_nic::connect ( int  src_outport,
int  dst_inport,
connection_type_t  ty,
connectable mod,
config cfg 
)
virtual

connect

Parameters
src_outportThe outgoing port at the source
dst_inportThe incoming port at the destination
tyWhether we are configuring the input or output direction
modThe device currently being connected
cfgA struct with various special configuration options

Implements sstmac::hw::connectable.

Referenced by notify(), and sstmac::hw::packet_flow_netlink::to_string().

virtual void sstmac::hw::packet_flow_nic::do_send ( network_message payload)
protectedvirtual

Start the message sending and inject it into the network This performs all model-specific work.

Parameters
payloadThe network message to send

Implements sstmac::hw::nic.

Referenced by initial_credits().

void sstmac::hw::packet_flow_nic::handle ( event ev)
virtual
virtual void sstmac::hw::packet_flow_nic::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Initialize all member variables from the parameters object.

Parameters
params

Reimplemented from sstmac::hw::nic.

Referenced by to_string(), and sstmac::hw::packet_flow_netlink::to_string().

int sstmac::hw::packet_flow_nic::initial_credits ( ) const
inline

Definition at line 73 of file packet_flow_nic.h.

References do_send(), and injection_credits_.

Here is the call graph for this function:

double sstmac::hw::packet_flow_nic::injection_bandwidth ( ) const
virtual

Implements sstmac::hw::nic.

Referenced by injection_latency().

timestamp sstmac::hw::packet_flow_nic::injection_latency ( ) const
inlinevirtual
Returns
The injection latency for moving a packet from the NIC to the first network router (or netlink block, etc)

Implements sstmac::hw::nic.

Definition at line 65 of file packet_flow_nic.h.

References inj_lat_, and injection_bandwidth().

Here is the call graph for this function:

void sstmac::hw::packet_flow_nic::notify ( int  vn,
message msg 
)
inlinevirtual

Implements sstmac::hw::packetizer_callback.

Definition at line 49 of file packet_flow_nic.h.

References connect(), sstmac::hw::nic::recv_message(), and set_event_parent().

Here is the call graph for this function:

virtual void sstmac::hw::packet_flow_nic::set_event_parent ( event_scheduler m)
virtual

Set the eventmanager for this scheduler.

Unfortunately, this always has to be called after an event_scheduler is constructed.

Parameters
mthe simulation eventmanager

Reimplemented from sstmac::hw::nic.

Referenced by notify(), and sstmac::hw::packet_flow_netlink::to_string().

std::string sstmac::hw::packet_flow_nic::to_string ( ) const
inlinevirtual

Implements sstmac::hw::nic.

Definition at line 33 of file packet_flow_nic.h.

References sstmac::hw::nic::addr(), handle(), init_factory_params(), sstmac::event_subscheduler::parent(), sprockit::printf(), and ~packet_flow_nic().

Here is the call graph for this function:

Member Data Documentation

timestamp sstmac::hw::packet_flow_nic::inj_lat_
protected

Definition at line 83 of file packet_flow_nic.h.

Referenced by injection_latency().

int sstmac::hw::packet_flow_nic::injection_credits_
protected

Definition at line 84 of file packet_flow_nic.h.

Referenced by initial_credits().

packetizer* sstmac::hw::packet_flow_nic::packetizer_
protected

Definition at line 82 of file packet_flow_nic.h.


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