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
79a285cc
Commit
79a285cc
authored
5 years ago
by
angloth
Browse files
Options
Downloads
Patches
Plain Diff
Rename connect_destination_port to connect_destination and connect_source_port to connect_source
parent
f9e6dc7e
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"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/port.py
+2
-2
2 additions, 2 deletions
b_asic/port.py
b_asic/signal.py
+5
-5
5 additions, 5 deletions
b_asic/signal.py
with
7 additions
and
7 deletions
b_asic/port.py
+
2
−
2
View file @
79a285cc
...
...
@@ -122,7 +122,7 @@ class InputPort(Port):
self
.
_signal
=
signal
if
not
signal
.
port_is_destination
(
self
):
# Connect this inputport as destination for this signal if it isn't already.
signal
.
connect_destination
_port
(
self
)
signal
.
connect_destination
(
self
)
def
disconnect_signal
(
self
,
i
:
int
=
0
)
->
None
:
assert
0
<=
i
<
self
.
signal_count
(),
"
Signal Index out of range.
"
...
...
@@ -174,7 +174,7 @@ class OutputPort(Port):
self
.
_signals
.
append
(
signal
)
if
not
signal
.
port_is_source
(
self
):
# Connect this outputport to the signal if it isn't already
signal
.
connect_source
_port
(
self
)
signal
.
connect_source
(
self
)
def
disconnect_signal
(
self
,
i
:
int
=
0
)
->
None
:
assert
0
<=
i
<
self
.
signal_count
(),
"
Signal index out of bounds.
"
...
...
This diff is collapsed.
Click to expand it.
b_asic/signal.py
+
5
−
5
View file @
79a285cc
...
...
@@ -22,13 +22,13 @@ class Signal(AbstractGraphComponent):
super
().
__init__
(
name
)
self
.
_source
=
source
self
.
_destination
=
destination
self
.
_destination
=
destination
if
source
is
not
None
:
self
.
connect_source
_port
(
source
)
self
.
connect_source
(
source
)
if
destination
is
not
None
:
self
.
connect_destination
_port
(
destination
)
self
.
connect_destination
(
destination
)
@property
def
source
(
self
)
->
"
OutputPort
"
:
...
...
@@ -40,7 +40,7 @@ class Signal(AbstractGraphComponent):
"""
Returns the destination
"
InputPort
"
of the signal.
"""
return
self
.
_destination
def
connect_source
_port
(
self
,
src
:
"
OutputPort
"
)
->
None
:
def
connect_source
(
self
,
src
:
"
OutputPort
"
)
->
None
:
"""
Disconnects the previous source OutputPort of the signal and
connects to the entered source OutputPort. Also connects the entered
source port to the signal if it hasn
'
t already been connected.
...
...
@@ -54,7 +54,7 @@ class Signal(AbstractGraphComponent):
# If the new source isn't connected to this signal then connect it.
src
.
connect_signal
(
self
)
def
connect_destination
_port
(
self
,
dest
:
"
InputPort
"
)
->
None
:
def
connect_destination
(
self
,
dest
:
"
InputPort
"
)
->
None
:
"""
Disconnects the previous destination InputPort of the signal and
connects to the entered destination InputPort. Also connects the entered
destination port to the signal if it hasn
'
t already been connected.
...
...
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