Skip to content
Snippets Groups Projects
Commit 59ca4816 authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Minor fixes for resource allocation

parent 9deb17e1
No related branches found
No related tags found
1 merge request!291Minor fixes for resource allocation
Pipeline #94134 passed
...@@ -9,7 +9,7 @@ from matplotlib.axes import Axes ...@@ -9,7 +9,7 @@ from matplotlib.axes import Axes
from matplotlib.ticker import MaxNLocator from matplotlib.ticker import MaxNLocator
from b_asic._preferences import LATENCY_COLOR from b_asic._preferences import LATENCY_COLOR
from b_asic.process import MemoryVariable, PlainMemoryVariable, Process from b_asic.process import MemoryVariable, OperatorProcess, PlainMemoryVariable, Process
from b_asic.types import TypeName from b_asic.types import TypeName
# Default latency coloring RGB tuple # Default latency coloring RGB tuple
...@@ -1124,7 +1124,7 @@ class ProcessCollection: ...@@ -1124,7 +1124,7 @@ class ProcessCollection:
def get_by_type_name(self, type_name: TypeName) -> "ProcessCollection": def get_by_type_name(self, type_name: TypeName) -> "ProcessCollection":
""" """
Return a ProcessCollection with only a given type of operations. Return a ProcessCollection with only a given type of operation.
Parameters Parameters
---------- ----------
...@@ -1133,11 +1133,9 @@ class ProcessCollection: ...@@ -1133,11 +1133,9 @@ class ProcessCollection:
Returns Returns
------- -------
None. ProcessCollection
""" """
from b_asic.process import OperatorProcess
return ProcessCollection( return ProcessCollection(
{ {
process process
...@@ -1146,4 +1144,5 @@ class ProcessCollection: ...@@ -1146,4 +1144,5 @@ class ProcessCollection:
and process._operation.type_name() == type_name and process._operation.type_name() == type_name
}, },
self._schedule_time, self._schedule_time,
self._cyclic,
) )
...@@ -717,13 +717,14 @@ class Schedule: ...@@ -717,13 +717,14 @@ class Schedule:
ProcessCollection ProcessCollection
""" """
return ProcessCollection(set(self._get_operations_list()), self.schedule_time) return ProcessCollection(
{
def _get_operations_list(self) -> List[OperatorProcess]: OperatorProcess(start_time, self._sfg.find_by_id(graph_id))
return [ for graph_id, start_time in self._start_times.items()
OperatorProcess(start_time, self._sfg.find_by_id(graph_id)) },
for graph_id, start_time in self._start_times.items() self.schedule_time,
] self.cyclic,
)
def _get_y_position( def _get_y_position(
self, graph_id, operation_height=1.0, operation_gap=None self, graph_id, operation_height=1.0, operation_gap=None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment