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
6169bc47
Commit
6169bc47
authored
1 year ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Fix move process
parent
a811046e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!387
Fix move process
Pipeline
#97443
passed
1 year ago
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/architecture.py
+9
-3
9 additions, 3 deletions
b_asic/architecture.py
with
9 additions
and
3 deletions
b_asic/architecture.py
+
9
−
3
View file @
6169bc47
...
@@ -277,6 +277,7 @@ class Resource(HardwareBlock):
...
@@ -277,6 +277,7 @@ class Resource(HardwareBlock):
if
not
isinstance
(
proc
,
self
.
operation_type
):
if
not
isinstance
(
proc
,
self
.
operation_type
):
raise
KeyError
(
f
"
{
proc
}
not of type
{
self
.
operation_type
}
"
)
raise
KeyError
(
f
"
{
proc
}
not of type
{
self
.
operation_type
}
"
)
self
.
collection
.
add_process
(
proc
)
self
.
collection
.
add_process
(
proc
)
self
.
_assignment
=
None
def
remove_process
(
self
,
proc
):
def
remove_process
(
self
,
proc
):
self
.
collection
.
remove_process
(
proc
)
self
.
collection
.
remove_process
(
proc
)
...
@@ -512,6 +513,10 @@ of :class:`~b_asic.architecture.ProcessingElement`
...
@@ -512,6 +513,10 @@ of :class:`~b_asic.architecture.ProcessingElement`
return
schedule_times
.
pop
()
return
schedule_times
.
pop
()
def
_build_dicts
(
self
)
->
None
:
def
_build_dicts
(
self
)
->
None
:
self
.
_variable_inport_to_resource
:
Dict
[
InputPort
,
Tuple
[
Resource
,
int
]]
=
{}
self
.
_variable_outport_to_resource
:
Dict
[
OutputPort
,
Tuple
[
Resource
,
int
]]
=
{}
self
.
_operation_inport_to_resource
:
Dict
[
InputPort
,
Resource
]
=
{}
self
.
_operation_outport_to_resource
:
Dict
[
OutputPort
,
Resource
]
=
{}
for
pe
in
self
.
processing_elements
:
for
pe
in
self
.
processing_elements
:
for
operator
in
pe
.
processes
:
for
operator
in
pe
.
processes
:
for
input_port
in
operator
.
operation
.
inputs
:
for
input_port
in
operator
.
operation
.
inputs
:
...
@@ -676,11 +681,12 @@ of :class:`~b_asic.architecture.ProcessingElement`
...
@@ -676,11 +681,12 @@ of :class:`~b_asic.architecture.ProcessingElement`
proc
=
re_from
.
collection
.
from_name
(
proc
)
proc
=
re_from
.
collection
.
from_name
(
proc
)
# Move the process.
# Move the process.
if
proc
not
in
re_from
.
collection
:
if
proc
in
re_from
:
raise
KeyError
(
f
"
{
proc
}
not in
{
re_from
}
"
)
else
:
re_to
.
add_process
(
proc
)
re_to
.
add_process
(
proc
)
re_from
.
remove_process
(
proc
)
re_from
.
remove_process
(
proc
)
else
:
raise
KeyError
(
f
"
{
proc
}
not in
{
re_from
.
entity_name
}
"
)
self
.
_build_dicts
()
def
_digraph
(
self
)
->
Digraph
:
def
_digraph
(
self
)
->
Digraph
:
edges
:
Set
[
Tuple
[
str
,
str
,
str
]]
=
set
()
edges
:
Set
[
Tuple
[
str
,
str
,
str
]]
=
set
()
...
...
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