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
eb4a5de8
Commit
eb4a5de8
authored
4 months ago
by
Simon Bjurek
Browse files
Options
Downloads
Patches
Plain Diff
linting fixes
parent
97342c36
No related branches found
No related tags found
2 merge requests
!461
Finalize earliest deadline scheduler
,
!459
Qt6 fixes and scheduler class started
Pipeline
#154514
failed
4 months ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/schedule.py
+8
-8
8 additions, 8 deletions
b_asic/schedule.py
b_asic/scheduling_algorithm.py
+1
-0
1 addition, 0 deletions
b_asic/scheduling_algorithm.py
with
9 additions
and
8 deletions
b_asic/schedule.py
+
8
−
8
View file @
eb4a5de8
...
...
@@ -7,7 +7,7 @@ Contains the schedule class for scheduling operations in an SFG.
import
io
import
sys
from
collections
import
defaultdict
from
typing
import
Dict
,
List
,
Literal
,
Optional
,
Sequence
,
Tuple
,
cast
from
typing
import
Dict
,
List
,
Optional
,
Sequence
,
Tuple
,
cast
import
matplotlib.pyplot
as
plt
import
numpy
as
np
...
...
@@ -33,10 +33,10 @@ from b_asic.operation import Operation
from
b_asic.port
import
InputPort
,
OutputPort
from
b_asic.process
import
MemoryVariable
,
OperatorProcess
from
b_asic.resources
import
ProcessCollection
from
b_asic.scheduling_algorithm
import
SchedAlg
from
b_asic.signal_flow_graph
import
SFG
from
b_asic.special_operations
import
Delay
,
Input
,
Output
from
b_asic.types
import
TypeName
from
b_asic.scheduling_algorithm
import
SchedAlg
# Need RGB from 0 to 1
_EXECUTION_TIME_COLOR
:
Tuple
[
float
,
...]
=
tuple
(
...
...
@@ -1229,10 +1229,10 @@ class Schedule:
_repr_html_
=
_repr_svg_
class
Scheduler
()
:
class
Scheduler
:
def
__init__
(
self
,
schedule
:
Schedule
)
->
None
:
self
.
schedule
=
schedule
def
schedule_asap
(
self
)
->
None
:
"""
Schedule the operations using as-soon-as-possible scheduling.
"""
sched
=
self
.
schedule
...
...
@@ -1303,7 +1303,7 @@ class Scheduler():
op_start_time
=
max
(
op_start_time
,
op_start_time_from_in
)
sched
.
_start_times
[
operation
.
graph_id
]
=
op_start_time
# handle output and remove delays
for
output
in
sched
.
_sfg
.
find_by_type_name
(
Output
.
type_name
()):
output
=
cast
(
Output
,
output
)
...
...
@@ -1337,7 +1337,7 @@ class Scheduler():
for
output
in
sched
.
sfg
.
find_by_type_name
(
Output
.
type_name
()):
output
=
cast
(
Output
,
output
)
sched
.
move_operation_alap
(
output
.
graph_id
)
# move all operations ALAP
for
step
in
reversed
(
sched
.
sfg
.
get_precedence_list
()):
for
outport
in
step
:
...
...
@@ -1366,10 +1366,10 @@ class Scheduler():
# operation = outport.operation
# if operation.graph_id not in sched._start_times:
# sched._start_times[operation.graph_id] = 0
# # handle the remaining sets
# for outports in prec_list[2:]:
# for outport in outports:
# operation = outport.operation
# if operation.graph_id not in sched._start_times:
# pass
\ No newline at end of file
# pass
This diff is collapsed.
Click to expand it.
b_asic/scheduling_algorithm.py
+
1
−
0
View file @
eb4a5de8
from
enum
import
Enum
class
SchedAlg
(
Enum
):
ASAP
=
"
ASAP
"
ALAP
=
"
ALAP
"
...
...
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