sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions | Variables
c_main_synapses.c File Reference

This file contains the main function of the application framework, which the application programmer uses to configure and run applications. More...

#include "c_main_synapse_common.h"
#include "c_main_common.h"
#include "spike_processing_fast.h"
#include "structural_plasticity/synaptogenesis_dynamics.h"
#include <spin1_api_params.h>

Go to the source code of this file.

Data Structures

struct  provenance_data
 Provenance data region layout. More...
 

Enumerations

enum  callback_priorities { MC = -1 , DMA = -2 , TIMER = 0 , SDP = 0 }
 values for the priority for each callback More...
 
enum  regions {
  SYSTEM_REGION , PROVENANCE_DATA_REGION , PROFILER_REGION , RECORDING_REGION ,
  SYNAPSE_PARAMS_REGION , SYNAPTIC_MATRIX_REGION , POPULATION_TABLE_REGION , SYNAPSE_DYNAMICS_REGION ,
  STRUCTURAL_DYNAMICS_REGION , BIT_FIELD_FILTER_REGION , SDRAM_PARAMS_REGION , KEY_REGION
}
 Overall regions used by the synapse 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
 
void timer_callback (uint unused0, uint unused1)
 Timer event 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 common tasks.
 
const struct synapse_regions SYNAPSE_REGIONS
 From the regions, select those that are used for synapse-specific things.
 
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.
 

Detailed Description

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_synapses.c.


Data Structure Documentation

◆ provenance_data

struct provenance_data

Provenance data region layout.

Definition at line 47 of file c_main_synapses.c.

Data Fields
struct synapse_provenance synapse_prov
struct spike_processing_fast_provenance spike_processing_prov

Enumeration Type Documentation

◆ callback_priorities

values for the priority for each callback

Definition at line 42 of file c_main_synapses.c.

◆ regions

enum regions

Overall regions used by the synapse core.

Definition at line 53 of file c_main_synapses.c.

Function Documentation

◆ store_provenance_data()

static void store_provenance_data ( address_t  provenance_region)
static

Callback to store provenance data (format: neuron_provenance).

Parameters
[out]provenance_regionWhere to write the provenance data

Definition at line 111 of file c_main_synapses.c.

◆ resume_callback()

void resume_callback ( void  )

the function to call when resuming a simulation

Definition at line 118 of file c_main_synapses.c.

◆ timer_callback()

void timer_callback ( uint  unused0,
uint  unused1 
)

Timer event callback.

Parameters
[in]unused0unused
[in]unused1unused

Definition at line 131 of file c_main_synapses.c.

◆ initialise()

static bool initialise ( void  )
static

Initialises the model by reading in the regions and checking recording data.

Returns
True if it successfully initialised, false otherwise

Definition at line 151 of file c_main_synapses.c.

◆ c_main()

void c_main ( void  )

The entry point for this model.

Definition at line 202 of file c_main_synapses.c.

Variable Documentation

◆ COMMON_REGIONS

const struct common_regions COMMON_REGIONS
Initial value:
= {
.system = SYSTEM_REGION,
.provenance = PROVENANCE_DATA_REGION,
.profiler = PROFILER_REGION,
.recording = RECORDING_REGION
}
SYSTEM_REGION

From the regions, select those that are common.

Definition at line 69 of file c_main_synapses.c.

◆ COMMON_PRIORITIES

const struct common_priorities COMMON_PRIORITIES
Initial value:
= {
.sdp = SDP,
.dma = DMA,
.timer = TIMER
}
TIMER
DMA
SDP

Identify the priority of common tasks.

Definition at line 77 of file c_main_synapses.c.

◆ SYNAPSE_REGIONS

const struct synapse_regions SYNAPSE_REGIONS
Initial value:
= {
.synapse_params = SYNAPSE_PARAMS_REGION,
.synaptic_matrix = SYNAPTIC_MATRIX_REGION,
.pop_table = POPULATION_TABLE_REGION,
.synapse_dynamics = SYNAPSE_DYNAMICS_REGION,
.structural_dynamics = STRUCTURAL_DYNAMICS_REGION,
.bitfield_filter = BIT_FIELD_FILTER_REGION
}

From the regions, select those that are used for synapse-specific things.

Definition at line 84 of file c_main_synapses.c.

◆ time

uint32_t time

The current timer tick value.

Declare that time exists.

Definition at line 95 of file c_main_synapses.c.

◆ timer_period

uint32_t timer_period
static

timer tick period (in microseconds)

Definition at line 98 of file c_main_synapses.c.

◆ simulation_ticks

uint32_t simulation_ticks = 0
static

The number of timer ticks to run for before being expected to exit.

Definition at line 101 of file c_main_synapses.c.

◆ infinite_run

uint32_t infinite_run
static

Determines if this model should run for infinite time.

Definition at line 104 of file c_main_synapses.c.

◆ recording_flags

uint32_t recording_flags = 0
static

The recording flags indicating if anything is recording.

Definition at line 107 of file c_main_synapses.c.