# data_specification.spi package¶

## Module contents¶

The interface used by implementations of the executor.

class data_specification.spi.AbstractExecutorFunctions[source]

Bases: object

This class defines a function related to each of the commands of the data specification file. Subclasses need to provide implementations that work for the operations they wish to support.

execute_align_wr_ptr(cmd)[source]

This command moves the write pointer to be at the start of the next word if it isn’t already at the start of a word.

Implements ALIGN_WR_PTR

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_arith_op(cmd)[source]

This command performs an arithmetic operation.

Implements ARITH_OP

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_block_copy(cmd)[source]

This command copies a block of memory from one location to another.

Implements BLOCK_COPY

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_break(cmd)[source]

This command raises an exception to stop the execution of the data spec executor (DSE).

Implements BREAK

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_break_loop(cmd)[source]

This command stops a loop early.

Implements BREAK_LOOP

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_construct(cmd)[source]

This command calls a function.

Implements CONSTRUCT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_copy_param(cmd)[source]

This command copies a field of a structure to another field of a possibly-different structure.

Implements COPY_PARAM

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_copy_struct(cmd)[source]

This command copies a structure from one slot to another.

Implements COPY_STRUCT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_declare_rng(cmd)[source]

This command declares a random number generator.

Implements DECLARE_RNG

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_else(cmd)[source]

This command handles the other branch of a conditional.

Implements ELSE

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_end_constructor(cmd)[source]

This command ends the definition of a function.

Implements END_CONSTRUCTOR

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_end_if(cmd)[source]

This command ends a conditional.

Implements END_IF

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_end_loop(cmd)[source]

This command finishes a loop.

Implements END_LOOP

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_end_spec(cmd)[source]

This command marks the end of the specification program.

Implements END_SPEC

Parameters: cmd (int) – the command which triggered the function call A special marker to signal the end. DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_end_struct(cmd)[source]

This command completes the definition of a structure.

Implements END_STRUCT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_free(cmd)[source]

This command frees some memory.

Implements FREE

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_get_random_rumber(cmd)[source]

This command obtains a random number from a distribution.

Implements GET_RANDOM_NUMBER

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_get_wr_ptr(cmd)[source]

This command gets the current write pointer.

Implements GET_WR_PTR

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_if(cmd)[source]

This command does a conditional branch.

Implements IF

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_logic_op(cmd)[source]

This command performs a logical operation.

Implements LOGIC_OP

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_loop(cmd)[source]

This command starts a loop.

Implements LOOP

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_mv(cmd)[source]

This command moves an immediate value to a register or copies the value of a register to another register.

Implements MV

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_nop(cmd)[source]

This command executes no operation.

Implements NOP

Parameters: cmd (int) – the command which triggered the function call No value returned None DataSpecificationSyntaxError – If there is an error in the command syntax
execute_print_struct(cmd)[source]

This command prints a structure to the log.

Implements PRINT_STRUCT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_print_txt(cmd)[source]

This command prints a short string to the log.

Implements PRINT_TXT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_print_val(cmd)[source]

This command prints a value to the log.

Implements PRINT_VAL

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_random_dist(cmd)[source]

This command defines a random disribution.

Implements DECLARE_RANDOM_DIST

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_read(cmd)[source]

This command reads a word from memory.

Implements READ

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_read_param(cmd)[source]

This command extracts an element from a structure.

Implements READ_PARAM

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_reformat(cmd)[source]

This command is never generated!

Implements REFORMAT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_reserve(cmd)[source]

This command reserves a region and assigns some memory space to it.

Implements RESERVE

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_reset_wr_ptr(cmd)[source]

This command resets the current write pointer to the beginning of the memory region.

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_set_wr_ptr(cmd)[source]

This command sets the current write pointer.

Implements SET_WR_PTR

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_start_constructor(cmd)[source]

This command starts the definition of a function.

Implements START_CONSTRUCTOR

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_start_struct(cmd)[source]

This command starts to define a structure.

Implements START_STRUCT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_struct_elem(cmd)[source]

This command adds an element to a structure.

Implements STRUCT_ELEM

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_switch_focus(cmd)[source]

This command switches the focus to the desired, already allocated, memory region.

Implements SWITCH_FOCUS

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_write(cmd)[source]

This command writes the given value in the specified region a number of times as identified by either a value in the command or a register value.

Implements WRITE

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_write_array(cmd)[source]

This command writes an array of values in the specified region.

Implements WRITE_ARRAY

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_write_param(cmd)[source]

This command handles a single element of a structure.

Implements WRITE_PARAM

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_write_param_component(cmd)[source]

This command is never generated!

Implements WRITE_PARAM_COMPONENT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.
execute_write_struct(cmd)[source]

This command writes a structure to memory.

Implements WRITE_STRUCT

Parameters: cmd (int) – the command which triggered the function call No value returned DataSpecificationSyntaxError – If there is an error in the command syntax UnimplementedDSECommandError – If the command is not implemented.