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
!42
Resolve "Operation to SFG Conversion"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Operation to SFG Conversion"
80-operation-to-sfg-conversion
into
develop
Overview
10
Commits
21
Pipelines
5
Changes
6
Merged
Kevin Scott
requested to merge
80-operation-to-sfg-conversion
into
develop
4 years ago
Overview
10
Commits
21
Pipelines
5
Changes
6
Expand
Added to_sfg method, MAD operation and some tests.
Closes
#80 (closed)
Edited
4 years ago
by
Kevin Scott
0
0
Merge request reports
Compare
develop
version 4
85ac2deb
4 years ago
version 3
5fb16095
4 years ago
version 2
a9c65a59
4 years ago
version 1
5f4a6c77
4 years ago
develop (base)
and
latest version
latest version
4d4f987b
21 commits,
4 years ago
version 4
85ac2deb
20 commits,
4 years ago
version 3
5fb16095
19 commits,
4 years ago
version 2
a9c65a59
18 commits,
4 years ago
version 1
5f4a6c77
17 commits,
4 years ago
6 files
+
78
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
b_asic/core_operations.py
+
15
−
0
Options
@@ -240,3 +240,18 @@ class Butterfly(AbstractOperation):
def
evaluate
(
self
,
a
,
b
):
return
a
+
b
,
a
-
b
class
MAD
(
AbstractOperation
):
"""
Multiply-and-add operation.
TODO: More info.
"""
def
__init__
(
self
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
src1
:
Optional
[
SignalSourceProvider
]
=
None
,
src2
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
super
().
__init__
(
input_count
=
3
,
output_count
=
1
,
name
=
name
,
input_sources
=
[
src0
,
src1
,
src2
])
@property
def
type_name
(
self
)
->
TypeName
:
return
"
mad
"
def
evaluate
(
self
,
a
,
b
,
c
):
return
a
*
b
+
c
Loading