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
Merge requests
!95
Add generation of memory variable list
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add generation of memory variable list
memoryvariablelist
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Oscar Gustafsson
requested to merge
memoryvariablelist
into
master
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Related to
#34 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ef58e619
1 commit,
2 years ago
1 file
+
18
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b_asic/schedule.py
+
18
−
1
Options
@@ -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
Loading