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
Merge requests
!469
Add matrix inversion sfg generator
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add matrix inversion sfg generator
add-matrix-inversion-sfg-generator
into
master
Overview
13
Commits
16
Pipelines
7
Changes
4
Merged
Simon Bjurek
requested to merge
add-matrix-inversion-sfg-generator
into
master
1 month ago
Overview
12
Commits
16
Pipelines
7
Changes
4
Expand
Works for arbitrary real spd matrices. Closes:
#137 (closed)
#200 (closed)
Edited
1 month ago
by
Simon Bjurek
0
0
Merge request reports
Compare
master
version 6
58084c2a
1 month ago
version 5
76dc8737
1 month ago
version 4
13c190a1
1 month ago
version 3
01534e6e
1 month ago
version 2
a633cfd5
1 month ago
version 1
d7aeec30
1 month ago
master (base)
and
version 1
latest version
dc6a5a4a
16 commits,
1 month ago
version 6
58084c2a
7 commits,
1 month ago
version 5
76dc8737
7 commits,
1 month ago
version 4
13c190a1
6 commits,
1 month ago
version 3
01534e6e
5 commits,
1 month ago
version 2
a633cfd5
4 commits,
1 month ago
version 1
d7aeec30
3 commits,
1 month ago
4 files
+
344
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
b_asic/core_operations.py
+
79
−
0
Options
@@ -1099,6 +1099,85 @@ class MAD(AbstractOperation):
p
.
_index
=
i
class
MADS
(
AbstractOperation
):
__slots__
=
(
"
_is_add
"
,
"
_src0
"
,
"
_src1
"
,
"
_src2
"
,
"
_name
"
,
"
_latency
"
,
"
_latency_offsets
"
,
"
_execution_time
"
,
)
_is_add
:
Optional
[
bool
]
_src0
:
Optional
[
SignalSourceProvider
]
_src1
:
Optional
[
SignalSourceProvider
]
_src2
:
Optional
[
SignalSourceProvider
]
_name
:
Name
_latency
:
Optional
[
int
]
_latency_offsets
:
Optional
[
Dict
[
str
,
int
]]
_execution_time
:
Optional
[
int
]
is_swappable
=
True
def
__init__
(
self
,
is_add
:
Optional
[
bool
]
=
True
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
src1
:
Optional
[
SignalSourceProvider
]
=
None
,
src2
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
Name
(
""
),
latency
:
Optional
[
int
]
=
None
,
latency_offsets
:
Optional
[
Dict
[
str
,
int
]]
=
None
,
execution_time
:
Optional
[
int
]
=
None
,
):
"""
Construct a MADS operation.
"""
super
().
__init__
(
input_count
=
3
,
output_count
=
1
,
name
=
Name
(
name
),
input_sources
=
[
src0
,
src1
,
src2
],
latency
=
latency
,
latency_offsets
=
latency_offsets
,
execution_time
=
execution_time
,
)
self
.
set_param
(
"
is_add
"
,
is_add
)
@classmethod
def
type_name
(
cls
)
->
TypeName
:
return
TypeName
(
"
mads
"
)
def
evaluate
(
self
,
a
,
b
,
c
):
return
a
+
b
*
c
if
self
.
is_add
else
a
-
b
*
c
@property
def
is_add
(
self
)
->
bool
:
"""
Get if operation is an addition.
"""
return
self
.
param
(
"
is_add
"
)
@is_add.setter
def
is_add
(
self
,
is_add
:
bool
)
->
None
:
"""
Set if operation is an addition.
"""
self
.
set_param
(
"
is_add
"
,
is_add
)
@property
def
is_linear
(
self
)
->
bool
:
return
(
self
.
input
(
0
).
connected_source
.
operation
.
is_constant
or
self
.
input
(
1
).
connected_source
.
operation
.
is_constant
)
def
swap_io
(
self
)
->
None
:
self
.
_input_ports
=
[
self
.
_input_ports
[
1
],
self
.
_input_ports
[
0
],
self
.
_input_ports
[
2
],
]
for
i
,
p
in
enumerate
(
self
.
_input_ports
):
p
.
_index
=
i
class
SymmetricTwoportAdaptor
(
AbstractOperation
):
r
"""
Wave digital filter symmetric twoport-adaptor operation.
Loading