SpiNNFrontEndCommon 7.2.2
Common support code for user-facing front end systems.
|
Data Specification region access API. More...
Go to the source code of this file.
Data Structures | |
struct | region_desc_t |
struct | data_specification_metadata_t |
The central structure that the DSE writes. More... | |
Functions | |
data_specification_metadata_t * | data_specification_get_data_address (void) |
Gets the location of the data for this core using the user0 entry of the SARK VCPU structure. | |
bool | data_specification_read_header (data_specification_metadata_t *ds_regions) |
Reads the header from the address given and checks if the parameters are of the correct values. | |
static void * | data_specification_get_region (uint32_t region, data_specification_metadata_t *ds_regions) |
Gets the address of a region. | |
Data Specification region access API.
Specifies functions that can be used to read an executed Data Specification, including checking the header and extracting the regions.
Definition in file data_specification.h.
struct region_desc_t |
Definition at line 31 of file data_specification.h.
Data Fields | ||
---|---|---|
void * | pointer | |
uint32_t | checksum | Simple checksum which is rounded 32-bit unsigned sum of words. |
uint32_t | n_words | The number of valid words in the region. |
struct data_specification_metadata_t |
The central structure that the DSE writes.
A pointer to this will be placed in user0 before the application launches. The number of entries in the table is application-specific, and is not checked.
Definition at line 44 of file data_specification.h.
Data Fields | ||
---|---|---|
uint32_t | magic_number | A magic number, used to verify that the pointer is sane. |
uint32_t | version | The version of the DSE data layout specification being followed. |
region_desc_t | regions[] | The regions; as many as required. |
data_specification_metadata_t * data_specification_get_data_address | ( | void | ) |
Gets the location of the data for this core using the user0 entry of the SARK VCPU structure.
Locates the start address for a core in SDRAM. This value is loaded into the user0 register of the core during the tool chain loading.
Does not validate the value! That's data_specification_read_header()
Definition at line 76 of file data_specification.c.
bool data_specification_read_header | ( | data_specification_metadata_t * | ds_regions | ) |
Reads the header from the address given and checks if the parameters are of the correct values.
Reads the header written by a DSE and checks that the magic number which is written by every DSE is consistent. Inconsistent DSE magic numbers would reflect a model being used with an different DSE interface than the DSE used by the host machine.
[in] | ds_regions | The address of the start of the data generated |
Definition at line 95 of file data_specification.c.
|
inlinestatic |
Gets the address of a region.
[in] | region | the ID of the region, starting at 0 |
[in] | ds_regions | The address of the start of the data generated; it is the caller's job to validate this first. |
Definition at line 81 of file data_specification.h.