I wonder if anybody has gotten 16 channels of PDM microphones on one tile to pass timing?
I would like to get 16-channels of PDM per tile, so I tried the following code:
main.xc
Code: Select all
/*
* pdm_microphone.xc
*
* Created on: Feb 28, 2017
* Author: caleb
*/
#include <platform.h>
#include <xs1.h>
#include <mic_array.h>
#define N_CHANNELS 16
#define N_DECIMATORS (N_CHANNELS / 4)
#define N_PDM_RX (N_CHANNELS / 8)
on tile[0]: clock pdmclk = XS1_CLKBLK_1;
on tile[0]: in port p_mclk = XS1_PORT_1E;
on tile[0]: out port p_pdm_clk = XS1_PORT_1F;
on tile[0]: in buffered port:32 p_pdm_mics_0 = XS1_PORT_8B;
on tile[0]: in buffered port:32 p_pdm_mics_1 = XS1_PORT_8A;
#if (N_CHANNELS & 0X7)
#error you must have a multiple of 8 PDM channels
#endif
int application(streaming chanend c_ds_output[N_DECIMATORS])
{
return 0;
}
int main()
{
streaming chan c_pdm_to_dec[N_DECIMATORS];
streaming chan c_ds_output[N_DECIMATORS];
configure_clock_src_divide(pdmclk, p_mclk, 1);
configure_port_clock_output(p_pdm_clk, pdmclk);
configure_in_port(p_pdm_mics_0, pdmclk);
#if N_PDM_RX > 1
configure_in_port(p_pdm_mics_1, pdmclk);
#endif
start_clock(pdmclk);
par {
mic_array_pdm_rx(p_pdm_mics_0, c_pdm_to_dec[0], c_pdm_to_dec[1]);
mic_array_decimate_to_pcm_4ch(c_pdm_to_dec[0], c_ds_output[0], MIC_ARRAY_NO_INTERNAL_CHANS);
mic_array_decimate_to_pcm_4ch(c_pdm_to_dec[1], c_ds_output[1], MIC_ARRAY_NO_INTERNAL_CHANS);
#if N_PDM_RX > 1
mic_array_pdm_rx(p_pdm_mics_1, c_pdm_to_dec[2], c_pdm_to_dec[3]);
mic_array_decimate_to_pcm_4ch(c_pdm_to_dec[2], c_ds_output[2], MIC_ARRAY_NO_INTERNAL_CHANS);
mic_array_decimate_to_pcm_4ch(c_pdm_to_dec[3], c_ds_output[3], MIC_ARRAY_NO_INTERNAL_CHANS);
#endif
application(c_ds_output);
}
return 0;
}
Code: Select all
#define MIC_ARRAY_NUM_MICS 16
#define MIC_ARRAY_MAX_FRAME_SIZE_LOG2 4
#define N_CHANNELS 8
Code: Select all
14:40:00 **** Incremental Build of configuration Default for project pdm_microphone ****
xmake CONFIG=Default all
Checking build modules
Using build modules: lib_mic_array(3.0.1) lib_xassert(3.0.0) lib_logging(2.1.0) lib_dsp(3.0.0)
Analyzing pdm_microphone.xc
Propagating analysis
Creating dependencies for pdm_microphone.xc
Compiling pdm_microphone.xc
Creating pdm_microphone.xe
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:22: warning: route(0) Pass with 4 unknowns, Num Paths: 1, Slack: 654.0 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 299 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:24: warning: route(1) Pass with 4 unknowns, Num Paths: 1, Slack: 716.5 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 289 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:26: warning: route(2) Pass with 18 unknowns, Num Paths: 167, Slack: 729.0 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 288 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:28: warning: route(3) Pass with 4 unknowns, Num Paths: 5, Slack: 704.0 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 291 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:30: warning: route(4) Pass with 4 unknowns, Num Paths: 1, Slack: 591.5 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 309 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:32: warning: route(5) Pass with 4 unknowns, Num Paths: 1, Slack: 654.0 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 299 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:34: warning: route(6) Pass with 18 unknowns, Num Paths: 167, Slack: 666.5 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 297 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:36: warning: route(7) Pass with 4 unknowns, Num Paths: 5, Slack: 641.5 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 301 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:38: warning: route(8) Pass with 4 unknowns, Num Paths: 1, Slack: 591.5 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 309 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:40: warning: route(9) Pass with 4 unknowns, Num Paths: 1, Slack: 654.0 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 299 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:42: warning: route(10) Pass with 18 unknowns, Num Paths: 167, Slack: 666.5 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 297 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:44: warning: route(11) Pass with 4 unknowns, Num Paths: 5, Slack: 641.5 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 301 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:46: warning: route(12) Pass with 4 unknowns, Num Paths: 1, Slack: 591.5 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 309 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:48: warning: route(13) Pass with 4 unknowns, Num Paths: 1, Slack: 654.0 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 299 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:50: warning: route(14) Pass with 18 unknowns, Num Paths: 167, Slack: 666.5 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 297 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:52: warning: route(15) Pass with 4 unknowns, Num Paths: 5, Slack: 616.5 ns, Required: 2.6 us, Worst: 2.0 us, Min Core Frequency: 305 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/pdm_rx.S:6: warning: route(16) Pass with 6 unknowns, Num Paths: 1, Slack: 1.5 us, Required: 2.6 us, Worst: 1.1 us, Min Core Frequency: 167 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/pdm_rx.S:8: warning: route(17) Pass with 10 unknowns, Num Paths: 1, Slack: 679.0 ns, Required: 2.6 us, Worst: 1.9 us, Min Core Frequency: 295 MHz
Build Complete
14:40:03 Build Finished (took 3s.137ms)
but fails timing checks miserably with
#define N_CHANNELS 16
Code: Select all
14:38:45 **** Incremental Build of configuration Default for project pdm_microphone ****
xmake CONFIG=Default all
Checking build modules
Using build modules: lib_mic_array(3.0.1) lib_xassert(3.0.0) lib_logging(2.1.0) lib_dsp(3.0.0)
Analyzing pdm_microphone.xc
Creating dependencies for pdm_microphone.xc
Compiling pdm_microphone.xc
Creating pdm_microphone.xe
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:22: warning: route(0) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 143.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 422 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:24: warning: route(1) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 73.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 411 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:26: warning: route(2) Fail (timing violation) with 18 unknowns, Num Paths: 167, Violation: 21.0 ns, Required: 2.6 us, Worst: 2.6 us, Min Core Frequency: 403 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:28: warning: route(3) Fail (timing violation) with 4 unknowns, Num Paths: 5, Violation: 73.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 411 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:30: warning: route(4) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 231.0 ns, Required: 2.6 us, Worst: 2.8 us, Min Core Frequency: 435 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:32: warning: route(5) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 143.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 422 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:34: warning: route(6) Fail (timing violation) with 18 unknowns, Num Paths: 167, Violation: 91.0 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 413 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:36: warning: route(7) Fail (timing violation) with 4 unknowns, Num Paths: 5, Violation: 143.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 422 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:38: warning: route(8) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 231.0 ns, Required: 2.6 us, Worst: 2.8 us, Min Core Frequency: 435 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:40: warning: route(9) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 143.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 422 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:42: warning: route(10) Fail (timing violation) with 18 unknowns, Num Paths: 167, Violation: 91.0 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 413 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:44: warning: route(11) Fail (timing violation) with 4 unknowns, Num Paths: 5, Violation: 143.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 422 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:46: warning: route(12) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 231.0 ns, Required: 2.6 us, Worst: 2.8 us, Min Core Frequency: 435 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:48: warning: route(13) Fail (timing violation) with 4 unknowns, Num Paths: 1, Violation: 143.5 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 422 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:50: warning: route(14) Fail (timing violation) with 18 unknowns, Num Paths: 167, Violation: 91.0 ns, Required: 2.6 us, Worst: 2.7 us, Min Core Frequency: 413 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/decimate_to_pcm_4ch.S:52: warning: route(15) Fail (timing violation) with 4 unknowns, Num Paths: 5, Violation: 178.5 ns, Required: 2.6 us, Worst: 2.8 us, Min Core Frequency: 427 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/pdm_rx.S:6: warning: route(16) Pass with 6 unknowns, Num Paths: 1, Slack: 1.1 us, Required: 2.6 us, Worst: 1.5 us, Min Core Frequency: 231 MHz
xta: C:/cygwin64/home/caleb/xmos/pdm_microphones/lib_mic_array/src/pdm_rx.S:8: warning: route(17) Fail (timing violation) with 10 unknowns, Num Paths: 1, Violation: 38.5 ns, Required: 2.6 us, Worst: 2.6 us, Min Core Frequency: 405 MHz
Build Complete
Another question: Can I tell the system that I'm using less than a 3.072 MHz pdm clock frequency and have the timing checks automatically adjusted accordingly?
Thanks,
-Caleb