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
cfc49d58
Commit
cfc49d58
authored
5 years ago
by
Rasmus Karlsson
Browse files
Options
Downloads
Patches
Plain Diff
Removed tests for visualize pg
parent
d7dd2b24
No related branches found
No related tags found
1 merge request
!48
Resolve "Visualize PG"
Pipeline
#15199
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_sfg.py
+0
-113
0 additions, 113 deletions
test/test_sfg.py
with
0 additions
and
113 deletions
test/test_sfg.py
+
0
−
113
View file @
cfc49d58
...
...
@@ -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()
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