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
8e231245
Commit
8e231245
authored
5 years ago
by
angloth
Browse files
Options
Downloads
Patches
Plain Diff
Move signalID to SFG class
parent
688796f3
Branches
Branches containing commit
No related tags found
1 merge request
!2
Integrated ID system, traversing and som signal tests
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
b_asic/basic_operation.py
+1
-1
1 addition, 1 deletion
b_asic/basic_operation.py
b_asic/signal.py
+1
-12
1 addition, 12 deletions
b_asic/signal.py
b_asic/signal_flow_graph.py
+7
-4
7 additions, 4 deletions
b_asic/signal_flow_graph.py
b_asic/simulation.py
+0
-1
0 additions, 1 deletion
b_asic/simulation.py
with
9 additions
and
18 deletions
b_asic/basic_operation.py
+
1
−
1
View file @
8e231245
...
...
@@ -23,7 +23,7 @@ class BasicOperation(Operation):
_output_ports
:
List
[
OutputPort
]
_parameters
:
Dict
[
str
,
Optional
[
Any
]]
def
__init__
(
self
,
identifier
:
OperationId
):
def
__init__
(
self
):
"""
Construct a BasicOperation.
"""
...
...
This diff is collapsed.
Click to expand it.
b_asic/signal.py
+
1
−
12
View file @
8e231245
...
...
@@ -6,9 +6,6 @@ TODO: More info.
from
b_asic.operation
import
Operation
from
typing
import
NewType
SignalId
=
NewType
(
"
SignalId
"
,
int
)
class
SignalSource
:
"""
Handle to a signal source.
...
...
@@ -50,22 +47,14 @@ class Signal:
A connection between two operations consisting of a source and destination handle.
TODO: More info.
"""
_identifier
:
SignalId
source
:
SignalSource
destination
:
SignalDestination
def
__init__
(
self
,
identifier
:
SignalId
,
source
:
SignalSource
,
destination
:
SignalDestination
):
def
__init__
(
self
,
source
:
SignalSource
,
destination
:
SignalDestination
):
"""
Construct a Signal.
"""
self
.
_identifier
=
identifier
self
.
source
=
source
self
.
destination
=
destination
def
identifier
(
self
)
->
SignalId
:
"""
Get the unique identifier.
"""
return
self
.
_identifier
# TODO: More stuff.
This diff is collapsed.
Click to expand it.
b_asic/signal_flow_graph.py
+
7
−
4
View file @
8e231245
...
...
@@ -5,12 +5,14 @@ TODO: More info.
from
b_asic.operation
import
Operation
from
b_asic.basic_operation
import
BasicOperation
from
b_asic.signal
import
SignalSource
,
SignalDestination
from
b_asic.signal
import
Signal
,
SignalSource
,
SignalDestination
from
b_asic.simulation
import
SimulationState
,
OperationState
from
typing
import
List
,
Dict
# Types
OperationId
=
NewType
(
"
OperationId
"
,
int
)
SignalId
=
NewType
(
"
SignalId
"
,
int
)
class
SFG
(
BasicOperation
):
...
...
@@ -20,8 +22,9 @@ class SFG(BasicOperation):
"""
_operations
:
Dict
[
OperationID
,
Operation
]
_signals
:
Dict
[
SignalID
,
Signal
]
def
__init__
(
self
,
identifier
:
OperationId
,
input_destinations
:
List
[
SignalDestination
],
output_sources
:
List
[
SignalSource
]):
def
__init__
(
self
,
input_destinations
:
List
[
SignalDestination
],
output_sources
:
List
[
SignalSource
]):
"""
Construct a SFG.
"""
...
...
@@ -29,6 +32,7 @@ class SFG(BasicOperation):
# TODO: Allocate input/output ports with appropriate IDs.
self
.
_operations
=
dict
# Map Operation ID to Operation objects
self
.
_signals
=
dict
# Map Signal ID to Signal objects
# TODO: Traverse the graph between the inputs/outputs and add to self._operations.
# TODO: Connect ports with signals with appropriate IDs.
...
...
@@ -37,6 +41,5 @@ class SFG(BasicOperation):
return
[]
# TODO: Implement
def
split
(
self
)
->
List
[
Operation
]:
return
self
.
_operations
return
self
# TODO: More stuff.
This diff is collapsed.
Click to expand it.
b_asic/simulation.py
+
0
−
1
View file @
8e231245
...
...
@@ -3,7 +3,6 @@ B-ASIC Simulation Module.
TODO: More info.
"""
from
b_asic.operation
import
OperationId
from
numbers
import
Number
from
typing
import
List
,
Dict
...
...
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