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
97269bac
Commit
97269bac
authored
5 years ago
by
angloth
Browse files
Options
Downloads
Patches
Plain Diff
Add fixes to some pylint comments
parent
f2d502b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!9
Resolve #1 "Port Interface", #8 "Port Coupling"
Checking pipeline status
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/port.py
+4
-3
4 additions, 3 deletions
b_asic/port.py
b_asic/signal.py
+3
-2
3 additions, 2 deletions
b_asic/signal.py
with
7 additions
and
5 deletions
b_asic/port.py
+
4
−
3
View file @
97269bac
...
...
@@ -129,7 +129,7 @@ class InputPort(Port):
old_signal
:
Signal
=
self
.
_signal
self
.
_signal
=
None
if
old_signal
.
port_is_destination
(
self
):
# Disconnect the dest
ination
of the signal if this inputport currently is the dest
ination
# Disconnect the dest of the signal if this inputport currently is the dest
old_signal
.
disconnect_destination
()
old_signal
.
disconnect_destination
()
...
...
@@ -169,7 +169,8 @@ class OutputPort(Port):
return
signal
def
connect_to_signal
(
self
,
signal
:
Signal
)
->
None
:
assert
not
self
.
is_connected_to_signal
(
signal
),
"
Attempting to connect to Signal already connected.
"
assert
not
self
.
is_connected_to_signal
(
signal
),
\
"
Attempting to connect to Signal already connected.
"
self
.
_signals
.
append
(
signal
)
if
not
signal
.
is_source
(
self
):
# Connect this outputport to the signal if it isn't already
...
...
@@ -184,7 +185,7 @@ class OutputPort(Port):
old_signal
.
disconnect_source
()
def
disconnect_signal_by_ref
(
self
,
signal
:
Signal
)
->
None
:
"""
Removes the signal that was entered from the OutputPorts signals.
"""
Removes the signal that was entered from the OutputPorts signals.
If the entered signal still is connected to this port then disconnects the
entered signal from the port aswell.
...
...
This diff is collapsed.
Click to expand it.
b_asic/signal.py
+
3
−
2
View file @
97269bac
...
...
@@ -11,6 +11,7 @@ if TYPE_CHECKING:
class
Signal
(
AbstractGraphComponent
):
"""
A connection between two ports.
"""
_source
:
"
OutputPort
"
_destination
:
"
InputPort
"
...
...
@@ -106,7 +107,7 @@ class Signal(AbstractGraphComponent):
def
has_source
(
self
)
->
bool
:
"""
Returns true if the signal is connected to a source, else false.
"""
return
self
.
_source
is
not
None
def
has_destination
(
self
)
->
bool
:
"""
Returns true if the signal is connected to a destination, else false.
"""
return
self
.
_destination
is
not
None
\ No newline at end of file
return
self
.
_destination
is
not
None
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