From adb261d9a4dcc80442a4423c07f5ebb78858f0d4 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson <oscar.gustafsson@gmail.com> Date: Mon, 17 Apr 2023 16:33:21 +0200 Subject: [PATCH] Add documentation for some SFG methods --- b_asic/signal_flow_graph.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/b_asic/signal_flow_graph.py b/b_asic/signal_flow_graph.py index 59e93fa6..49f1372c 100644 --- a/b_asic/signal_flow_graph.py +++ b/b_asic/signal_flow_graph.py @@ -747,9 +747,18 @@ class SFG(AbstractOperation): return self._precedence_list def show_precedence_graph(self) -> None: + """ + Display the output of :func:`precedence_graph` in the system viewer. + """ self.precedence_graph().view() def precedence_graph(self) -> Digraph: + """ + Return the SFG in prededence form in Graphviz format. + + This can be rendered in enriched shells. + + """ p_list = self.get_precedence_list() pg = Digraph() pg.attr(rankdir="LR") @@ -1378,6 +1387,14 @@ class SFG(AbstractOperation): return Schedule(self, scheduling_algorithm="ASAP").schedule_time + def iteration_period_bound(self) -> int: + """ + Return the iteration period bound of the SFG. + + If -1, the SFG does not have any loops and therefore no iteration period bound. + """ + raise NotImplementedError() + def edit(self) -> None: """Edit SFG in GUI.""" from b_asic.GUI.main_window import start_editor -- GitLab