void getNeighbours(int nodeid, int numP);
This is called initially for every switch and this populates the
data structure next in a switch which contains the connectivity
of that switch. The switch specified by switch has numP ports.
int getNext(int portid, int nodeid, int numP)
Returns the index of the switch/node that is connected to the
switch nodeid, at portid. The number of ports this node has is numP.
int getNextChannel(int portid, int nodeid, int numP)
Returns the index of the channel that is connected to the
switch nodeid, at portid. The number of ports this node has is numP.
int getStartPort(int nodeid, int numP, int dest)
Return the index of the port that is connected to this compute node from a switch
int getStartVc()
Returns the index of the first virtual channel (mostly 0).
int getStartSwitch(int nodeid)
Returns the index of the node/switch that is connected to the first port
int getStartNode()
Returns the index of the first node. Each poser has a separate index,
irrespective of the type of the poser.
int getEndNode()
Returns the index of the last node.
int selectRoute(int current, int dest, int numP, Topology* top, Packet *p, map<int,int> &bufsize, unsigned short *xsubi)
Returns the portid that should be taken on switch current if the destination
is dest. The number of ports on a switch is numP. We also pass the pointer
to the topology and to the Packet.
int selectRoute(int current, int dest, int numP, Topology* top, Packet *p, map<int,int> &bufsize, map<int,int> &portContention, unsigned short *xsubi)
Returns the portid that should be taken on switch current if the destination
is dest. The number of ports on a switch is numP. We also pass the pointer
to the topology and to the Packet. Bufsize is the state of the ports in
a switch, i.e. how many buffers on each port are full, while portContention
is used to give priority to certain ports, when more options are available.
int expectedTime(int src, int dest, POSE_TimeType ovt, POSE_TimeType origOvt, int length, int *numHops)
Returns the expected time for a packet to travel from src to dest,
when the number of hops it will need to travel is numHops.
int convertOutputToInputPort(int id, Packet *p, int numP, int *next)
Translate this output port to input port on the switch this port is
connected to.
int selectInputVc(map<int,int> &availBuffer, map<int,int> &request, map<int,vector<Header> > &inBuffer, int globalVc, int curSwitch)
Returns the input virtual channel to be used depending on the strategy and
the input parameters.
int selectOutputVc(map<int,int> &bufsize, Packet *p, int unused)
Returns the output virtual channel to be used depending on the strategy and
the input parameters.
November 23, 2009
Charm Homepage