|
SpiNNFrontEndCommon 7.4.2
Common support code for user-facing front end systems.
|
implementation of recording.h More...
#include <recording.h>#include <simulation.h>#include <buffered_eieio_defs.h>#include <sark.h>#include <circular_buffer.h>#include <spin1_api_params.h>#include <debug.h>#include <wfi.h>Go to the source code of this file.
Data Structures | |
| struct | recording_channel_t |
| Structure that defines a channel in memory. More... | |
| struct | recording_region_t |
| Data for an individual region. More... | |
| struct | recording_regions_t |
| header of general structure describing all recordings More... | |
Functions | |
| static bool | has_been_initialised (recording_channel_t *rec) |
| checks that a channel has been initialised | |
| static void | close_channel (recording_channel_t *rec) |
| closes a channel | |
| static void | copy_data (void *restrict target, const void *source, uint n_words) |
| copy data in word-size chunks | |
| bool | recording_record (uint8_t channel, void *data, uint32_t size_bytes) |
| records some data into a specific recording channel. | |
| void | recording_bad_offset (void *data, uint32_t size) |
| Stop the program because of a bad recording request. | |
| void | recording_finalise (void) |
| Finishes recording - should only be called if recording_flags is not 0. | |
| bool | recording_initialize (void **recording_data_address, uint32_t *recording_flags) |
| initialises the recording of data | |
| void | recording_reset (void) |
| resets recording to the state just after initialisation | |
Variables | |
| static recording_channel_t * | channels |
| Array containing all possible channels. | |
| static recording_regions_t * | regions |
| The parameters of the recording. | |
implementation of recording.h
Definition in file recording.c.
| struct recording_channel_t |
Structure that defines a channel in memory.
Channels are implemented using a circular buffer.
Definition at line 38 of file recording.c.
| struct recording_region_t |
Data for an individual region.
Definition at line 47 of file recording.c.
| struct recording_regions_t |
header of general structure describing all recordings
Definition at line 59 of file recording.c.
| Data Fields | ||
|---|---|---|
| uint32_t | n_regions | The number of recording regions. |
| recording_region_t | regions[] | Item for each region. |
|
inlinestatic |
checks that a channel has been initialised
| [in] | rec | the channel data to check |
Definition at line 81 of file recording.c.
|
inlinestatic |
|
inlinestatic |
copy data in word-size chunks
| [in] | target | where to write the data to |
| [in] | source | where to read the data from |
| [in] | n_words | the number of words to copy |
Definition at line 96 of file recording.c.
| bool recording_record | ( | channel_index_t | channel, |
| void * | data, | ||
| size_t | size_bytes ) |
records some data into a specific recording channel.
| [in] | channel | the channel to store the data into. |
| [in] | data | the data to store into the channel. |
| [in] | size_bytes | the number of bytes that this data will take up. This may be any number of bytes, not just whole words. |
Definition at line 105 of file recording.c.
| void recording_bad_offset | ( | void * | data, |
| uint32_t | size ) |
Stop the program because of a bad recording request.
| [in] | data | The address we were seeking to record from |
| [in] | size | The amount of data we were seeking to record |
Definition at line 133 of file recording.c.
| void recording_finalise | ( | void | ) |
Finishes recording - should only be called if recording_flags is not 0.
Definition at line 139 of file recording.c.
| bool recording_initialize | ( | void ** | recording_data_address, |
| uint32_t * | recording_flags ) |
initialises the recording of data
| [in,out] | recording_data_address | The start of the data about the recording, updated to point to just after the data if return True. Data is: {
// number of potential recording regions
uint32_t n_regions;
// one of these for each region
{
// flag to indicate missing data
uint32_t missing: 1;
// size of region to be recorded
uint32_t size_of_region: 31;
// pointer region to be filled in (can be read after recording is
// complete)
uint8_t* pointer_to_address_of_region;
}[n_regions]
}
|
| [out] | recording_flags | Output of flags which can be used to check if a channel is enabled for recording |
Definition at line 161 of file recording.c.
| void recording_reset | ( | void | ) |
resets recording to the state just after initialisation
Definition at line 212 of file recording.c.
|
static |
Array containing all possible channels.
Definition at line 72 of file recording.c.
|
static |
The parameters of the recording.
Definition at line 75 of file recording.c.