|
SpiNNFrontEndCommon
development
Common support code for user-facing front end systems.
|
The implementation of the Command Sender Multicast Source. More...
#include <common-typedefs.h>#include <data_specification.h>#include <debug.h>#include <simulation.h>#include <stdbool.h>Go to the source code of this file.
Data Structures | |
| struct | command |
| Command structure, describing a SpiNNaker multicast packet to be sent at some point. More... | |
| struct | timed_command |
| A command that happens at a particular simulation time. More... | |
| struct | command_list |
| A collection of commands to be sent in response to an event. More... | |
| struct | timed_command_list |
| A collection of commands to be sent at particular simulation times. More... | |
| struct | cs_provenance_t |
| custom provenance data More... | |
Enumerations | |
| enum | callback_priorities { SDP = 0 , DMA = 1 , TIMER = 2 , SDP = 0 , DMA = 0 } |
| values for the priority for each callback More... | |
| enum | region_identifiers { SYSTEM_REGION = 0 , COMMANDS_WITH_ARBITRARY_TIMES , COMMANDS_AT_START_RESUME , COMMANDS_AT_STOP_PAUSE , PROVENANCE_REGION } |
| region identifiers More... | |
| enum | { FIRST_TIME = 0 } |
| time ID | |
Functions | |
| static void | transmit_command (command *command_to_send) |
| Immediately sends SpiNNaker multicast packets in response to a command. More... | |
| static void | run_stop_pause_commands (void) |
| Sends all the commands registered for sending on simulation stop or pause. | |
| static void | run_start_resume_commands (void) |
| Sends all the commands registered for sending on simulation start or resume. | |
| static bool | read_scheduled_parameters (timed_command_list *sdram_timed_commands) |
| Copy the list of commands to run at particular times into DTCM. More... | |
| static bool | read_start_resume_commands (command_list *sdram_commands) |
| Copy the list of commands to run on start or resume into DTCM. More... | |
| static bool | read_pause_stop_commands (command_list *sdram_commands) |
| Copy the list of commands to run on stop or pause into DTCM. More... | |
| static void | timer_callback (uint unused0, uint unused1) |
| The timer tick callback. Sends those commands that are due in the current simulation state and time. More... | |
| static void | write_provenance (address_t address) |
| Write our provenance data into the provenance region. More... | |
| static bool | initialize (uint32_t *timer_period) |
| Initialises the core. More... | |
| void | c_main (void) |
| Entry point. | |
Variables | |
| static uint32_t | time |
| The simulation timer. | |
| static uint32_t | simulation_ticks |
| The number of ticks to run for. | |
| static uint32_t | infinite_run |
| Whether the simulation is running "forever" (robotics mode). | |
| static timed_command * | timed_commands |
| The commands to send at particular times. | |
| static command * | start_resume_commands |
| The commands to run when a simulation starts or resumes after pause. | |
| static command * | pause_stop_commands |
| The commands to run when a simulation stops or pauses. | |
| static uint32_t | n_timed_commands |
| The number of timed commands. | |
| static uint32_t | n_start_resume_commands |
| The number of commands to send on start/resume. | |
| static uint32_t | n_pause_stop_commands |
| The number of commands to send on stop/pause. | |
| static uint32_t | next_timed_command |
| The index of the next timed command to run. | |
| static bool | resume = true |
| Whether we are in the state where the next run will be a start/resume. | |
| static uint32_t | n_commands_sent |
| The number of commands sent. | |
The implementation of the Command Sender Multicast Source.
The purpose of this application is to inject SpiNNaker packets into the on-chip network at specified times. It is used (among other things) to implement the SpikeSourceArray model in sPyNNaker.
Definition in file command_sender_multicast_source.c.
| struct command |
Command structure, describing a SpiNNaker multicast packet to be sent at some point.
Note that the delay actually comes after sending each mandated packet when repeats are requested rather than just between packets.
Definition at line 36 of file command_sender_multicast_source.c.
| struct timed_command |
A command that happens at a particular simulation time.
Definition at line 51 of file command_sender_multicast_source.c.
| Data Fields | ||
|---|---|---|
| uint32_t | time | The simulation time to send a packet. |
| command | command | What to send. |
| struct command_list |
A collection of commands to be sent in response to an event.
This is used for SDRAM only.
Definition at line 59 of file command_sender_multicast_source.c.
| Data Fields | ||
|---|---|---|
| uint32_t | size | The number of commands to send. |
| command | commands[] | The commands to send. |
| struct timed_command_list |
A collection of commands to be sent at particular simulation times.
This is used for SDRAM only.
Definition at line 67 of file command_sender_multicast_source.c.
| Data Fields | ||
|---|---|---|
| uint32_t | size | The number of commands to send. |
| timed_command | commands[] | The commands to send, sorted in time order. |
| struct cs_provenance_t |
custom provenance data
Definition at line 123 of file command_sender_multicast_source.c.
| Data Fields | ||
|---|---|---|
| uint32_t | n_commands_sent | The number of commands sent. |
| enum callback_priorities |
values for the priority for each callback
| Enumerator | |
|---|---|
| SDP | Responding to network traffic is highest priority. |
| DMA | Handling memory transfers is next highest. |
| TIMER | Responding to timers is lowest priority, and most common. |
Definition at line 99 of file command_sender_multicast_source.c.
| enum region_identifiers |
region identifiers
| Enumerator | |
|---|---|
| SYSTEM_REGION | Where simulation system information is stored. |
| COMMANDS_WITH_ARBITRARY_TIMES | Where to read timed commands from. The region is formatted as a timed_command_list. |
| COMMANDS_AT_START_RESUME | Where to read start/resume commands from. The region is formatted as a command_list. |
| COMMANDS_AT_STOP_PAUSE | Where to read stop/pause commands from. The region is formatted as a command_list. |
| PROVENANCE_REGION | Where to record provenance data. (Format: cs_provenance_t) |
Definition at line 106 of file command_sender_multicast_source.c.
|
static |
Immediately sends SpiNNaker multicast packets in response to a command.
| [in] | command_to_send | The command to send. |
Definition at line 136 of file command_sender_multicast_source.c.
|
static |
Copy the list of commands to run at particular times into DTCM.
| [in] | sdram_timed_commands | The memory region containing the description of what commands to send and when. |
Definition at line 203 of file command_sender_multicast_source.c.
|
static |
Copy the list of commands to run on start or resume into DTCM.
| [in] | sdram_commands | The memory region containing the description of what commands to send. |
Definition at line 232 of file command_sender_multicast_source.c.
|
static |
Copy the list of commands to run on stop or pause into DTCM.
| [in] | sdram_commands | The memory region containing the description of what commands to send. |
Definition at line 257 of file command_sender_multicast_source.c.
|
static |
The timer tick callback. Sends those commands that are due in the current simulation state and time.
| unused0 | unused |
| unused1 | unused |
Definition at line 284 of file command_sender_multicast_source.c.
|
static |
Write our provenance data into the provenance region.
| [in] | address | Where to write |
Definition at line 318 of file command_sender_multicast_source.c.
|
static |
Initialises the core.
| [out] | timer_period | The timer tick period. |
Definition at line 326 of file command_sender_multicast_source.c.