From 5ff9d28f3ed901106d5b9a92ed281e401f435860 Mon Sep 17 00:00:00 2001 From: Simon Bjurek <simbj106@student.liu.se> Date: Mon, 17 Feb 2025 08:43:49 +0100 Subject: [PATCH] updated so that execution time does not have to be set for dont cares --- b_asic/core_operations.py | 24 ++++++------------------ examples/ldlt_matrix_inverse.py | 2 -- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/b_asic/core_operations.py b/b_asic/core_operations.py index 175c59d1..55421296 100644 --- a/b_asic/core_operations.py +++ b/b_asic/core_operations.py @@ -1677,6 +1677,7 @@ class DontCare(AbstractOperation): output_count=1, name=name, latency_offsets={"out0": 0}, + execution_time=0, ) @classmethod @@ -1753,6 +1754,7 @@ class Sink(AbstractOperation): output_count=0, name=name, latency_offsets={"in0": 0}, + execution_time=0, ) @classmethod @@ -1777,28 +1779,14 @@ class Sink(AbstractOperation): ) -> tuple[tuple[tuple[float, float], ...], tuple[tuple[float, float], ...]]: # Doc-string inherited return ( - ( - (-0.5, 0), - (-0.5, 1), - (-0.25, 1), - (0, 0.5), - (-0.25, 0), - (-0.5, 0), - ), - ( - (-0.5, 0), - (-0.5, 1), - (-0.25, 1), - (0, 0.5), - (-0.25, 0), - (-0.5, 0), - ), + ((0, 0), (0, 1), (0.25, 1), (0.5, 0.5), (0.25, 0), (0, 0)), + ((0, 0), (0, 1), (0.25, 1), (0.5, 0.5), (0.25, 0), (0, 0)), ) def get_input_coordinates(self) -> tuple[tuple[float, float], ...]: # doc-string inherited - return tuple() + return ((0, 0.5),) def get_output_coordinates(self) -> tuple[tuple[float, float], ...]: # doc-string inherited - return ((0, 0.5),) + return tuple() diff --git a/examples/ldlt_matrix_inverse.py b/examples/ldlt_matrix_inverse.py index 3921afe4..845bd14b 100644 --- a/examples/ldlt_matrix_inverse.py +++ b/examples/ldlt_matrix_inverse.py @@ -27,10 +27,8 @@ sfg # %% # Set latencies and execution times. -sfg.set_latency_of_type(DontCare.type_name(), 0) # REMOVE!!! sfg.set_latency_of_type(MADS.type_name(), 3) sfg.set_latency_of_type(Reciprocal.type_name(), 2) -sfg.set_execution_time_of_type(DontCare.type_name(), 0) # REMOVE!!! sfg.set_execution_time_of_type(MADS.type_name(), 1) sfg.set_execution_time_of_type(Reciprocal.type_name(), 1) -- GitLab