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
ef58e619
Commit
ef58e619
authored
2 years ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Add generation of memory variable list
parent
42f4ce0e
No related branches found
No related tags found
1 merge request
!95
Add generation of memory variable list
Pipeline
#87914
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
+18
-1
18 additions, 1 deletion
b_asic/schedule.py
with
18 additions
and
1 deletion
b_asic/schedule.py
+
18
−
1
View file @
ef58e619
...
...
@@ -19,6 +19,7 @@ import numpy as np
from
b_asic
import
OutputPort
,
Signal
from
b_asic.graph_component
import
GraphID
from
b_asic.process
import
MemoryVariable
from
b_asic.signal_flow_graph
import
SFG
from
b_asic.special_operations
import
Delay
,
Output
...
...
@@ -243,7 +244,7 @@ class Schedule:
self
.
_start_times
=
{
k
:
v
//
factor
for
k
,
v
in
self
.
_start_times
.
items
()
}
for
op_id
,
_
in
self
.
_start_times
.
items
()
:
for
op_id
in
self
.
_start_times
:
self
.
_sfg
.
find_by_id
(
op_id
).
_decrease_time_resolution
(
factor
)
self
.
_schedule_time
=
self
.
_schedule_time
//
factor
return
self
...
...
@@ -407,6 +408,22 @@ class Schedule:
)
self
.
_remove_delays
()
def
_get_memory_variables_list
(
self
)
->
List
[
'
Process
'
]:
ret
=
[]
for
op_id
,
start_time
in
self
.
_start_times
.
items
():
slacks
=
self
.
_forward_slacks
(
op_id
)
for
outport
,
signals
in
slacks
.
items
():
reads
=
{
signal
.
destination
:
slack
for
signal
,
slack
in
signals
.
items
()
}
ret
.
append
(
MemoryVariable
(
start_time
+
outport
.
latency_offset
,
outport
,
reads
)
)
return
ret
def
_plot_schedule
(
self
,
ax
):
def
_draw_arrow
(
start
,
end
,
name
=
""
,
laps
=
0
):
if
end
[
0
]
<
start
[
0
]
or
laps
>
0
:
# Wrap around
...
...
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