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
!48
Resolve "Visualize PG"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Visualize PG"
27-visualize-pg
into
develop
Overview
1
Commits
9
Pipelines
4
Changes
3
All threads resolved!
Hide all comments
Merged
Rasmus Karlsson
requested to merge
27-visualize-pg
into
develop
4 years ago
Overview
1
Commits
9
Pipelines
4
Changes
1
All threads resolved!
Hide all comments
Expand
Closes
#27 (closed)
0
0
Merge request reports
Compare
version 1
version 3
24898db0
4 years ago
version 2
cfc49d58
4 years ago
version 1
d7dd2b24
4 years ago
develop (base)
and
version 2
latest version
6123aacc
9 commits,
4 years ago
version 3
24898db0
8 commits,
4 years ago
version 2
cfc49d58
7 commits,
4 years ago
version 1
d7dd2b24
6 commits,
4 years ago
Show latest version
1 file
+
0
−
113
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
test/test_sfg.py
+
0
−
113
Options
@@ -708,116 +708,3 @@ class TestTopologicalOrderOperations:
assert
[
comp
.
name
for
comp
in
topological_order
]
==
[
"
IN1
"
,
"
OUT1
"
,
"
IN2
"
,
"
C1
"
,
"
ADD1
"
,
"
OUT2
"
]
class
TestShowPrecedenceGraph
:
def
create_sfg
(
self
,
op_tree
):
"""
Create a simple SFG with either operation_tree or large_operation_tree
"""
sfg1
=
SFG
(
outputs
=
[
Output
(
op_tree
)])
inp1
=
Input
(
"
INP1
"
)
inp2
=
Input
(
"
INP2
"
)
out1
=
Output
(
None
,
"
OUT1
"
)
add1
=
Addition
(
None
,
None
,
"
ADD1
"
)
add2
=
Addition
(
None
,
None
,
"
ADD2
"
)
add1
.
input
(
0
).
connect
(
inp1
,
"
S1
"
)
add1
.
input
(
1
).
connect
(
inp2
,
"
S2
"
)
add2
.
input
(
0
).
connect
(
add1
,
"
S3
"
)
add2
.
input
(
1
).
connect
(
sfg1
.
outputs
[
0
],
"
S4
"
)
out1
.
input
(
0
).
connect
(
add2
,
"
S5
"
)
return
SFG
(
inputs
=
[
inp1
,
inp2
],
outputs
=
[
out1
])
def
test_show_pg_large_operation_tree
(
self
,
large_operation_tree
):
"""
Creates a SFG of a large operation tree and displays its Precedence Graph.
"""
test_sfg
=
SFG
(
outputs
=
[
Output
(
large_operation_tree
)])
#test_sfg.show_precedence_graph()
def
test_show_pg_operation_tree
(
self
,
operation_tree
):
"""
Creates a SFG of a operation tree and displays its Precedence Graph.
"""
test_sfg
=
SFG
(
outputs
=
[
Output
(
operation_tree
)])
#test_sfg.show_precedence_graph()
def
test_show_pg_many_op
(
self
,
large_operation_tree
):
"""
Creates a large SFG with several of the operations having several outputs connecting to other operations.
Displays its Precedence Graph.
"""
inp1
=
Input
(
"
INP1
"
)
inp2
=
Input
(
"
INP2
"
)
inp3
=
Input
(
"
INP3
"
)
inp4
=
Input
(
"
INP4
"
)
out1
=
Output
(
None
,
"
OUT1
"
)
out2
=
Output
(
None
,
"
OUT2
"
)
out3
=
Output
(
None
,
"
OUT3
"
)
out4
=
Output
(
None
,
"
OUT4
"
)
out5
=
Output
(
None
,
"
OUT5
"
)
out6
=
Output
(
None
,
"
OUT6
"
)
add1
=
Addition
(
None
,
None
,
"
ADD1
"
)
sub1
=
Subtraction
(
None
,
None
,
"
SUB1
"
)
add2
=
Addition
(
None
,
None
,
"
ADD2
"
)
add3
=
Addition
(
None
,
None
,
"
ADD3
"
)
sfg1
=
self
.
create_sfg
(
large_operation_tree
)
add1
.
input
(
0
).
connect
(
inp1
,
"
S1
"
)
add1
.
input
(
1
).
connect
(
inp2
,
"
S2
"
)
sfg1
.
input
(
0
).
connect
(
add1
,
"
S3
"
)
sfg1
.
input
(
1
).
connect
(
inp3
,
"
S4
"
)
sub1
.
input
(
0
).
connect
(
sfg1
.
outputs
[
0
],
"
S5
"
)
sub1
.
input
(
1
).
connect
(
inp4
,
"
S6
"
)
out1
.
input
(
0
).
connect
(
sub1
,
"
S7
"
)
add2
.
input
(
0
).
connect
(
sfg1
.
outputs
[
0
],
"
S8
"
)
add2
.
input
(
1
).
connect
(
sub1
,
"
S9
"
)
out2
.
input
(
0
).
connect
(
add2
,
"
S10
"
)
out3
.
input
(
0
).
connect
(
add1
,
"
S11
"
)
out4
.
input
(
0
).
connect
(
sub1
,
"
S12
"
)
out5
.
input
(
0
).
connect
(
add2
,
"
S13
"
)
add3
.
input
(
0
).
connect
(
add1
,
"
S14
"
)
add3
.
input
(
1
).
connect
(
add2
,
"
S15
"
)
out6
.
input
(
0
).
connect
(
add3
,
"
S16
"
)
test_sfg
=
SFG
(
inputs
=
[
inp1
,
inp2
,
inp3
,
inp4
],
outputs
=
[
out1
,
out2
,
out3
,
out4
,
out5
,
out6
])
#test_sfg.show_precedence_graph()
def
test_show_pg_many_op_butterfly
(
self
,
large_operation_tree
):
"""
Creates a large SFG with several of the operations having several outputs connecting to other operations.
Displays its Precedence Graph.
"""
inp1
=
Input
(
"
INP1
"
)
inp2
=
Input
(
"
INP2
"
)
inp3
=
Input
(
"
INP3
"
)
inp4
=
Input
(
"
INP4
"
)
out1
=
Output
(
None
,
"
OUT1
"
)
out2
=
Output
(
None
,
"
OUT2
"
)
out3
=
Output
(
None
,
"
OUT3
"
)
out4
=
Output
(
None
,
"
OUT4
"
)
out5
=
Output
(
None
,
"
OUT5
"
)
out6
=
Output
(
None
,
"
OUT6
"
)
add1
=
Addition
(
None
,
None
,
"
ADD1
"
)
but1
=
Butterfly
(
None
,
None
,
"
BUT1
"
)
add2
=
Addition
(
None
,
None
,
"
ADD2
"
)
add3
=
Addition
(
None
,
None
,
"
ADD3
"
)
sfg1
=
self
.
create_sfg
(
large_operation_tree
)
add1
.
input
(
0
).
connect
(
inp1
,
"
S1
"
)
add1
.
input
(
1
).
connect
(
inp2
,
"
S2
"
)
sfg1
.
input
(
0
).
connect
(
add1
,
"
S3
"
)
sfg1
.
input
(
1
).
connect
(
inp3
,
"
S4
"
)
but1
.
input
(
0
).
connect
(
sfg1
.
outputs
[
0
],
"
S5
"
)
but1
.
input
(
1
).
connect
(
inp4
,
"
S6
"
)
out1
.
input
(
0
).
connect
(
but1
.
output
(
0
),
"
S7
"
)
add2
.
input
(
0
).
connect
(
sfg1
.
outputs
[
0
],
"
S8
"
)
add2
.
input
(
1
).
connect
(
but1
.
output
(
1
),
"
S9
"
)
out2
.
input
(
0
).
connect
(
add2
,
"
S10
"
)
out3
.
input
(
0
).
connect
(
add1
,
"
S11
"
)
out4
.
input
(
0
).
connect
(
but1
.
output
(
1
),
"
S12
"
)
out5
.
input
(
0
).
connect
(
add2
,
"
S13
"
)
add3
.
input
(
0
).
connect
(
add1
,
"
S14
"
)
add3
.
input
(
1
).
connect
(
add2
,
"
S15
"
)
out6
.
input
(
0
).
connect
(
add3
,
"
S16
"
)
test_sfg
=
SFG
(
inputs
=
[
inp1
,
inp2
,
inp3
,
inp4
],
outputs
=
[
out1
,
out2
,
out3
,
out4
,
out5
,
out6
])
#test_sfg.show_precedence_graph()
Loading