From 23ef09d5dd337049458b48eaf9ed7ece3f887592 Mon Sep 17 00:00:00 2001 From: Jon Nordby Date: Fri, 8 Aug 2025 22:13:15 +0200 Subject: pdm: Try switch to 2 stage CIC Still seeing odd spikes on output --- bindings/sim_cic3_pdm.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bindings/sim_cic3_pdm.cc') 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; -- cgit v1.2.3