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
579bf5d2
Commit
579bf5d2
authored
1 year ago
by
Hugo Winbladh
Committed by
Oscar Gustafsson
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add method to reconstruct an SFG from a schedule, and algorithm to simplify delays
parent
c2b55947
No related branches found
No related tags found
1 merge request
!420
Add method to reconstruct SFG from a schedule
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/schedule.py
+7
-0
7 additions, 0 deletions
b_asic/schedule.py
b_asic/signal_flow_graph.py
+21
-0
21 additions, 0 deletions
b_asic/signal_flow_graph.py
with
28 additions
and
0 deletions
b_asic/schedule.py
+
7
−
0
View file @
579bf5d2
...
...
@@ -760,6 +760,13 @@ class Schedule:
del
self
.
_laps
[
delay_input_id
]
delay_list
=
self
.
_sfg
.
find_by_type_name
(
Delay
.
type_name
())
def
_reintroduce_delays
(
self
)
->
SFG
:
reconstructed_sfg
=
self
.
_sfg
()
for
signal_id
,
lap
in
self
.
_laps
.
items
():
for
delays
in
range
(
lap
):
reconstructed_sfg
=
reconstructed_sfg
.
insert_operation_after
(
signal_id
,
Delay
())
return
reconstructed_sfg
()
def
_schedule_alap
(
self
)
->
None
:
"""
Schedule the operations using as-late-as-possible scheduling.
"""
precedence_list
=
self
.
_sfg
.
get_precedence_list
()
...
...
This diff is collapsed.
Click to expand it.
b_asic/signal_flow_graph.py
+
21
−
0
View file @
579bf5d2
...
...
@@ -736,6 +736,27 @@ class SFG(AbstractOperation):
# Recreate the newly coupled SFG so that all attributes are correct.
return
sfg_copy
()
def
simplify_delay_element_placement
(
self
)
->
"
SFG
"
:
sfg_copy
=
self
()
for
delay_element
in
sfg_copy
.
find_by_type_name
(
Delay
.
type_name
()):
neighboring_delays
=
[]
if
len
(
delay_element
.
inputs
[
0
].
signals
)
>
0
:
for
signal
in
delay_element
.
inputs
[
0
].
signals
[
0
].
source
.
signals
:
if
isinstance
(
signal
.
destination
.
operation
,
Delay
):
neighboring_delays
.
append
(
signal
.
destination
.
operation
)
if
delay_element
in
neighboring_delays
:
neighboring_delays
.
remove
(
delay_element
)
for
delay
in
neighboring_delays
:
for
output
in
delay
.
outputs
[
0
].
signals
:
output
.
set_source
(
delay_element
.
outputs
[
0
])
in_sig
=
delay
.
input
(
0
).
signals
[
0
]
delay
.
input
(
0
).
remove_signal
(
in_sig
)
in_sig
.
source
.
remove_signal
(
in_sig
)
return
sfg_copy
()
def
_insert_operation_after_operation
(
self
,
output_operation
:
Operation
,
new_operation
:
Operation
):
...
...
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