SST/macro
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
sstmac::hw::nic Class Referenceabstract

A networkinterface is a delegate between a node and a server module. More...

#include <nic.h>

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

Public Member Functions

virtual std::string to_string () const =0
 
virtual ~nic ()
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 Initialize all member variables from the parameters object. More...
 
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...
 
virtual void handle (event *ev)=0
 
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...
 
virtual timestamp injection_latency () const =0
 
virtual double injection_bandwidth () const =0
 
virtual void set_event_parent (event_scheduler *m)
 Set the eventmanager for this scheduler. 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::connectable
virtual void connect (int src_outport, int dst_inport, connection_type_t ty, connectable *mod, config *cfg)=0
 connect More...
 

Static Public Member Functions

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)
 

Protected Member Functions

 nic (sprockit::factory_type *interconn)
 
virtual void do_send (network_message *payload)=0
 Start the message sending and inject it into the network This performs all model-specific work. More...
 
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

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_
 

Private Member Functions

void ack_send (network_message *payload)
 For messages requiring an NIC ACK to signal that the message has injected into the interconnect. More...
 
void send_to_interconn (network_message *netmsg)
 
void record_message (network_message *msg)
 

Private Attributes

stat_spyplotspy_num_messages_
 
stat_spyplotspy_bytes_
 
stat_histogramhist_msg_size_
 
stat_local_intlocal_bytes_sent_
 
stat_global_intglobal_bytes_sent_
 
event_handlermtl_handler_
 

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 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

A networkinterface is a delegate between a node and a server module.

This object helps ornament network operations with information about the process (ppid) involved.

Definition at line 45 of file nic.h.

Constructor & Destructor Documentation

virtual sstmac::hw::nic::~nic ( )
virtual
sstmac::hw::nic::nic ( sprockit::factory_type interconn)
protected

Referenced by mtl_handler().

Member Function Documentation

void sstmac::hw::nic::ack_send ( network_message payload)
private

For messages requiring an NIC ACK to signal that the message has injected into the interconnect.

Create an ack and send it up to the parent node.

node_id sstmac::hw::nic::addr ( ) const
inline
Returns
A unique ID for the NIC positions. Opaque typedef to an int.

Definition at line 71 of file nic.h.

References my_addr_.

Referenced by sstmac::hw::packet_flow_nic::to_string().

static void sstmac::hw::nic::delete_statics ( )
static

Delete all static variables associated with this class.

This should be registered with the runtime system via need_delete_statics

Referenced by set_node().

virtual void sstmac::hw::nic::do_send ( network_message payload)
protectedpure virtual

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

Parameters
payloadThe network message to send

Implemented in sstmac::hw::packet_flow_nic, and sstmac::hw::simple_nic.

Referenced by mtl_handler().

virtual void sstmac::hw::nic::finalize_init ( )
virtual

A final initialization function called for the object after all parameters have been read.

Guarantees initialization of all subclass variables.

Reimplemented from sprockit::factory_type.

Reimplemented in sstmac::hw::simple_nic.

Referenced by set_node().

virtual void sstmac::hw::nic::handle ( event ev)
pure virtual

Reimplemented from sstmac::event_subscheduler.

Implemented in sstmac::hw::packet_flow_nic, and sstmac::hw::simple_nic.

Referenced by set_node().

virtual void sstmac::hw::nic::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Initialize all member variables from the parameters object.

Parameters
params

Reimplemented in sstmac::hw::packet_flow_nic, sstmac::hw::simple_nic, and sstmac::hw::null_nic.

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

Implemented in sstmac::hw::packet_flow_nic, and sstmac::hw::simple_nic.

Referenced by mtl_handler().

void sstmac::hw::nic::internode_send ( network_message payload)

Perform the set of operations standard to all NICs.

This then passes control off to a model-specific do_send function to actually carry out the send

Parameters
payloadThe network message to send

Referenced by mtl_handler().

void sstmac::hw::nic::intranode_send ( network_message payload)

Perform the set of operations standard to all NICs for transfers within a node.

This function is model-independent, unlike internode_send which must pass control to do_send.

Parameters
payload

Referenced by mtl_handler().

void sstmac::hw::nic::mtl_handle ( event ev)

Referenced by set_node().

event_handler* sstmac::hw::nic::mtl_handler ( ) const
inline

Definition at line 105 of file nic.h.

References do_send(), injection_bandwidth(), injection_latency(), internode_send(), intranode_send(), mtl_handler_, nic(), send_to_node(), and set_event_parent().

Here is the call graph for this function:

bool sstmac::hw::nic::negligible_size ( int  bytes) const
inlineprotected

Definition at line 156 of file nic.h.

References negligible_size_, and recv_message().

Here is the call graph for this function:

void sstmac::hw::nic::record_message ( network_message msg)
private
void sstmac::hw::nic::recv_message ( message msg)
protected

The NIC can either receive an entire message (bypass the byte-transfer layer) or it can receive packets.

If an incoming message is a full message (not a packet), it gets routed here. Unlike #recv_chunk, this has a default implementation and does not throw.

Parameters
chunk

Referenced by negligible_size(), and sstmac::hw::packet_flow_nic::notify().

void sstmac::hw::nic::send_to_interconn ( network_message netmsg)
private
void sstmac::hw::nic::send_to_node ( network_message netmsg)
protected

Referenced by mtl_handler().

virtual void sstmac::hw::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::event_subscheduler.

Reimplemented in sstmac::hw::packet_flow_nic.

Referenced by mtl_handler().

virtual void sstmac::hw::nic::set_node ( node nd)
inlinevirtual

Set an event handler wrapper encapsulation the parent computational unit.

Parameters
ndThe compute node attached to the NIC

Definition at line 80 of file nic.h.

References delete_statics(), finalize_init(), handle(), mtl_handle(), and parent_.

Here is the call graph for this function:

virtual std::string sstmac::hw::nic::to_string ( ) const
pure virtual

Member Data Documentation

stat_global_int* sstmac::hw::nic::global_bytes_sent_
private

Definition at line 182 of file nic.h.

stat_histogram* sstmac::hw::nic::hist_msg_size_
private

Definition at line 180 of file nic.h.

interconnect* sstmac::hw::nic::interconn_
protected

Definition at line 174 of file nic.h.

stat_local_int* sstmac::hw::nic::local_bytes_sent_
private

Definition at line 181 of file nic.h.

event_handler* sstmac::hw::nic::mtl_handler_
private

Definition at line 183 of file nic.h.

Referenced by mtl_handler().

node_id sstmac::hw::nic::my_addr_
protected

Definition at line 170 of file nic.h.

Referenced by addr(), and sstmac::hw::null_nic::to_string().

int sstmac::hw::nic::negligible_size_
protected

Definition at line 172 of file nic.h.

Referenced by negligible_size().

node* sstmac::hw::nic::parent_
protected

Definition at line 175 of file nic.h.

Referenced by set_node().

stat_spyplot* sstmac::hw::nic::spy_bytes_
private

Definition at line 179 of file nic.h.

stat_spyplot* sstmac::hw::nic::spy_num_messages_
private

Definition at line 178 of file nic.h.


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