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

close()[source]

Closes the writer if not already closed.

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.

writable()[source]

Return whether object was opened for writing.

If False, write() will raise OSError.

write(data)[source]
class spinn_front_end_common.interface.ds.DataSpecificationTargets(machine, report_folder, init=None, clear=True)[source]

Bases: collections.abc.MutableMapping

Parameters:
create_data_spec(x, y, p)[source]
Parameters:
Return type:

DataRowWriter

get_app_id(x, y, p)[source]

Gets the app_id set for this core

Parameters:
  • x (int) – core x
  • y (int) – core y
  • p (int) – core p
Return type:

int

get_database()[source]

Expose the database so it can be shared

Return type:DsAbstractDatabase
items()[source]
Returns:iterator over the core locations and how to read the data spec for them
Return type:iterable(tuple(tuple(int,int,int),RawIOBase))
keys()[source]

Yields the keys.

As the more typical call is iteritems this makes use of that

Return type:iterable(tuple(int,int,int))
mark_system_cores(core_subsets)[source]
Parameters:core_subsets (CoreSubsets) –
n_targets()

TEMP implementation

Returns:
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
write_data_spec(x, y, p, ds)[source]
Parameters:
class spinn_front_end_common.interface.ds.DsWriteInfo(database)[source]

Bases: object

Parameters:database (DsAbstractDatabase) – Database to map
clear_write_info()[source]

Clears the info for all cores,

get_info(x, y, p)[source]

gets the info for the core x, y, p

Parameters:
  • x (int) – core x
  • y (int) – core y
  • p (int) – core p
Returns:

dict with the keys start_address, memory_used and memory_written

Return type:

dict(str,int)

items()[source]
iteritems()
keys()[source]

Yields the keys.

As the more typical call is iteritems this makes use of that

Return type:iterable(tuple(int,int,int))
set_info(x, y, p, info)[source]

Sets the info for the core x, y, p

Parameters:
  • x (int) – core x
  • y (int) – core y
  • p (int) – core p
  • info (dict(str,int)) – dict with the keys start_address, memory_used and memory_written
set_size_info(x, y, p, memory_used)[source]

Sets the size info for the core x, y p.

Parameters:
  • x – core x
  • y – core y
  • p – core p
  • memory_used – memory allocated
Rtype None: