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
7bc7c3b6
Commit
7bc7c3b6
authored
5 years ago
by
Ivar Härnqvist
Browse files
Options
Downloads
Patches
Plain Diff
fix stuff
parent
4560c587
No related branches found
No related tags found
1 merge request
!18
Resolve "Create SFG"
Pipeline
#11878
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/core_operations.py
+13
-13
13 additions, 13 deletions
b_asic/core_operations.py
with
13 additions
and
13 deletions
b_asic/core_operations.py
+
13
−
13
View file @
7bc7c3b6
...
...
@@ -116,7 +116,7 @@ class SquareRoot(AbstractOperation):
return
"
sqrt
"
def
evaluate
(
self
,
a
):
return
sqrt
(
(
complex
)
(
a
))
return
sqrt
(
complex
(
a
))
class
ComplexConjugate
(
AbstractOperation
):
...
...
@@ -192,16 +192,16 @@ class ConstantMultiplication(AbstractOperation):
TODO: More info.
"""
def
__init__
(
self
,
coefficient
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
def
__init__
(
self
,
value
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
super
().
__init__
(
input_count
=
1
,
output_count
=
1
,
name
=
name
,
input_sources
=
[
src0
])
self
.
_param
eters
[
"
coefficient
"
]
=
coefficient
self
.
set
_param
(
"
value
"
,
value
)
@property
def
type_name
(
self
)
->
TypeName
:
return
"
cmul
"
def
evaluate
(
self
,
a
):
return
a
*
self
.
param
(
"
coefficient
"
)
return
a
*
self
.
param
(
"
value
"
)
class
ConstantAddition
(
AbstractOperation
):
...
...
@@ -209,16 +209,16 @@ class ConstantAddition(AbstractOperation):
TODO: More info.
"""
def
__init__
(
self
,
coefficient
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
def
__init__
(
self
,
value
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
super
().
__init__
(
input_count
=
1
,
output_count
=
1
,
name
=
name
,
input_sources
=
[
src0
])
self
.
_param
eters
[
"
coefficient
"
]
=
coefficient
self
.
set
_param
(
"
value
"
,
value
)
@property
def
type_name
(
self
)
->
TypeName
:
return
"
cadd
"
def
evaluate
(
self
,
a
):
return
a
+
self
.
param
(
"
coefficient
"
)
return
a
+
self
.
param
(
"
value
"
)
class
ConstantSubtraction
(
AbstractOperation
):
...
...
@@ -226,16 +226,16 @@ class ConstantSubtraction(AbstractOperation):
TODO: More info.
"""
def
__init__
(
self
,
coefficient
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
def
__init__
(
self
,
value
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
super
().
__init__
(
input_count
=
1
,
output_count
=
1
,
name
=
name
,
input_sources
=
[
src0
])
self
.
_param
eters
[
"
coefficient
"
]
=
coefficient
self
.
set
_param
(
"
value
"
,
value
)
@property
def
type_name
(
self
)
->
TypeName
:
return
"
csub
"
def
evaluate
(
self
,
a
):
return
a
-
self
.
param
(
"
coefficient
"
)
return
a
-
self
.
param
(
"
value
"
)
class
ConstantDivision
(
AbstractOperation
):
...
...
@@ -243,16 +243,16 @@ class ConstantDivision(AbstractOperation):
TODO: More info.
"""
def
__init__
(
self
,
coefficient
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
def
__init__
(
self
,
value
:
Number
,
src0
:
Optional
[
SignalSourceProvider
]
=
None
,
name
:
Name
=
""
):
super
().
__init__
(
input_count
=
1
,
output_count
=
1
,
name
=
name
,
input_sources
=
[
src0
])
self
.
_param
eters
[
"
coefficient
"
]
=
coefficient
self
.
set
_param
(
"
value
"
,
value
)
@property
def
type_name
(
self
)
->
TypeName
:
return
"
cdiv
"
def
evaluate
(
self
,
a
):
return
a
/
self
.
param
(
"
coefficient
"
)
return
a
/
self
.
param
(
"
value
"
)
class
Butterfly
(
AbstractOperation
):
"""
Butterfly operation that returns two outputs.
...
...
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