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
!34
Resolve "Operation Splitting"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Operation Splitting"
6-operation-splitting
into
develop
Overview
10
Commits
13
Pipelines
8
Changes
1
Merged
Rasmus Karlsson
requested to merge
6-operation-splitting
into
develop
4 years ago
Overview
10
Commits
13
Pipelines
8
Changes
1
Expand
Closes
#6 (closed)
0
0
Merge request reports
Viewing commit
d6c6c161
Prev
Next
Show latest version
1 file
+
0
−
34
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
d6c6c161
deleted trash test
· d6c6c161
Rasmus Karlsson
authored
4 years ago
test/test_split_r.py deleted
100644 → 0
+
0
−
34
Options
import
pytest
from
b_asic
import
Addition
,
Subtraction
,
Multiplication
,
ConstantMultiplication
,
Division
,
Input
,
Output
,
SFG
def
test_split_three_add
():
"""
Split one custom operation consisting of three Additions
"""
in1
=
Input
()
in2
=
Input
()
in3
=
Input
()
in4
=
Input
()
#in1.value = 1
#in2.value = 2
#in3.value = 3
#in4.value = 4
add1
=
in1
+
in2
add2
=
in3
+
in4
add3
=
add1
+
add2
out1
=
Output
(
add3
)
Cstm
=
SFG
(
inputs
=
[
in1
,
in2
,
in3
,
in4
],
outputs
=
[
out1
])
result
=
Cstm
.
split
()
assert
(
isinstance
(
result
[
0
],
Addition
))
assert
(
isinstance
(
result
[
1
],
Addition
))
assert
(
isinstance
(
result
[
2
],
Addition
))
assert
(
len
(
result
)
==
3
)
Loading