Skip to content
Snippets Groups Projects
Commit 5afbe98d authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Add test for FIR generators

parent d4d6f12a
No related branches found
No related tags found
1 merge request!181Firtesting
This commit is part of merge request !181. Comments created here will be created in the context of that merge request.
...@@ -57,6 +57,13 @@ def test_direct_form_fir(): ...@@ -57,6 +57,13 @@ def test_direct_form_fir():
len([comp for comp in sfg.components if isinstance(comp, Delay)]) == 2 len([comp for comp in sfg.components if isinstance(comp, Delay)]) == 2
) )
sfg = direct_form_fir(
(0.3, 0.4, 0.5, 0.6, 0.3),
mult_properties={'latency': 2, 'execution_time': 1},
add_properties={'latency': 1, 'execution_time': 1},
)
assert sfg.critical_path() == 6
def test_transposed_direct_form_fir(): def test_transposed_direct_form_fir():
sfg = transposed_direct_form_fir([0.3, 0.5, 0.7]) sfg = transposed_direct_form_fir([0.3, 0.5, 0.7])
...@@ -77,3 +84,10 @@ def test_transposed_direct_form_fir(): ...@@ -77,3 +84,10 @@ def test_transposed_direct_form_fir():
assert ( assert (
len([comp for comp in sfg.components if isinstance(comp, Delay)]) == 2 len([comp for comp in sfg.components if isinstance(comp, Delay)]) == 2
) )
sfg = transposed_direct_form_fir(
(0.3, 0.4, 0.5, 0.6, 0.3),
mult_properties={'latency': 2, 'execution_time': 1},
add_properties={'latency': 1, 'execution_time': 1},
)
assert sfg.critical_path() == 3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment