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
81631595
Commit
81631595
authored
4 years ago
by
Kevin
Browse files
Options
Downloads
Patches
Plain Diff
changed replace_operations method
parent
58f4272f
No related branches found
Branches containing commit
No related tags found
1 merge request
!44
Resolve "Operation Replacement in a SFG"
Pipeline
#14948
failed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/signal_flow_graph.py
+7
-7
7 additions, 7 deletions
b_asic/signal_flow_graph.py
with
7 additions
and
7 deletions
b_asic/signal_flow_graph.py
+
7
−
7
View file @
81631595
...
...
@@ -414,12 +414,12 @@ class SFG(AbstractOperation):
operation: The operation used for replacement.
"""
_sfg
=
self
()
inputs
=
[]
outputs
=
[]
for
_operation
in
self
.
operations
:
if
_operation
.
graph_id
not
in
operation_ids
:
continue
for
_operation
in
[
_sfg
.
find_by_id
(
_id
)
for
_id
in
operation_ids
]:
# Retrive input operations
for
_signal
in
_operation
.
input_signals
:
...
...
@@ -431,8 +431,8 @@ class SFG(AbstractOperation):
if
_signal
.
destination
.
operation
.
graph_id
not
in
operation_ids
:
outputs
.
append
(
_signal
.
destination
.
operation
)
assert
len
(
inputs
)
+
len
(
outputs
)
==
\
operation
.
input_count
+
operation
.
output_count
,
"
The
input and
output count must match
"
assert
len
(
inputs
)
==
operation
.
input_count
,
"
The input count must match
"
assert
len
(
outputs
)
==
operation
.
output_count
,
"
The output count must match
"
for
index_in
,
_input
in
enumerate
(
inputs
):
for
_signal
in
_input
.
output_signals
:
...
...
@@ -443,8 +443,8 @@ class SFG(AbstractOperation):
for
_signal
in
_output
.
input_signals
:
_signal
.
remove_source
()
_signal
.
set_source
(
operation
.
output
(
index_out
))
return
self
()
return
_sfg
def
_evaluate_source
(
self
,
src
:
OutputPort
,
results
:
MutableResultMap
,
registers
:
MutableRegisterMap
,
prefix
:
str
)
->
Number
:
src_prefix
=
prefix
...
...
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