Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Merge requests
!319
Support new features in SFG.show()
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support new features in SFG.show()
show
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Oscar Gustafsson
requested to merge
show
into
master
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
45e05dfa
1 commit,
2 years ago
1 file
+
26
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b_asic/signal_flow_graph.py
+
26
−
7
Options
@@ -1379,7 +1379,7 @@ class SFG(AbstractOperation):
def
sfg_digraph
(
self
,
show_id
:
bool
=
False
,
engine
:
str
=
None
,
engine
:
Optional
[
str
]
=
None
,
branch_node
:
bool
=
False
,
port_numbering
:
bool
=
True
,
splines
:
str
=
"
spline
"
,
@@ -1476,7 +1476,15 @@ class SFG(AbstractOperation):
def
_repr_png_
(
self
):
return
self
.
sfg_digraph
().
_repr_mimebundle_
(
include
=
[
"
image/png
"
])[
"
image/png
"
]
def
show
(
self
,
fmt
=
None
,
show_id
=
False
,
engine
=
None
)
->
None
:
def
show
(
self
,
fmt
:
Optional
[
str
]
=
None
,
show_id
:
bool
=
False
,
engine
:
Optional
[
str
]
=
None
,
branch_node
:
bool
=
False
,
port_numbering
:
bool
=
True
,
splines
:
str
=
"
spline
"
,
)
->
None
:
"""
Shows a visual representation of the SFG using the default system viewer.
@@ -1487,16 +1495,27 @@ class SFG(AbstractOperation):
https://www.graphviz.org/doc/info/output.html
Most common are
"
pdf
"
,
"
eps
"
,
"
png
"
, and
"
svg
"
. Default is None which
leads to PDF.
show_id :
B
ool
ean, optional
If True, the graph_id:s of signals are shown.
The default is False.
show_id :
b
ool
, default: False
If True, the graph_id:s of signals are shown.
engine : string, optional
Graphviz layout engine to be used, see https://graphviz.org/documentation/.
Most common are
"
dot
"
and
"
neato
"
. Default is None leading to dot.
branch_node : bool, default: False
Add a branch node in case the fan-out of a signal is two or more.
port_numbering : bool, default: True
Show the port number in case the number of ports (input or output) is two or more.
splines : {
"
spline
"
,
"
line
"
,
"
ortho
"
,
"
polyline
"
,
"
curved
"
}, default:
"
spline
"
Spline style, see https://graphviz.org/docs/attrs/splines/ for more info.
"""
dg
=
self
.
sfg_digraph
(
show_id
=
show_id
)
if
engine
is
not
None
:
dg
.
engine
=
engine
dg
=
self
.
sfg_digraph
(
show_id
=
show_id
,
engine
=
engine
,
branch_node
=
branch_node
,
port_numbering
=
port_numbering
,
splines
=
splines
,
)
if
fmt
is
not
None
:
dg
.
format
=
fmt
dg
.
view
()
Loading