Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
remove unused/ never implemented functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed May 15, 2023
1 parent 3fbbe5f commit f8e671e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 548 deletions.
28 changes: 1 addition & 27 deletions data_specification/data_specification_executor_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import struct
from spinn_utilities.overrides import overrides
from .constants import (
END_SPEC_EXECUTOR, LEN2, LEN3, MAX_MEM_REGIONS, MAX_REGISTERS)
from .exceptions import (
DataSpecificationSyntaxError, ExecuteBreakInstruction, NoMoreException,
DataSpecificationSyntaxError, NoMoreException,
NoRegionSelectedException, ParameterOutOfBoundsException,
RegionInUseException, RegionNotAllocatedException,
RegionUnfilledException, UnknownTypeLengthException)
Expand Down Expand Up @@ -130,18 +129,6 @@ def _region(self):
return None
return self._mem_regions[self._current_region]

@overrides(AbstractExecutorFunctions.execute_break)
def execute_break(self, cmd):
"""
:raise ExecuteBreakInstruction:
Raises the exception to break the execution of the DSE
"""
if isinstance(self._spec_reader, io.FileIO):
name = self._spec_reader.name
else:
name = "<stream>"
raise ExecuteBreakInstruction(self._spec_reader.tell(), name)

@overrides(AbstractExecutorFunctions.execute_reserve)
def execute_reserve(self, cmd):
"""
Expand Down Expand Up @@ -282,19 +269,6 @@ def execute_switch_focus(self, cmd):
raise RegionUnfilledException(region, "SWITCH_FOCUS")
self._current_region = region

@overrides(AbstractExecutorFunctions.execute_mv)
def execute_mv(self, cmd):
self.__unpack_cmd(cmd)
if self.__dest_reg is None:
raise DataSpecificationSyntaxError(
"Destination register not correctly specified")

if self.__src1_reg is not None:
self._registers[self.__dest_reg] = self._registers[self.__src1_reg]
else:
self._registers[self.__dest_reg] = \
_ONE_WORD.unpack(self._spec_reader.read(4))[0]

@overrides(AbstractExecutorFunctions.execute_set_wr_ptr)
def execute_set_wr_ptr(self, cmd):
"""
Expand Down
17 changes: 0 additions & 17 deletions data_specification/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,6 @@ def __init__(self, type_name, type_size, command):
f"during command {command}")


class ExecuteBreakInstruction(DataSpecificationException):
"""
An exception which occurs when a `BREAK` instruction is found in the
data specification.
"""

def __init__(self, address, filename):
"""
:param int address: address of the data specification being executed
at the time of breakpoint
:param str filename: file being parsed
"""
super().__init__(
f"Executing BREAK instruction at address {address} of "
f"file {filename}")


class DataSpecificationSyntaxError(DataSpecificationException):
"""
An exception which occurs when a command read from the data
Expand Down
Loading

0 comments on commit f8e671e

Please sign in to comment.