spinnaker_tools 3.4.0
SpiNNaker API, sark, sc&mp, bmp firmware and build tools
|
Packet handling routines for SARK. More...
#include <sark.h>
Functions | |
void | txpkt_int_han (void) |
SpiNNaker packet may be transmitted interrupt handler. | |
void | event_register_pkt (uint queue_size, vic_slot slot) |
Register the use of "pkt" routines. | |
uint | pkt_tx_kdc (uint key, uint data, uint ctrl) |
Transmit a packet which contains key, data and control byte (cb) fields. | |
uint | pkt_tx_kd (uint key, uint data) |
Transmit a packet which contains key and data fields. | |
uint | pkt_tx_k (uint key) |
Transmit a packet which contains only a key. | |
uint | pkt_tx_kc (uint key, uint ctrl) |
Transmit a packet which contains key and control byte (cb) fields. | |
Packet handling routines for SARK.
|
extern |
SpiNNaker packet may be transmitted interrupt handler.
Sends the next packet on the event_data_t::pkt_queue. Disables itself if no packet is waiting.
Register the use of "pkt" routines.
An interrupt handler needs to be installed and assigned to a VIC slot. In addition, the size of the transmit packet queue must be specified. It should be a power of two no larger than 256 and refers to the number of packets in the queue. A run time error will occur if the queue size is invalid, the VIC slot is in use or memory for the packet queue could not be allocated. This routine also initialises the Transmit Control Register to send multicast packets.
queue_size | number of packets in the transmit queue |
slot | the VIC slot to use for the packet transmit interrupt |
Transmit a packet which contains key, data and control byte (cb) fields.
The packet is placed on a transmit queue and sent when it reaches the head of the queue. The "ctrl" field is in the bottom 8 bits of the argument and is shifted left by 16 bits when it is placed in the hardware TCR in the chip.
key | the key field to be placed in the packet |
data | the key field to be placed in the packet |
ctrl | the control byte to be placed in the packet |
Transmit a packet which contains key and data fields.
The packet is placed on a transmit queue and sent when it reaches the head of the queue. The transmit control register (TCR) which controls the type of packet which is sent is not modified by this routine so the previous value will be used.
key; | the key field to be placed in the packet |
data | the data field to be placed in the packet |
Transmit a packet which contains only a key.
The packet is placed on a transmit queue and sent when it reaches the head of the queue. The transmit control register (TCR) which controls the type of packet which is sent is not modified by this routine so the previous value will be used. The routine pkt_register must be called (once) before any of the pkt_tx_XXX routines are used.
key | the key field to be placed in the packet |
Transmit a packet which contains key and control byte (cb) fields.
The packet is placed on a transmit queue and sent when it reaches the head of the queue. The "ctrl" field is in the bottom 8 bits of the argument and is shifted left by 16 bits when it is placed in the hardware TCR in the chip.
key | the key field to be placed in the packet |
ctrl | the control byte to be placed in the packet |