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
778a2daf
Commit
778a2daf
authored
2 years ago
by
Andreas Bolin
Browse files
Options
Downloads
Patches
Plain Diff
Made Schedule.get_max_end_time() public.
parent
84010dbc
No related branches found
Branches containing commit
No related tags found
1 merge request
!78
Add scheduler GUI
Pipeline
#73301
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/schedule.py
+4
-3
4 additions, 3 deletions
b_asic/schedule.py
with
4 additions
and
3 deletions
b_asic/schedule.py
+
4
−
3
View file @
778a2daf
...
...
@@ -41,7 +41,7 @@ class Schedule:
raise
NotImplementedError
(
f
"
No algorithm with name:
{
scheduling_alg
}
defined.
"
)
max_end_time
=
self
.
_
get_max_end_time
()
max_end_time
=
self
.
get_max_end_time
()
if
schedule_time
is
None
:
self
.
_schedule_time
=
max_end_time
...
...
@@ -56,7 +56,8 @@ class Schedule:
assert
op_id
in
self
.
_start_times
,
"
No operation with the specified op_id in this schedule.
"
return
self
.
_start_times
[
op_id
]
def
_get_max_end_time
(
self
)
->
int
:
def
get_max_end_time
(
self
)
->
int
:
"""
Returnes the current maximum end time among all operations.
"""
max_end_time
=
0
for
op_id
,
op_start_time
in
self
.
_start_times
.
items
():
op
=
self
.
_sfg
.
find_by_id
(
op_id
)
...
...
@@ -126,7 +127,7 @@ class Schedule:
raise
NotImplementedError
def
set_schedule_time
(
self
,
time
:
int
)
->
"
Schedule
"
:
assert
self
.
_
get_max_end_time
()
<=
time
,
"
New schedule time to short.
"
assert
self
.
get_max_end_time
()
<=
time
,
"
New schedule time to short.
"
self
.
_schedule_time
=
time
return
self
...
...
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