Skip to content
Snippets Groups Projects

Better schedule, including plotting

Merged Oscar Gustafsson requested to merge plotschedule into master
3 files
+ 98
41
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 12
9
@@ -248,13 +248,6 @@ class Operation(GraphComponent, SignalSourceProvider):
@@ -248,13 +248,6 @@ class Operation(GraphComponent, SignalSourceProvider):
"""
"""
raise NotImplementedError
raise NotImplementedError
@abstractmethod
def set_execution_time(self, latency: int) -> None:
"""Sets the execution time of the operation to the specified integer
value. The execution time cannot be a negative integer.
"""
raise NotImplementedError
@property
@property
@abstractmethod
@abstractmethod
def execution_time(self) -> int:
def execution_time(self) -> int:
@@ -263,6 +256,14 @@ class Operation(GraphComponent, SignalSourceProvider):
@@ -263,6 +256,14 @@ class Operation(GraphComponent, SignalSourceProvider):
"""
"""
raise NotImplementedError
raise NotImplementedError
 
@execution_time.setter
 
@abstractmethod
 
def execution_time(self, latency: int) -> None:
 
"""Sets the execution time of the operation to the specified integer
 
value. The execution time cannot be a negative integer.
 
"""
 
raise NotImplementedError
 
@abstractmethod
@abstractmethod
def get_plot_coordinates(self) -> Tuple[List[List[Number]], List[List[Number]]]:
def get_plot_coordinates(self) -> Tuple[List[List[Number]], List[List[Number]]]:
"""Get a tuple constaining coordinates for the two polygons outlining
"""Get a tuple constaining coordinates for the two polygons outlining
@@ -556,6 +557,7 @@ class AbstractOperation(Operation, AbstractGraphComponent):
@@ -556,6 +557,7 @@ class AbstractOperation(Operation, AbstractGraphComponent):
new_component.input(i).latency_offset = inp.latency_offset
new_component.input(i).latency_offset = inp.latency_offset
for i, outp in enumerate(self.outputs):
for i, outp in enumerate(self.outputs):
new_component.output(i).latency_offset = outp.latency_offset
new_component.output(i).latency_offset = outp.latency_offset
 
new_component.execution_time = self._execution_time
return new_component
return new_component
def inputs_required_for_output(self, output_index: int) -> Iterable[int]:
def inputs_required_for_output(self, output_index: int) -> Iterable[int]:
@@ -654,8 +656,9 @@ class AbstractOperation(Operation, AbstractGraphComponent):
@@ -654,8 +656,9 @@ class AbstractOperation(Operation, AbstractGraphComponent):
raise ValueError("No execution time specified.")
raise ValueError("No execution time specified.")
return self._execution_time
return self._execution_time
def set_execution_time(self, execution_time: int) -> None:
@execution_time.setter
assert execution_time >= 0, "Negative execution time entered."
def execution_time(self, execution_time: int) -> None:
 
assert execution_time is None or execution_time >= 0 , "Negative execution time entered."
self._execution_time = execution_time
self._execution_time = execution_time
def get_plot_coordinates(self) -> Tuple[List[List[Number]], List[List[Number]]]:
def get_plot_coordinates(self) -> Tuple[List[List[Number]], List[List[Number]]]:
Loading