diff options
author | Jon Nordby <jononor@gmail.com> | 2025-08-08 22:13:15 +0200 |
---|---|---|
committer | Jon Nordby <jononor@gmail.com> | 2025-08-08 22:22:39 +0200 |
commit | 23ef09d5dd337049458b48eaf9ed7ece3f887592 (patch) | |
tree | 3df98fb87f969ceab2786c2bb31bbe3982db6abf /bindings/sim_cic3_pdm.cc | |
parent | 03feeb8419b46c858f56ac70142780f039881b45 (diff) |
pdm: Try switch to 2 stage CIC
Still seeing odd spikes on output
Diffstat (limited to 'bindings/sim_cic3_pdm.cc')
-rw-r--r-- | bindings/sim_cic3_pdm.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bindings/sim_cic3_pdm.cc b/bindings/sim_cic3_pdm.cc index cb612f8..982581f 100644 --- a/bindings/sim_cic3_pdm.cc +++ b/bindings/sim_cic3_pdm.cc @@ -6,7 +6,7 @@ #include "verilated.h" int -pdm2pcm_cic3(const uint8_t *pdm, int pdm_length, int16_t *pcm, int pcm_length) +pdm2pcm_cic3(const uint8_t *pdm, int64_t pdm_length, int16_t *pcm, int32_t pcm_length, uint8_t hpf_alpha, uint8_t scale_shift) { // FIXME: verify that output buffer is large enough @@ -15,7 +15,8 @@ pdm2pcm_cic3(const uint8_t *pdm, int pdm_length, int16_t *pcm, int pcm_length) Vcic3_pdm *top = new Vcic3_pdm{cp}; - top->hpf_alpha = 240; + top->hpf_alpha = hpf_alpha; + top->scale_shift = scale_shift; // Start clock off top->clk = 0; |