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
8a72f086
Commit
8a72f086
authored
1 week ago
by
Simon Bjurek
Browse files
Options
Downloads
Patches
Plain Diff
added exception when attempting cyclic scheduling of recursive algorithm with ListScheduler
parent
a29fbf1a
No related branches found
Branches containing commit
No related tags found
1 merge request
!501
Added custom IO times for ASAP and ALAP etc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
b_asic/scheduler.py
+6
-0
6 additions, 0 deletions
b_asic/scheduler.py
b_asic/signal_flow_graph.py
+0
-2
0 additions, 2 deletions
b_asic/signal_flow_graph.py
test/unit/test_list_schedulers.py
+32
-0
32 additions, 0 deletions
test/unit/test_list_schedulers.py
with
38 additions
and
2 deletions
b_asic/scheduler.py
+
6
−
0
View file @
8a72f086
...
...
@@ -280,6 +280,12 @@ class ListScheduler(Scheduler):
self
.
_logger
.
debug
(
"
--- Scheduler initializing ---
"
)
self
.
_initialize_scheduler
(
schedule
)
if
self
.
_sfg
.
loops
and
self
.
_schedule
.
cyclic
:
raise
ValueError
(
"
ListScheduler does not support cyclic scheduling of
"
"
recursive algorithms. Use RecursiveListScheduler instead.
"
)
if
self
.
_input_times
:
self
.
_place_inputs_on_given_times
()
...
...
This diff is collapsed.
Click to expand it.
b_asic/signal_flow_graph.py
+
0
−
2
View file @
8a72f086
...
...
@@ -1872,8 +1872,6 @@ class SFG(AbstractOperation):
"""
Return the recursive loops found in the SFG.
If -1, the SFG does not have any loops.
Returns
-------
A list of the recursive loops.
...
...
This diff is collapsed.
Click to expand it.
test/unit/test_list_schedulers.py
+
32
−
0
View file @
8a72f086
...
...
@@ -1789,6 +1789,38 @@ class TestListScheduler:
),
)
def
test_cyclic_and_recursive_loops
(
self
):
N
=
3
Wc
=
0.2
b
,
a
=
signal
.
butter
(
N
,
Wc
,
btype
=
"
lowpass
"
,
output
=
"
ba
"
)
sfg
=
direct_form_1_iir
(
b
,
a
)
sfg
.
set_latency_of_type_name
(
ConstantMultiplication
.
type_name
(),
2
)
sfg
.
set_execution_time_of_type_name
(
ConstantMultiplication
.
type_name
(),
1
)
sfg
.
set_latency_of_type_name
(
Addition
.
type_name
(),
3
)
sfg
.
set_execution_time_of_type_name
(
Addition
.
type_name
(),
1
)
resources
=
{
Addition
.
type_name
():
1
,
ConstantMultiplication
.
type_name
():
1
,
Input
.
type_name
():
1
,
Output
.
type_name
():
1
,
}
with
pytest
.
raises
(
ValueError
,
match
=
"
ListScheduler does not support cyclic scheduling of recursive algorithms. Use RecursiveListScheduler instead.
"
,
):
Schedule
(
sfg
,
scheduler
=
ListScheduler
(
sort_order
=
((
1
,
True
),
(
3
,
False
),
(
4
,
False
)),
max_resources
=
resources
,
),
cyclic
=
True
,
schedule_time
=
sfg
.
iteration_period_bound
(),
)
class
TestRecursiveListScheduler
:
def
test_empty_sfg
(
self
,
sfg_empty
):
...
...
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