spinn_front_end_common.abstract_models package

Module contents

class spinn_front_end_common.abstract_models.AbstractChangableAfterRun[source]

Bases: object

An item that can be changed after a call to run, the changes to which might or might not require mapping or data generation.

mark_no_changes()[source]

Marks the point after which changes are reported, so that new changes can be detected before the next check.

requires_data_generation

True if changes that have been made require that data generation be performed. By default this returns False but can be overridden to indicate changes that require data regeneration.

Return type:bool
requires_mapping

True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.

Return type:bool
class spinn_front_end_common.abstract_models.AbstractGeneratesDataSpecification[source]

Bases: object

generate_data_specification(spec, placement)[source]

Generate a data specification.

Parameters:
Return type:

None

class spinn_front_end_common.abstract_models.AbstractHasAssociatedBinary[source]

Bases: object

Marks a machine graph vertex that can be launched on a SpiNNaker core.

get_binary_file_name()[source]

Get the binary name to be run for this vertex.

Return type:str
get_binary_start_type()[source]

Get the start type of the binary to be run.

Return type:ExecutableType
class spinn_front_end_common.abstract_models.AbstractMachineAllocationController[source]

Bases: object

An object that controls the allocation of a machine

close()[source]

Indicate that the use of the machine is complete.

extend_allocation(new_total_run_time)[source]

Extend the allocation of the machine from the original run time.

Parameters:new_total_run_time (float) – The total run time that is now required starting from when the machine was first allocated
where_is_machine(chip_x, chip_y)[source]

Locates and returns cabinet, frame, board for a given chip in a machine allocated to this job.

Parameters:
  • chip_x (int) – chip x location
  • chip_y (int) – chip y location
Returns:

(cabinet, frame, board)

Return type:

tuple(int,int,int)

class spinn_front_end_common.abstract_models.AbstractProvidesIncomingPartitionConstraints[source]

Bases: object

A vertex that can provide constraints for its incoming edge partitions.

get_incoming_partition_constraints(partition)[source]

Get constraints to be added to the given edge partition that goes into a vertex of this vertex.

Parameters:partition (OutgoingEdgePartition) – An partition that goes in to this vertex
Returns:A list of constraints
Return type:list(AbstractConstraint)
class spinn_front_end_common.abstract_models.AbstractProvidesKeyToAtomMapping[source]

Bases: object

Interface to provide a mapping between routing key partitions and atom IDs

routing_key_partition_atom_mapping(routing_info, partition)[source]

Returns a list of atom to key mapping.

Parameters:
  • routing_info (RoutingInfo) – the routing info object to consider
  • partition (AbstractOutgoingEdgePartition) – the routing partition to handle.
Returns:

a iterable of tuples of atom IDs to keys.

Return type:

iterable(tuple(int,int))

class spinn_front_end_common.abstract_models.AbstractProvidesOutgoingPartitionConstraints[source]

Bases: object

A vertex that can provide constraints for its outgoing edge partitions.

get_outgoing_partition_constraints(partition)[source]

Get constraints to be added to the given edge partition that comes out of this vertex.

Parameters:partition (OutgoingEdgePartition) – An edge that comes out of this vertex
Returns:A list of constraints
Return type:list(AbstractConstraint)
class spinn_front_end_common.abstract_models.AbstractRecordable[source]

Bases: object

Indicates that an object might record some data in to SDRAM

is_recording()[source]

Deduce if the recorder is actually recording

Return type:bool
class spinn_front_end_common.abstract_models.AbstractRewritesDataSpecification[source]

Bases: object

Indicates an object that allows data to be changed after run, and so can rewrite the data specification

mark_regions_reloaded()[source]

Indicate that the regions have been reloaded

regenerate_data_specification(spec, placement)[source]

Regenerate the data specification, only generating regions that have changed and need to be reloaded

Parameters:
requires_memory_regions_to_be_reloaded()[source]

Return true if any data region needs to be reloaded

Return type:bool
class spinn_front_end_common.abstract_models.AbstractSendMeMulticastCommandsVertex[source]

Bases: object

A vertex which wants to commands to be sent to it as multicast packets at fixed points in the simulation

pause_stop_commands

The commands needed when pausing or stopping simulation

Return type:iterable(MultiCastCommand)
start_resume_commands

The commands needed when starting or resuming simulation

Return type:iterable(MultiCastCommand)
timed_commands

The commands to be sent at given times in the simulation

Return type:iterable(MultiCastCommand)
class spinn_front_end_common.abstract_models.AbstractSupportsDatabaseInjection[source]

Bases: object

Marks a machine vertex as supporting injection of information via a database running on the controlling host.

is_in_injection_mode

Whether this vertex is actually in injection mode.

Return type:bool
class spinn_front_end_common.abstract_models.AbstractVertexWithEdgeToDependentVertices[source]

Bases: object

A vertex with a dependent vertices, which should be connected to this vertex by an edge directly to each of them

dependent_vertices()[source]

Return the vertices which this vertex depends upon

Return type:iterable(ApplicationVertex)
edge_partition_identifiers_for_dependent_vertex(vertex)[source]

Return the dependent edge identifiers for a particular dependent vertex.

Parameters:vertex (ApplicationVertex) –
Return type:iterable(str)
class spinn_front_end_common.abstract_models.AbstractUsesMemoryIO[source]

Bases: object

Indicates that the class will write data using the MemoryIO interface.

get_memory_io_data_size()[source]

Get the size of the data area to allocate for this vertex.

Returns:The size of the data area in bytes
Return type:int
write_data_to_memory_io(memory, tag)[source]

Write the data to the given memory object

Parameters:
  • memory (MemoryIO) – The memory to write to (and handle to use to do the write)
  • tag (int) – The tag given to the allocated memory
Return type:

None

class spinn_front_end_common.abstract_models.AbstractCanReset[source]

Bases: object

Indicates an object that can be reset to time 0.

reset_to_first_timestep()[source]

Reset the object to first time step.

class spinn_front_end_common.abstract_models.AbstractSupportsBitFieldGeneration[source]

Bases: object

Marks a vertex that can provide information about bitfields it wants generated on-chip.

bit_field_base_address(transceiver, placement)[source]

Returns the SDRAM address for the bit field table data.

Parameters:
Returns:

the SDRAM address for the bitfield address

Return type:

int

bit_field_builder_region(transceiver, placement)[source]

returns the SDRAM address for the bit field builder data

Parameters:
Returns:

the SDRAM address for the bitfield builder data

Return type:

int

class spinn_front_end_common.abstract_models.AbstractSupportsBitFieldRoutingCompression[source]

Bases: object

Marks a machine vertex that can support having the on-chip bitfield compressor running on its core.

bit_field_base_address(transceiver, placement)[source]

Returns the SDRAM address for the bit-field table data.

Parameters:
Returns:

the SDRAM address for the bitfield address

Return type:

int

key_to_atom_map_region_base_address(transceiver, placement)[source]

Returns the SDRAM address for the region that contains key-to-atom data.

Parameters:
Returns:

the SDRAM address for the key-to-atom data

Return type:

int

regeneratable_sdram_blocks_and_sizes(transceiver, placement)[source]

Returns the SDRAM addresses and sizes for the cores’ SDRAM that are available (borrowed) for generating bitfield tables.

Parameters:
Returns:

list of tuples containing (the SDRAM address for the cores SDRAM address’s for the core’s SDRAM that can be used to generate bitfield tables loaded, and the size of memory chunks located there)

Return type:

list(tuple(int,int))