spinn_front_end_common.interface.ds package¶
Module contents¶
-
class
spinn_front_end_common.interface.ds.
DataRowWriter
(x, y, p, targets)[source]¶ Bases:
io.RawIOBase
-
fileno
()[source]¶ Returns underlying file descriptor if one exists.
OSError is raised if the IO object does not use a file descriptor.
-
readable
()[source]¶ Return whether object was opened for reading.
If False, read() will raise OSError.
-
seekable
()[source]¶ Return whether object supports random access.
If False, seek(), tell() and truncate() will raise OSError. This method may need to do a test seek().
-
truncate
(size=None)[source]¶ Truncate file to size bytes.
File pointer is left unchanged. Size defaults to the current IO position as reported by tell(). Returns the new size.
-
-
class
spinn_front_end_common.interface.ds.
DsSqlliteDatabase
(init=None)[source]¶ Bases:
spinn_front_end_common.utilities.sqlite_db.SQLiteDB
Parameters: init (bool or None) – -
app_items
()[source]¶ Yields the keys and values for the DS data for application cores.
Note
Do not use the database for anything else while iterating.
Returns: Yields the (x, y, p) and saved ds pairs Return type: iterable(tuple(tuple(int,int,int),RawIOBase, int))
-
ds_mark_as_system
(core_list)[source]¶ Flags a list of processors as running system binaries.
Parameters: core_list (iterable(tuple(int,int,int))) – list of (core x, core y, core p)
-
ds_n_app_cores
()[source]¶ Returns the number for application cores there is a ds saved for.
Return type: int Raises: DsDatabaseException –
-
ds_n_cores
()[source]¶ Returns the number for cores there is a ds saved for.
Return type: int Raises: DsDatabaseException –
-
ds_n_system_cores
()[source]¶ Returns the number for system cores there is a ds saved for.
Return type: int Raises: DsDatabaseException –
-
get_ds
(x, y, p)[source]¶ Retrieves the data spec as byte code for this core.
Parameters: Returns: data spec as byte code
Return type:
-
get_write_info
(x, y, p)[source]¶ Gets the provenance returned by the Data Spec executor.
Parameters: Returns: start_address, memory_used, memory_written
Return type: DataWritten
-
info_iteritems
()[source]¶ Yields the keys and values for the Info data.
Note
A DB transaction may be held while this iterator is processing. Reentrant use of this class is not supported.
Returns: Yields the (x, y, p), start_address, memory_used and memory_written Return type: iterable(tuple(tuple(int, int, int), int, int, int))
-
info_n_cores
()[source]¶ Returns the number for cores there is a info saved for.
Return type: int Raises: DsDatabaseException –
-
items
()[source]¶ Yields the keys and values for the DS data.
Note
Do not use the database for anything else while iterating.
Returns: Yields the (x, y, p) and saved ds pairs Return type: iterable(tuple(tuple(int,int,int),RawIOBase))
-
keys
()[source]¶ Yields the keys.
Note
Do not use the database for anything else while iterating.
Returns: Yields the (x, y, p) Return type: iterable(tuple(int,int,int))
-
mark_system_cores
(core_subsets)[source]¶ Parameters: core_subsets (CoreSubsets) –
-
set_app_id
(app_id)[source]¶ Sets the same app_id for all rows that have ds content.
Parameters: app_id (int) – value to set
-
set_write_info
(x, y, p, start, used, written)[source]¶ Sets the provenance returned by the Data Spec executor.
Parameters:
-
system_items
()[source]¶ Yields the keys and values for the DS data for system cores.
Note
Do not use the database for anything else while iterating.
Returns: Yields the (x, y, p), saved ds and region_size triples Return type: iterable(tuple(tuple(int,int,int),RawIOBase, int))
-