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
d3e9250e
Commit
d3e9250e
authored
2 years ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Fix reverse wrapping
parent
f1d41cb0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#88025
passed
2 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/scheduler_gui/graphics_graph_event.py
+6
-0
6 additions, 0 deletions
b_asic/scheduler_gui/graphics_graph_event.py
b_asic/scheduler_gui/graphics_graph_item.py
+17
-12
17 additions, 12 deletions
b_asic/scheduler_gui/graphics_graph_item.py
with
23 additions
and
12 deletions
b_asic/scheduler_gui/graphics_graph_event.py
+
6
−
0
View file @
d3e9250e
...
...
@@ -229,8 +229,14 @@ class GraphicsGraphEvent: # PyQt5
self
.
set_item_inactive
(
item
)
self
.
set_new_starttime
(
item
)
pos
=
item
.
x
()
redraw
=
False
if
pos
<
0
:
pos
+=
self
.
schedule
.
schedule_time
redraw
=
True
if
pos
>
self
.
schedule
.
schedule_time
:
pos
=
pos
%
self
.
schedule
.
schedule_time
redraw
=
True
if
redraw
:
item
.
setX
(
pos
)
self
.
_redraw_lines
(
item
)
...
...
This diff is collapsed.
Click to expand it.
b_asic/scheduler_gui/graphics_graph_item.py
+
17
−
12
View file @
d3e9250e
...
...
@@ -79,19 +79,20 @@ class GraphicsGraphItem(
slacks
=
self
.
schedule
.
slacks
(
item
.
op_id
)
op_start_time
=
self
.
schedule
.
start_time_of_operation
(
item
.
op_id
)
if
not
-
slacks
[
0
]
<=
new_start_time
-
op_start_time
<=
slacks
[
1
]:
# Cannot move due to dependencies
return
False
if
pos
<
0
:
return
False
if
(
self
.
schedule
.
cyclic
and
new_start_time
>
self
.
schedule
.
schedule_time
+
1
):
return
False
if
(
not
self
.
schedule
.
cyclic
and
new_start_time
+
end_time
>
self
.
schedule
.
schedule_time
+
1
)
:
return
False
if
self
.
schedule
.
cyclic
:
if
new_start_time
<
-
1
:
# Moving one position before left edge => wrap
return
False
if
new_start_time
>
self
.
schedule
.
schedule_time
+
1
:
# Moving one position after schedule_time => wrap
return
False
else
:
if
pos
<
0
:
return
False
if
new_start_time
+
end_time
>
self
.
schedule
.
schedule_time
:
return
False
return
True
...
...
@@ -137,6 +138,10 @@ class GraphicsGraphItem(
self
.
schedule
.
schedule_time
+
delta_time
)
self
.
_axes
.
set_width
(
self
.
_axes
.
width
+
delta_time
)
# Redraw all lines
for
signals
in
self
.
_signal_dict
.
values
():
for
signal
in
signals
:
signal
.
update_path
()
@property
def
schedule
(
self
)
->
Schedule
:
...
...
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