sPyNNaker neural_modelling 7.2.2
|
This file contains the main function of the application framework, which the application programmer uses to configure and run applications. More...
#include "c_main_neuron_common.h"
#include "c_main_common.h"
#include "profile_tags.h"
#include "dma_common.h"
#include <spin1_api_params.h>
Go to the source code of this file.
Data Structures | |
struct | sdram_config |
A region of SDRAM used to transfer synapses. More... | |
struct | neurons_provenance |
Provenance for this specific core. More... | |
Macros | |
#define | N_SYNAPTIC_BUFFERS 2 |
The number of buffers for synaptic data (one processing, one in progress) | |
Enumerations | |
enum | callback_priorities { DMA = -2 , SDP = 0 , TIMER = 0 } |
values for the priority for each callback More... | |
enum | regions { SYSTEM_REGION , CORE_PARAMS_REGION , PROVENANCE_DATA_REGION , PROFILER_REGION , RECORDING_REGION , NEURON_PARAMS_REGION , CURRENT_SOURCE_PARAMS_REGION , NEURON_RECORDING_REGION , SDRAM_PARAMS_REGION , INITIAL_VALUES_REGION } |
Overall regions to be used by the neuron core. More... | |
Functions | |
static void | store_provenance_data (address_t provenance_region) |
Callback to store provenance data (format: neuron_provenance). | |
void | resume_callback (void) |
the function to call when resuming a simulation | |
static void | sum (weight_t *syns) |
Add up all the synaptic contributions into a global buffer. | |
void | timer_callback (uint timer_count, uint unused) |
Timer interrupt callback. | |
static bool | initialise (void) |
Initialises the model by reading in the regions and checking recording data. | |
void | c_main (void) |
The entry point for this model. | |
Variables | ||
const struct common_regions | COMMON_REGIONS | |
From the regions, select those that are common. | ||
const struct common_priorities | COMMON_PRIORITIES | |
Identify the priority of certain tasks. | ||
const struct neuron_regions | NEURON_REGIONS | |
uint32_t | time | |
The current timer tick value. | ||
static uint32_t | timer_period | |
timer tick period (in microseconds) | ||
static uint32_t | simulation_ticks = 0 | |
The number of timer ticks to run for before being expected to exit. | ||
static uint32_t | infinite_run | |
Determines if this model should run for infinite time. | ||
static uint32_t | recording_flags = 0 | |
The recording flags indicating if anything is recording. | ||
static struct sdram_config | sdram_inputs | |
The SDRAM input configuration data. | ||
static weight_t * | synaptic_contributions [N_SYNAPTIC_BUFFERS] | |
The inputs from the various synapse cores. | ||
static uint32_t | timer_overruns = 0 | |
The timer overruns. | ||
union { | ||
uint32_t * | as_int | |
weight_t * | as_weight | |
} | all_synaptic_contributions | |
All the synaptic contributions for adding up in 2 formats. | ||
This file contains the main function of the application framework, which the application programmer uses to configure and run applications.
This is the main entrance class for most of the neural models. The following Figure shows how all of the c code interacts with each other and what classes are used to represent over arching logic (such as plasticity, spike processing, utilities, synapse types, models)
Definition in file c_main_neurons.c.
struct sdram_config |
A region of SDRAM used to transfer synapses.
Definition at line 87 of file c_main_neurons.c.
struct neurons_provenance |
Provenance for this specific core.
Definition at line 97 of file c_main_neurons.c.
Data Fields | ||
---|---|---|
uint32_t | n_timer_overruns |
#define N_SYNAPTIC_BUFFERS 2 |
The number of buffers for synaptic data (one processing, one in progress)
Definition at line 102 of file c_main_neurons.c.
enum callback_priorities |
values for the priority for each callback
Definition at line 42 of file c_main_neurons.c.
enum regions |
Overall regions to be used by the neuron core.
Definition at line 47 of file c_main_neurons.c.
|
static |
Callback to store provenance data (format: neuron_provenance).
[out] | provenance_region | Where to write the provenance data |
Definition at line 138 of file c_main_neurons.c.
void resume_callback | ( | void | ) |
the function to call when resuming a simulation
Definition at line 147 of file c_main_neurons.c.
|
inlinestatic |
Add up all the synaptic contributions into a global buffer.
[in] | syns | The weights to be added |
Definition at line 162 of file c_main_neurons.c.
Timer interrupt callback.
[in] | timer_count | the number of times this call back has been executed since start of simulation |
[in] | unused | unused parameter kept for API consistency |
Definition at line 175 of file c_main_neurons.c.
|
static |
Initialises the model by reading in the regions and checking recording data.
Definition at line 251 of file c_main_neurons.c.
void c_main | ( | void | ) |
The entry point for this model.
Definition at line 308 of file c_main_neurons.c.
const struct common_regions COMMON_REGIONS |
From the regions, select those that are common.
Definition at line 61 of file c_main_neurons.c.
const struct common_priorities COMMON_PRIORITIES |
const struct neuron_regions NEURON_REGIONS |
From the regions, select those that are used for neuron-specific things
Definition at line 78 of file c_main_neurons.c.
uint32_t time |
The current timer tick value.
Declare that time exists.
Definition at line 106 of file c_main_neurons.c.
|
static |
timer tick period (in microseconds)
Definition at line 109 of file c_main_neurons.c.
|
static |
The number of timer ticks to run for before being expected to exit.
Definition at line 112 of file c_main_neurons.c.
|
static |
Determines if this model should run for infinite time.
Definition at line 115 of file c_main_neurons.c.
|
static |
The recording flags indicating if anything is recording.
Definition at line 118 of file c_main_neurons.c.
|
static |
The SDRAM input configuration data.
Definition at line 121 of file c_main_neurons.c.
|
static |
The inputs from the various synapse cores.
Definition at line 124 of file c_main_neurons.c.
|
static |
The timer overruns.
Definition at line 127 of file c_main_neurons.c.