sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
Functions | Variables
population_table_binary_search_impl.c File Reference

Master population table implementation that uses binary search. More...

#include "population_table.h"
#include <neuron/synapse_row.h>
#include <debug.h>
#include <stdbool.h>

Go to the source code of this file.

Functions

static void print_master_population_table (void)
 Prints the master pop table.
 
static void print_bitfields (uint32_t mp_i, filter_info_t *filters)
 Print bitfields for debugging.
 
bool population_table_load_bitfields (filter_region_t *filter_region)
 Initialise the bitfield filtering system.
 
static bool population_table_position_in_the_master_pop_array (spike_t spike, uint32_t *position)
 Get the position in the master population table.
 
bool population_table_setup (address_t table_address, uint32_t *row_max_n_words, uint32_t *master_pop_table_length, master_population_table_entry **master_pop_table, address_list_entry **address_list)
 Set up and return the table for outside use.
 
API functions
bool population_table_initialise (address_t table_address, address_t synapse_rows_address, uint32_t *row_max_n_words)
 Set up the table.
 
bool population_table_get_first_address (spike_t spike, pop_table_lookup_result_t *result)
 Get the first row data for the given input spike.
 
bool population_table_get_next_address (spike_t *spike, pop_table_lookup_result_t *result)
 Get the next row data for a previously given spike. If no spike has been given, return False.
 

Variables

static master_population_table_entrymaster_population_table
 The master population table. This is sorted.
 
static uint32_t master_population_table_length
 The length of master_population_table.
 
static address_list_entryaddress_list
 The array of information that points into the synaptic matrix.
 
static uint32_t synaptic_rows_base_address
 Base address for the synaptic matrix's indirect rows.
 
static spike_t last_spike = 0
 The last spike received.
 
static uint32_t last_colour = 0
 The last colour received.
 
static uint32_t last_colour_mask = 0
 The last colour mask used.
 
static uint32_t last_neuron_id = 0
 The last neuron id for the key.
 
static uint16_t next_item = 0
 the index for the next item in the address_list
 
uint16_t items_to_go = 0
 The number of addresses from the same spike left to process.
 
static bit_field_tconnectivity_bit_field = NULL
 The bitfield map.
 
uint32_t ghost_pop_table_searches = 0
 the number of times a DMA resulted in 0 entries
 
uint32_t invalid_master_pop_hits = 0
 the number of times packet isnt in the master pop table at all!
 
uint32_t failed_bit_field_reads = 0
 The number of bit fields which were not able to be read in due to DTCM limits.
 
uint32_t bit_field_filtered_packets = 0
 The number of packets dropped because the bitfield filter says they don't hit anything.
 

Detailed Description

Master population table implementation that uses binary search.

Definition in file population_table_binary_search_impl.c.

Function Documentation

◆ print_master_population_table()

static void print_master_population_table ( void  )
inlinestatic

Prints the master pop table.

For debugging

Definition at line 75 of file population_table_binary_search_impl.c.

◆ print_bitfields()

static void print_bitfields ( uint32_t  mp_i,
filter_info_t filters 
)
inlinestatic

Print bitfields for debugging.

Parameters
[in]mp_iThe master population table entry index
[in]filtersThe bitfields to print

Definition at line 103 of file population_table_binary_search_impl.c.

◆ population_table_load_bitfields()

bool population_table_load_bitfields ( filter_region_t filter_region)

Initialise the bitfield filtering system.

Parameters
[in]filter_regionWhere the bitfield configuration is
Returns
True on success

Definition at line 118 of file population_table_binary_search_impl.c.

◆ population_table_position_in_the_master_pop_array()

static bool population_table_position_in_the_master_pop_array ( spike_t  spike,
uint32_t *  position 
)
inlinestatic

Get the position in the master population table.

Parameters
[in]spikeThe spike received
[out]positionThe position found (only if returns true)
Returns
True if there is a matching entry, False otherwise

Definition at line 180 of file population_table_binary_search_impl.c.

◆ population_table_setup()

bool population_table_setup ( address_t  table_address,
uint32_t *  row_max_n_words,
uint32_t *  master_pop_table_length,
master_population_table_entry **  master_pop_table,
address_list_entry **  address_list 
)

Set up and return the table for outside use.

Parameters
[in]table_addressThe address of the start of the table data
[out]row_max_n_wordsUpdated with the maximum length of any row in the table in words
[out]master_pop_table_lengthUpdated with the length of the table
[out]master_pop_tableUpdated with the table entries
[out]address_listUpdated with the address list
Returns
True if the table was setup successfully, False otherwise

Definition at line 203 of file population_table_binary_search_impl.c.

◆ population_table_initialise()

bool population_table_initialise ( address_t  table_address,
address_t  synapse_rows_address,
uint32_t *  row_max_n_words 
)

Set up the table.

Parameters
[in]table_addressThe address of the start of the table data
[in]synapse_rows_addressThe address of the start of the synapse data
[out]row_max_n_wordsUpdated with the maximum length of any row in the table in words
Returns
True if the table was initialised successfully, False otherwise

Definition at line 250 of file population_table_binary_search_impl.c.

◆ population_table_get_first_address()

bool population_table_get_first_address ( spike_t  spike,
pop_table_lookup_result_t result 
)

Get the first row data for the given input spike.

Parameters
[in]spikeThe spike received
[out]resultUpdated with the lookup details
Returns
True if there is a row to read, False if not

Definition at line 264 of file population_table_binary_search_impl.c.

◆ population_table_get_next_address()

bool population_table_get_next_address ( spike_t spike,
pop_table_lookup_result_t result 
)

Get the next row data for a previously given spike. If no spike has been given, return False.

Parameters
[out]spikeThe initiating spike
[out]resultUpdated with the lookup details
Returns
True if there is a row to read, False if not

Definition at line 315 of file population_table_binary_search_impl.c.

Variable Documentation

◆ master_population_table

master_population_table_entry* master_population_table
static

The master population table. This is sorted.

Definition at line 26 of file population_table_binary_search_impl.c.

◆ master_population_table_length

uint32_t master_population_table_length
static

The length of master_population_table.

Definition at line 29 of file population_table_binary_search_impl.c.

◆ address_list

address_list_entry* address_list
static

The array of information that points into the synaptic matrix.

Definition at line 32 of file population_table_binary_search_impl.c.

◆ synaptic_rows_base_address

uint32_t synaptic_rows_base_address
static

Base address for the synaptic matrix's indirect rows.

Definition at line 35 of file population_table_binary_search_impl.c.

◆ last_spike

spike_t last_spike = 0
static

The last spike received.

Definition at line 38 of file population_table_binary_search_impl.c.

◆ last_colour

uint32_t last_colour = 0
static

The last colour received.

Definition at line 41 of file population_table_binary_search_impl.c.

◆ last_colour_mask

uint32_t last_colour_mask = 0
static

The last colour mask used.

Definition at line 44 of file population_table_binary_search_impl.c.

◆ last_neuron_id

uint32_t last_neuron_id = 0
static

The last neuron id for the key.

Definition at line 47 of file population_table_binary_search_impl.c.

◆ next_item

uint16_t next_item = 0
static

the index for the next item in the address_list

Definition at line 50 of file population_table_binary_search_impl.c.

◆ items_to_go

uint16_t items_to_go = 0

The number of addresses from the same spike left to process.

The number of relevant items remaining in the address_list NOTE: Exported for speed of check

Definition at line 54 of file population_table_binary_search_impl.c.

◆ connectivity_bit_field

bit_field_t* connectivity_bit_field = NULL
static

The bitfield map.

Definition at line 57 of file population_table_binary_search_impl.c.

◆ ghost_pop_table_searches

uint32_t ghost_pop_table_searches = 0

the number of times a DMA resulted in 0 entries

Definition at line 60 of file population_table_binary_search_impl.c.

◆ invalid_master_pop_hits

uint32_t invalid_master_pop_hits = 0

the number of times packet isnt in the master pop table at all!

the number of times packet isn't in the master pop table at all!

Definition at line 63 of file population_table_binary_search_impl.c.

◆ failed_bit_field_reads

uint32_t failed_bit_field_reads = 0

The number of bit fields which were not able to be read in due to DTCM limits.

Definition at line 67 of file population_table_binary_search_impl.c.

◆ bit_field_filtered_packets

uint32_t bit_field_filtered_packets = 0

The number of packets dropped because the bitfield filter says they don't hit anything.

Definition at line 71 of file population_table_binary_search_impl.c.