The synapse expander for neuron cores.
More...
Go to the source code of this file.
|
static uint32_t | align_offset (uint32_t offset, uint32_t size) |
|
static bool | read_struct_builder_region (void **region, void **neuron_params_region, uint32_t n_neurons) |
| Generate the synapses for a single connector.
|
|
static void | read_index (uint32_t n_items, recording_index_t *items, uint32_t n_neurons, uint32_t n_neurons_max, uint32_t n_neurons_recording, uint16_t *sdram_out) |
|
static void | write_zero_index (uint32_t n_neurons_max, uint16_t *sdram_out) |
|
static uint32_t | get_n_recording (uint32_t n_recording, uint32_t n_neurons) |
|
static void | read_recorded_variable (void **region, void **recording_region, uint32_t n_neurons, uint32_t n_neurons_max) |
|
static void | read_recorded_bitfield (void **region, void **recording_region, uint32_t n_neurons, uint32_t n_neurons_max) |
|
static bool | run_neuron_expander (data_specification_metadata_t *ds_regions, void *params_address) |
| Read the data for the expander.
|
|
void | c_main (void) |
| Entry point.
|
|
The synapse expander for neuron cores.
Definition in file neuron_expander.c.
◆ neuron_param_item_t
struct neuron_param_item_t |
Definition at line 68 of file neuron_expander.c.
Data Fields |
uint32_t |
n_repeats |
|
uint32_t |
generator |
|
◆ neuron_param_t
◆ neuron_params_struct_t
struct neuron_params_struct_t |
The configuration of a struct.
Definition at line 85 of file neuron_expander.c.
Data Fields |
uint32_t |
bytes_per_repeat |
|
uint32_t |
n_repeats_total |
|
uint32_t |
struct_size_bytes |
|
uint32_t |
n_params |
|
neuron_param_t |
param[] |
|
◆ sdram_variable_recording_data_t
struct sdram_variable_recording_data_t |
Definition at line 100 of file neuron_expander.c.
Data Fields |
uint32_t |
rate |
|
uint32_t |
n_recording |
|
uint32_t |
element_size |
|
uint16_t |
indices[] |
|
◆ sdram_bitfield_recording_data_t
struct sdram_bitfield_recording_data_t |
Definition at line 107 of file neuron_expander.c.
Data Fields |
uint32_t |
rate |
|
uint32_t |
n_recording |
|
uint16_t |
indices[] |
|
◆ recording_index_t
Definition at line 113 of file neuron_expander.c.
Data Fields |
uint32_t |
n_repeats:31 |
|
uint32_t |
is_recording:1 |
|
◆ variable_recording_t
struct variable_recording_t |
◆ bitfield_recording_t
struct bitfield_recording_t |
◆ recording_params_t
struct recording_params_t |
Definition at line 133 of file neuron_expander.c.
Data Fields |
uint32_t |
n_recordable_variables |
|
uint32_t |
n_recordable_bit_fields |
|
◆ REPEAT_PER_NEURON
#define REPEAT_PER_NEURON 0xFFFFFFFF |
◆ REPEAT_PER_NEURON_RECORDED
#define REPEAT_PER_NEURON_RECORDED 0x7FFFFFFF |
◆ MOD_4
◆ FLOOR_TO_2
#define FLOOR_TO_2 0xFFFFFFFE |
When bitwise anded with a number will floor to the nearest multiple of 2.
Definition at line 40 of file neuron_expander.c.
◆ CEIL_TO_2
Add to a number before applying floor to 2 to turn it into a ceil operation.
Definition at line 43 of file neuron_expander.c.
◆ align_offset()
static uint32_t align_offset |
( |
uint32_t |
offset, |
|
|
uint32_t |
size |
|
) |
| |
|
inlinestatic |
◆ read_struct_builder_region()
static bool read_struct_builder_region |
( |
void ** |
region, |
|
|
void ** |
neuron_params_region, |
|
|
uint32_t |
n_neurons |
|
) |
| |
|
static |
Generate the synapses for a single connector.
- Parameters
-
[in,out] | in_region | The address to read the parameters from. Should be updated to the position just after the parameters after calling. |
[in] | synaptic_matrix_region | The address of the synaptic matrices |
[in] | post_slice_start | The start of the slice of the post-population to generate for |
[in] | post_slice_count | The number of neurons to generate for |
[in] | n_synapse_type_bits | The number of bits in the synapse type |
[in] | n_synapse_index_bits | The number of bits for the neuron index id |
[in] | weight_scales | An array of weight scales, one for each synapse type |
- Returns
- true on success, false on failure
Definition at line 169 of file neuron_expander.c.
◆ read_index()
static void read_index |
( |
uint32_t |
n_items, |
|
|
recording_index_t * |
items, |
|
|
uint32_t |
n_neurons, |
|
|
uint32_t |
n_neurons_max, |
|
|
uint32_t |
n_neurons_recording, |
|
|
uint16_t * |
sdram_out |
|
) |
| |
|
inlinestatic |
◆ write_zero_index()
static void write_zero_index |
( |
uint32_t |
n_neurons_max, |
|
|
uint16_t * |
sdram_out |
|
) |
| |
|
static |
◆ get_n_recording()
static uint32_t get_n_recording |
( |
uint32_t |
n_recording, |
|
|
uint32_t |
n_neurons |
|
) |
| |
|
inlinestatic |
◆ read_recorded_variable()
static void read_recorded_variable |
( |
void ** |
region, |
|
|
void ** |
recording_region, |
|
|
uint32_t |
n_neurons, |
|
|
uint32_t |
n_neurons_max |
|
) |
| |
|
static |
◆ read_recorded_bitfield()
static void read_recorded_bitfield |
( |
void ** |
region, |
|
|
void ** |
recording_region, |
|
|
uint32_t |
n_neurons, |
|
|
uint32_t |
n_neurons_max |
|
) |
| |
|
static |
◆ run_neuron_expander()
Read the data for the expander.
- Parameters
-
[in] | ds_regions | The data specification regions |
[in] | params_address | The address of the expander parameters |
- Returns
- True if the expander finished correctly, False if there was an error
Definition at line 365 of file neuron_expander.c.
◆ c_main()
◆ ADD
Initial value:= {
{0, 0, 0},
{3, 0, 1},
{2, 0, 0},
{1, 0, 1}
}
Definition at line 49 of file neuron_expander.c.
◆ expander_config_t
◆ population_rng
An RNG that starts in the same place on every core of the Population.
Definition at line 151 of file neuron_expander.c.
◆ core_rng