diff --git a/b_asic/process.py b/b_asic/process.py index 95f3695c85c05fa9280bdf81a31c5a2c0f06ccb9..833a12a5e5efcffad6215082953da6d2433fdd8f 100644 --- a/b_asic/process.py +++ b/b_asic/process.py @@ -30,9 +30,17 @@ class Process: self._name = name def __lt__(self, other): - return self._start_time < other.start_time or ( - self._start_time == other.start_time - and self.execution_time > other.execution_time + return ( + self._start_time < other.start_time + or ( + self._start_time == other.start_time + and self.execution_time > other.execution_time + ) + or ( # Sorting on name to possibly get deterministic behavior + self._start_time == other.start_time + and self.execution_time == other.execution_time + and self._name < other.name + ) ) @property diff --git a/examples/fivepointwinograddft.py b/examples/fivepointwinograddft.py index 3cbd921c59e338df7387c93172cac3fd9ff690a6..b1a0186dfb66e83d2b00d334919e12f8e4dfecab 100644 --- a/examples/fivepointwinograddft.py +++ b/examples/fivepointwinograddft.py @@ -191,7 +191,12 @@ memories[3].assign() arch.move_process('cmul2.0', 'memory1', 'memory0') arch.move_process('bfly3.0', 'memory0', 'memory1') -arch.move_process('bfly3.1', 'memory4', 'memory0') +arch.move_process('cmul3.0', 'memory4', 'memory0') memories[0].assign() memories[1].assign() memories[4].assign() + +for memory in memories: + memory.show_content(title=f"Improved {memory.entity_name}") + +arch