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
c200e914
Commit
c200e914
authored
5 years ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Corrected and added test
parent
4f4d43db
No related branches found
No related tags found
2 merge requests
!71
Better schedule, including plotting
,
!69
Some basic functionality for plotting a schedule
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_operation.py
+14
-6
14 additions, 6 deletions
test/test_operation.py
with
14 additions
and
6 deletions
test/test_operation.py
+
14
−
6
View file @
c200e914
...
...
@@ -189,13 +189,21 @@ class TestExecutionTime:
class
TestCopyOperation
:
def
test_copy_buttefly_latency_offsets
(
self
):
def
test_copy_butte
r
fly_latency_offsets
(
self
):
bfly
=
Butterfly
(
latency_offsets
=
{
'
in0
'
:
4
,
'
in1
'
:
2
,
'
out0
'
:
10
,
'
out1
'
:
9
})
bfly_copy
=
bfly
.
copy_component
()
assert
bfly_copy
.
latency_offsets
==
{
'
in0
'
:
4
,
'
in1
'
:
2
,
'
out0
'
:
10
,
'
out1
'
:
9
}
def
test_copy_execution_time
(
self
):
add
=
Addition
()
add
.
execution_time
=
2
add_copy
=
add
.
copy_component
()
assert
add_copy
.
execution_time
==
2
class
TestPlotCoordinates
():
def
test_simple_case
(
self
):
...
...
@@ -209,11 +217,11 @@ class TestPlotCoordinates():
def
test_complicated_case
():
bfly
=
Butterfly
(
latency_offsets
=
{
'
in0
'
:
2
,
'
in1
'
:
3
,
'
out0
'
:
5
,
'
out1
'
:
10
})
bfly
.
set_
execution_time
(
7
)
bfly
.
execution_time
(
7
)
lat
,
exe
=
bfly
.
get_plot_coordinates
()
assert
lat
=
[[
2
,
0
],
[
2
,
0.5
],
[
3
,
0.5
],
[
3
,
1
],
[
10
,
1
],
[
10
,
0.5
],
[
5
,
0.5
],
[
5
,
0
],
[
2
,
0
]]
assert
exe
=
[[
0
,
0
],
[
0
,
1
],
[
7
,
1
],
[
7
,
0
],
[
0
,
0
]]
assert
lat
=
=
[[
2
,
0
],
[
2
,
0.5
],
[
3
,
0.5
],
[
3
,
1
],
[
10
,
1
],
[
10
,
0.5
],
[
5
,
0.5
],
[
5
,
0
],
[
2
,
0
]]
assert
exe
=
=
[[
0
,
0
],
[
0
,
1
],
[
7
,
1
],
[
7
,
0
],
[
0
,
0
]]
class
TestIOCoordinates
():
...
...
@@ -231,5 +239,5 @@ class TestIOCoordinates():
bfly
.
set_execution_time
(
7
)
i_c
,
o_c
=
bfly
.
get_io_coordinates
()
assert
i_c
=
[[
2
,
0.25
],
[
3
,
0.75
]]
assert
o_c
=
[[
5
,
0.25
],
[
10
,
0.75
]]
assert
i_c
=
=
[[
2
,
0.25
],
[
3
,
0.75
]]
assert
o_c
=
=
[[
5
,
0.25
],
[
10
,
0.75
]]
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