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
Commits
7bcbb7a8
Commit
7bcbb7a8
authored
2 months ago
by
Simon Bjurek
Browse files
Options
Downloads
Patches
Plain Diff
added show method for architecture
parent
7f60945c
No related branches found
No related tags found
1 merge request
!507
Added new resource algorithm for minimizing pe -> memory connections etc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/architecture.py
+49
-2
49 additions, 2 deletions
b_asic/architecture.py
with
49 additions
and
2 deletions
b_asic/architecture.py
+
49
−
2
View file @
7bcbb7a8
...
...
@@ -924,6 +924,53 @@ of :class:`~b_asic.architecture.ProcessingElement`
raise
KeyError
(
f
"
{
proc
}
not in
{
source
.
entity_name
}
"
)
self
.
_build_dicts
()
def
show
(
self
,
fmt
:
str
|
None
=
None
,
branch_node
:
bool
=
True
,
cluster
:
bool
=
True
,
splines
:
str
=
"
spline
"
,
io_cluster
:
bool
=
True
,
multiplexers
:
bool
=
True
,
colored
:
bool
=
True
,
)
->
None
:
"""
Display a visual representation of the Architecture using the default system viewer.
Parameters
----------
fmt : str, optional
File format of the generated graph. Output formats can be found at
https://www.graphviz.org/doc/info/output.html
Most common are
"
pdf
"
,
"
eps
"
,
"
png
"
, and
"
svg
"
. Default is None which
leads to PDF.
branch_node : bool, default: True
Whether to create a branch node for outputs with fan-out of two or higher.
cluster : bool, default: True
Whether to draw memories and PEs in separate clusters.
splines : {
"
spline
"
,
"
line
"
,
"
ortho
"
,
"
polyline
"
,
"
curved
"
}, default:
"
spline
"
Spline style, see https://graphviz.org/docs/attrs/splines/ for more info.
io_cluster : bool, default: True
Whether Inputs and Outputs are drawn inside an IO cluster. Only relevant
if *cluster* is True.
multiplexers : bool, default: True
Whether input multiplexers are included.
colored : bool, default: True
Whether to color the nodes.
"""
dg
=
self
.
_digraph
(
branch_node
=
branch_node
,
cluster
=
cluster
,
splines
=
splines
,
io_cluster
=
io_cluster
,
multiplexers
=
multiplexers
,
colored
=
colored
,
)
if
fmt
is
not
None
:
dg
.
format
=
fmt
dg
.
view
()
def
_digraph
(
self
,
branch_node
:
bool
=
True
,
...
...
@@ -940,8 +987,8 @@ of :class:`~b_asic.architecture.ProcessingElement`
Whether to create a branch node for outputs with fan-out of two or higher.
cluster : bool, default: True
Whether to draw memories and PEs in separate clusters.
splines :
str
, default:
"
spline
"
Th
e ty
pe of interconnect to use for graph drawing
.
splines :
{
"
spline
"
,
"
line
"
,
"
ortho
"
,
"
polyline
"
,
"
curved
"
}
, default:
"
spline
"
Splin
e
s
ty
le, see https://graphviz.org/docs/attrs/splines/ for more info
.
io_cluster : bool, default: True
Whether Inputs and Outputs are drawn inside an IO cluster. Only relevant
if *cluster* is True.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment