@@ -31,7 +31,7 @@ def plot_response_passband(fs, w, h, title):
3131
3232def generate_header_file (num_taps_per_phase , num_phases ):
3333 header_template = """\
34- // Copyright (c) 2016-2017 , XMOS Ltd, All rights reserved
34+ // Copyright (c) 2016-2021 , XMOS Ltd, All rights reserved
3535//
3636// This file is generated using src_ff3v_fir_generator.py
3737//
@@ -53,7 +53,14 @@ def generate_header_file(num_taps_per_phase, num_phases):
5353extern const int32_t src_ff3v_fir_comp_us;
5454
5555extern int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER_PHASE];
56- extern const int32_t src_ff3v_fir_coefs[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE];
56+
57+ #if defined(__XC__)
58+ extern const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE];
59+ #define src_ff3v_fir_coefs src_ff3v_fir_coefs_xc
60+ #else
61+ extern const int32_t (*src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE];
62+ #define src_ff3v_fir_coefs src_ff3v_fir_coefs_c
63+ #endif
5764
5865#endif // _SRC_FF3V_FIR_H_
5966"""
@@ -66,7 +73,7 @@ def generate_header_file(num_taps_per_phase, num_phases):
6673
6774def generate_xc_file (q_ds , q_us , comp_ds , comp_us , taps ):
6875 xc_template = """\
69- // Copyright (c) 2016-2017 , XMOS Ltd, All rights reserved
76+ // Copyright (c) 2016-2021 , XMOS Ltd, All rights reserved
7077//
7178// This file is generated using src_ff3v_fir_generator.py
7279//
@@ -94,8 +101,14 @@ def generate_xc_file(q_ds, q_us, comp_ds, comp_us, taps):
94101};
95102
96103/** Coefficients for use with src_ds3_voice and src_us3_voice functions */
97- const int32_t src_ff3v_fir_coefs [SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE] = {
104+ static const int32_t [[aligned(8)]] src_ff3v_fir_coefs_i [SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE] = {
98105%(coefs)s};
106+
107+ unsafe {
108+ const int32_t (* unsafe src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
109+ }
110+
111+ const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
99112"""
100113
101114 coefs_debug = ''
0 commit comments