Skip to content

Commit

Permalink
fir.py: Fix bug identified in iss #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhinch committed Jan 26, 2022
1 parent da5fb41 commit 4e0b737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ it runs about three times faster (on the order of 15μs).
The `fir_py` module uses a closure to enable the function to retain state
between calls. Usage is as follows:
```python
from fir_py import fir_c
from fir_py import create_fir
from array import array
# 21 tap LPF. Figures from TFilter.
coeffs = array('i', (-1318, -3829, -4009, -717, 3359, 2177, -3706, -5613,
Expand Down
2 changes: 1 addition & 1 deletion fir.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def fir(r0, r1, r2):
asr(r2, r7) # Scale result before summing
add(r0, r2, r0)
sub(r6, 1)
bpl(FILT)
bne(FILT) # > 0. bpl branched when >= 0
pop({r3})
mov(r8, r3) # Restore R8

0 comments on commit 4e0b737

Please sign in to comment.