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
8d623e09
Commit
8d623e09
authored
4 weeks ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Rework IO times example
parent
0b8e4dd4
No related branches found
Branches containing commit
No related tags found
1 merge request
!477
Rework IO times example
Pipeline
#157052
failed
4 weeks ago
Stage: test
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/auto_scheduling_with_custom_io_times.py
+7
-33
7 additions, 33 deletions
examples/auto_scheduling_with_custom_io_times.py
with
7 additions
and
33 deletions
examples/auto_scheduling_with_custom_io_times.py
+
7
−
33
View file @
8d623e09
...
...
@@ -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
(
...
...
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