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
!256
Add button to recompute the plot limits
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add button to recompute the plot limits
relim
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Oscar Gustafsson
requested to merge
relim
into
master
2 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Compare
version 1
version 1
5d3cae2f
2 years ago
master (base)
and
latest version
latest version
d0b7c72f
1 commit,
2 years ago
version 1
5d3cae2f
1 commit,
2 years ago
Show latest version
1 file
+
12
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b_asic/resources.py
+
12
−
6
Options
@@ -860,6 +860,8 @@ class ProcessCollection:
def
graph_color_cell_assignment
(
self
,
coloring_strategy
:
str
=
"
saturation_largest_first
"
,
*
,
coloring
:
Optional
[
Dict
[
Process
,
int
]]
=
None
,
)
->
Set
[
"
ProcessCollection
"
]:
"""
Perform cell assignment of the processes in this collection using graph coloring with networkx.coloring.greedy_color.
@@ -869,6 +871,9 @@ class ProcessCollection:
----------
coloring_strategy : str, default:
"
saturation_largest_first
"
Graph coloring strategy passed to networkx.coloring.greedy_color().
coloring : dictionary, optional
An optional graph coloring, dictionary with Process and its associated color (int).
If a graph coloring is not provided throught this parameter, one will be created when calling this method.
Returns
-------
@@ -877,15 +882,16 @@ class ProcessCollection:
"""
cell_assignment
:
Dict
[
int
,
ProcessCollection
]
=
dict
()
exclusion_graph
=
self
.
create_exclusion_graph_from_execution_time
()
coloring
:
Dict
[
Process
,
int
]
=
nx
.
coloring
.
greedy_color
(
exclusion_graph
,
strategy
=
coloring_strategy
)
if
coloring
is
None
:
coloring
=
nx
.
coloring
.
greedy_color
(
exclusion_graph
,
strategy
=
coloring_strategy
)
for
process
,
cell
in
coloring
.
items
():
try
:
cell_assignment
[
cell
].
add_process
(
process
)
except
:
if
cell
not
in
cell_assignment
:
cell_assignment
[
cell
]
=
ProcessCollection
(
set
(),
self
.
_schedule_time
)
cell_assignment
[
cell
].
add_process
(
process
)
else
:
cell_assignment
[
cell
].
add_process
(
process
)
return
set
(
cell_assignment
.
values
())
def
left_edge_cell_assignment
(
self
)
->
Dict
[
int
,
"
ProcessCollection
"
]:
Loading