INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
|
Tools for the transit queues used in FSIN routers. More...
#include "globals.h"
Functions | |
void | init_queue (queue *q) |
long | queue_len (queue *q) |
long | queue_space (queue *q) |
phit * | head_queue (queue *q) |
void | ins_queue (queue *q, phit *i) |
void | ins_mult_queue (queue *q, phit *i, long copies) |
void | rem_queue (queue *q, phit *i) |
void | rem_head_queue (queue *q) |
Tools for the transit queues used in FSIN routers.
FSIN Functional Simulator of Interconnection Networks Copyright (2003-2011) J. Miguel-Alonso, A. Gonzalez
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Looks at the first phit of a queue.
Requires a non-empty queue. Otherwise, panics
q | A queue. |
void init_queue | ( | queue * | q | ) |
Initializes a queue.
Making it empty.
q | The queue to initialize. |
Inserts many (identical) copies of a phit "i" in queue "q"
Requires enough space. Otherwise, panics.
q | A queue. |
i | The phit to be cloned & inserted. |
copies | Number of clones of i. |
Inserts a phit in a queue.
Requires a buffer with room for the phit. Otherwise, panics
q | A queue. |
i | The phit to be inserted. |
long queue_len | ( | queue * | q | ) |
Calculates the length of a queue.
q | A queue. |
long queue_space | ( | queue * | q | ) |
Calculates the free space in a queue.
q | A queue. |
void rem_head_queue | ( | queue * | q | ) |
Removes the head of queue.
Does not return anything. Requires a non-empty queue. Otherwise, panics.
q | A queue. |