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
!477
Rework IO times example
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Rework IO times example
ioexample
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Oscar Gustafsson
requested to merge
ioexample
into
master
1 month ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
8d623e09
Show latest version
1 file
+
7
−
33
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8d623e09
Rework IO times example
· 8d623e09
Oscar Gustafsson
authored
1 month ago
examples/auto_scheduling_with_custom_io_times.py
+
7
−
33
Options
@@ -11,7 +11,8 @@ from b_asic.schedule import Schedule
from
b_asic.scheduler
import
ASAPScheduler
from
b_asic.sfg_generators
import
radix_2_dif_fft
sfg
=
radix_2_dif_fft
(
points
=
8
)
points
=
8
sfg
=
radix_2_dif_fft
(
points
=
points
)
# %%
# The SFG is
@@ -19,8 +20,8 @@ sfg
# %%
# Set latencies and execution times.
sfg
.
set_latency_of_type
(
Butterfly
.
type_name
(),
3
)
sfg
.
set_latency_of_type
(
ConstantMultiplication
.
type_name
(),
2
)
sfg
.
set_latency_of_type
(
Butterfly
.
type_name
(),
1
)
sfg
.
set_latency_of_type
(
ConstantMultiplication
.
type_name
(),
3
)
sfg
.
set_execution_time_of_type
(
Butterfly
.
type_name
(),
1
)
sfg
.
set_execution_time_of_type
(
ConstantMultiplication
.
type_name
(),
1
)
@@ -32,26 +33,8 @@ schedule.show()
# %%
# Generate a non-cyclic Schedule from HybridScheduler with custom IO times.
resources
=
{
Butterfly
.
type_name
():
1
,
ConstantMultiplication
.
type_name
():
1
}
input_times
=
{
"
in0
"
:
0
,
"
in1
"
:
1
,
"
in2
"
:
2
,
"
in3
"
:
3
,
"
in4
"
:
4
,
"
in5
"
:
5
,
"
in6
"
:
6
,
"
in7
"
:
7
,
}
output_delta_times
=
{
"
out0
"
:
-
2
,
"
out1
"
:
-
1
,
"
out2
"
:
0
,
"
out3
"
:
1
,
"
out4
"
:
2
,
"
out5
"
:
3
,
"
out6
"
:
4
,
"
out7
"
:
5
,
}
input_times
=
{
f
"
in
{
i
}
"
:
i
for
i
in
range
(
points
)}
output_delta_times
=
{
f
"
out
{
i
}
"
:
i
-
2
for
i
in
range
(
points
)}
schedule
=
Schedule
(
sfg
,
scheduler
=
HybridScheduler
(
@@ -64,16 +47,7 @@ schedule.show()
# %%
# Generate a new Schedule with cyclic scheduling enabled
output_delta_times
=
{
"
out0
"
:
0
,
"
out1
"
:
1
,
"
out2
"
:
2
,
"
out3
"
:
3
,
"
out4
"
:
4
,
"
out5
"
:
5
,
"
out6
"
:
6
,
"
out7
"
:
7
,
}
output_delta_times
=
{
f
"
out
{
i
}
"
:
i
for
i
in
range
(
points
)}
schedule
=
Schedule
(
sfg
,
scheduler
=
HybridScheduler
(
Loading