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
!486
Refactored ListScheduler, made it non-abstract and added better checks to...
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Refactored ListScheduler, made it non-abstract and added better checks to...
refactor-list-scheduler
into
master
Overview
5
Commits
2
Pipelines
4
Changes
5
Merged
Simon Bjurek
requested to merge
refactor-list-scheduler
into
master
1 month ago
Overview
5
Commits
2
Pipelines
4
Changes
1
Expand
Refactored ListScheduler by breaking into sub-functions.
Made ListScheduler non-abstract since one may want to provide custom sorting indicies.
Added better checks to compare recreated SFG with original SFG in tests.
Converted iteration period bound return type to Fraction
Edited
1 month ago
by
Simon Bjurek
0
0
Merge request reports
Compare
version 1
version 3
130ea10c
1 month ago
version 2
228ead73
1 month ago
version 1
7eafb1fe
1 month ago
master (base)
and
version 2
latest version
c0dc4686
2 commits,
1 month ago
version 3
130ea10c
2 commits,
1 month ago
version 2
228ead73
1 commit,
1 month ago
version 1
7eafb1fe
1 commit,
1 month ago
Show latest version
1 file
+
103
−
80
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
test/unit/test_list_schedulers.py
+
103
−
80
Options
@@ -614,86 +614,109 @@ class TestHybridScheduler:
@@ -614,86 +614,109 @@ class TestHybridScheduler:
# This schedule that this test is checking against is faulty and will yield a non-working
# This schedule that this test is checking against is faulty and will yield a non-working
# fft implementation, however, it is kept commented out for reference
# fft implementation, however, it is kept commented out for reference
# def test_radix_2_fft_8_points_specified_IO_times_cyclic(self):
def
test_radix_2_fft_8_points_specified_IO_times_cyclic
(
self
):
# sfg = radix_2_dif_fft(points=8)
sfg
=
radix_2_dif_fft
(
points
=
8
)
# sfg.set_latency_of_type(Butterfly.type_name(), 3)
sfg
.
set_latency_of_type
(
Butterfly
.
type_name
(),
3
)
# sfg.set_latency_of_type(ConstantMultiplication.type_name(), 2)
sfg
.
set_latency_of_type
(
ConstantMultiplication
.
type_name
(),
2
)
# sfg.set_execution_time_of_type(Butterfly.type_name(), 1)
sfg
.
set_execution_time_of_type
(
Butterfly
.
type_name
(),
1
)
# sfg.set_execution_time_of_type(ConstantMultiplication.type_name(), 1)
sfg
.
set_execution_time_of_type
(
ConstantMultiplication
.
type_name
(),
1
)
# resources = {
resources
=
{
# Butterfly.type_name(): 1,
Butterfly
.
type_name
():
1
,
# ConstantMultiplication.type_name(): 1,
ConstantMultiplication
.
type_name
():
1
,
# Input.type_name(): sys.maxsize,
Input
.
type_name
():
sys
.
maxsize
,
# Output.type_name(): sys.maxsize,
Output
.
type_name
():
sys
.
maxsize
,
# }
}
# input_times = {
input_times
=
{
# "in0": 0,
"
in0
"
:
0
,
# "in1": 1,
"
in1
"
:
1
,
# "in2": 2,
"
in2
"
:
2
,
# "in3": 3,
"
in3
"
:
3
,
# "in4": 4,
"
in4
"
:
4
,
# "in5": 5,
"
in5
"
:
5
,
# "in6": 6,
"
in6
"
:
6
,
# "in7": 7,
"
in7
"
:
7
,
# }
}
# output_times = {
output_times
=
{
# "out0": 0,
"
out0
"
:
0
,
# "out1": 1,
"
out1
"
:
1
,
# "out2": 2,
"
out2
"
:
2
,
# "out3": 3,
"
out3
"
:
3
,
# "out4": 4,
"
out4
"
:
4
,
# "out5": 5,
"
out5
"
:
5
,
# "out6": 6,
"
out6
"
:
6
,
# "out7": 7,
"
out7
"
:
7
,
# }
}
# schedule = Schedule(
schedule
=
Schedule
(
# sfg,
sfg
,
# scheduler=HybridScheduler(
scheduler
=
HybridScheduler
(
# resources, input_times=input_times, output_delta_times=output_times
resources
,
input_times
=
input_times
,
output_delta_times
=
output_times
# ),
),
# schedule_time=20,
schedule_time
=
20
,
# cyclic=True,
cyclic
=
True
,
# )
)
# assert schedule.start_times == {
assert
schedule
.
start_times
==
{
# "in0": 0,
"
in0
"
:
0
,
# "in1": 1,
"
in1
"
:
1
,
# "in2": 2,
"
in2
"
:
2
,
# "in3": 3,
"
in3
"
:
3
,
# "in4": 4,
"
in4
"
:
4
,
# "in5": 5,
"
in5
"
:
5
,
# "in6": 6,
"
in6
"
:
6
,
# "in7": 7,
"
in7
"
:
7
,
# "bfly0": 4,
"
bfly0
"
:
4
,
# "bfly8": 5,
"
bfly8
"
:
5
,
# "bfly11": 6,
"
bfly11
"
:
6
,
# "bfly6": 7,
"
bfly6
"
:
7
,
# "cmul2": 8,
"
cmul2
"
:
8
,
# "cmul0": 9,
"
cmul0
"
:
9
,
# "bfly1": 9,
"
bfly1
"
:
9
,
# "cmul3": 10,
"
cmul3
"
:
10
,
# "bfly7": 10,
"
bfly7
"
:
10
,
# "bfly2": 11,
"
bfly2
"
:
11
,
# "bfly5": 12,
"
bfly5
"
:
12
,
# "cmul4": 13,
"
cmul4
"
:
13
,
# "bfly9": 13,
"
bfly9
"
:
13
,
# "bfly3": 15,
"
bfly3
"
:
15
,
# "cmul1": 15,
"
cmul1
"
:
15
,
# "bfly10": 16,
"
bfly10
"
:
16
,
# "bfly4": 17,
"
bfly4
"
:
17
,
# "out0": 17,
"
out0
"
:
17
,
# "out1": 18,
"
out1
"
:
18
,
# "out2": 19,
"
out2
"
:
19
,
# "out3": 20,
"
out3
"
:
20
,
# "out4": 1,
"
out4
"
:
1
,
# "out5": 2,
"
out5
"
:
2
,
# "out6": 3,
"
out6
"
:
3
,
# "out7": 4,
"
out7
"
:
4
,
# }
}
# assert schedule.schedule_time == 20
assert
schedule
.
schedule_time
==
20
# _validate_recreated_sfg_fft(schedule, 8)
# impulse input -> constant output
sim
=
Simulation
(
schedule
.
sfg
,
[
Impulse
()]
+
[
0
for
i
in
range
(
7
)])
sim
.
run_for
(
2
)
assert
np
.
allclose
(
sim
.
results
[
"
0
"
],
[
1
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
1
"
],
[
1
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
2
"
],
[
1
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
3
"
],
[
1
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
4
"
],
[
0
,
1
])
assert
np
.
allclose
(
sim
.
results
[
"
5
"
],
[
0
,
1
])
assert
np
.
allclose
(
sim
.
results
[
"
6
"
],
[
0
,
1
])
assert
np
.
allclose
(
sim
.
results
[
"
7
"
],
[
0
,
1
])
# constant input -> impulse (with weight=points) output
sim
=
Simulation
(
schedule
.
sfg
,
[
Impulse
()
for
i
in
range
(
8
)])
sim
.
run_for
(
2
)
assert
np
.
allclose
(
sim
.
results
[
"
0
"
],
[
8
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
1
"
],
[
0
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
2
"
],
[
0
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
3
"
],
[
0
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
4
"
],
[
0
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
5
"
],
[
0
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
6
"
],
[
0
,
0
])
assert
np
.
allclose
(
sim
.
results
[
"
7
"
],
[
0
,
0
])
def
test_radix_2_fft_8_points_specified_IO_times_non_cyclic
(
self
):
def
test_radix_2_fft_8_points_specified_IO_times_non_cyclic
(
self
):
sfg
=
radix_2_dif_fft
(
points
=
8
)
sfg
=
radix_2_dif_fft
(
points
=
8
)
Loading