Skip to content

Commit 3335680

Browse files
authored
Merge pull request #68 from xmos/release/v2.2.0
Release/v2.2.0
2 parents 997e84e + d0a1c74 commit 3335680

9 files changed

Lines changed: 60 additions & 20 deletions

File tree

Brewfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
lib_src change log
22
==================
33

4+
2.2.0
5+
-----
6+
7+
* CHANGED: Made the FIR coefficient array that is used with the voice fixed
8+
factor of 3 up and down sampling functions usable from within C files as
9+
well as XC files.
10+
* CHANGED: Aligned the FIR coefficient array to an 8-byte boundary. This
11+
ensures that the voice fixed factor of 3 up and down sampling functions do
12+
not crash with a LOAD_STORE exception.
13+
* ADDED: Missing device attributes to the .xn file of the AN00231 app note.
14+
15+
* Changes to dependencies:
16+
17+
- lib_logging: 2.0.1 -> 3.1.1
18+
19+
- lib_xassert: 2.0.1 -> 4.1.0
20+
421
2.1.0
522
-----
623

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
@Library('xmos_jenkins_shared_library@v0.16.2') _
1+
@Library('xmos_jenkins_shared_library@v0.18.0') _
22

33
getApproval()
44

55
pipeline {
66
agent {
7-
label 'x86_64&&brew&&macOS'
7+
label 'x86_64&&macOS'
88
}
99
environment {
1010
REPO = 'lib_src'
11-
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
11+
VIEW = getViewName(REPO)
1212
}
1313
options {
1414
skipDefaultCheckout()

examples/AN00231_ASRC_SPDIF_TO_DAC/src/xk-audio-216-mc.xn

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@
8383
</Link>
8484
</Links>
8585
<ExternalDevices>
86-
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="S25FL116K">
86+
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="S25FL116K" PageSize="256" SectorSize="4096" NumPages="16384">
8787
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
88-
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
89-
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
88+
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
89+
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
90+
<Attribute Name="QE_REGISTER" Value="flash_qe_location_status_reg_0"/>
91+
<Attribute Name="QE_BIT" Value="flash_qe_bit_6"/>
9092
</Device>
9193
</ExternalDevices>
9294
<JTAGChain>

lib_src/module_build_info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 2.1.0
1+
VERSION = 2.2.0
22

33
DEPENDENT_MODULES = lib_logging(>=3.0.0) \
44
lib_xassert(>=4.0.0)

lib_src/src/fixed_factor_of_3_voice/src_ff3v_fir.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ extern const unsigned src_ff3v_fir_comp_q_us;
2121
extern const int32_t src_ff3v_fir_comp_us;
2222

2323
extern int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER_PHASE];
24-
extern const int32_t src_ff3v_fir_coefs[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE];
24+
25+
#if defined(__XC__)
26+
extern const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE];
27+
#define src_ff3v_fir_coefs src_ff3v_fir_coefs_xc
28+
#else
29+
extern const int32_t (*src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE];
30+
#define src_ff3v_fir_coefs src_ff3v_fir_coefs_c
31+
#endif
2532

2633
#endif // _SRC_FF3V_FIR_H_

lib_src/src/fixed_factor_of_3_voice/src_ff3v_fir.xc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER
3939
};
4040

4141
/** Coefficients for use with src_ds3_voice and src_us3_voice functions */
42-
const int32_t src_ff3v_fir_coefs[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE] = {
42+
static const int32_t [[aligned(8)]] src_ff3v_fir_coefs_i[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE] = {
4343
{
4444
29412, -14619962, 2692812, -2814524, 2193307, -1338213,
4545
-123797, 2582573, -6837031, 15085431, -37235961, 320542055,
@@ -59,3 +59,9 @@ const int32_t src_ff3v_fir_coefs[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_
5959
-1338213, 2193307, -2814524, 2692812, -14619962, 29412,
6060
},
6161
};
62+
63+
unsafe {
64+
const int32_t (* unsafe src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
65+
}
66+
67+
const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;

lib_src/src/fixed_factor_of_3_voice/src_ff3v_fir_generator.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def plot_response_passband(fs, w, h, title):
3131

3232
def 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):
5353
extern const int32_t src_ff3v_fir_comp_us;
5454
5555
extern 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

6774
def 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 = ''

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
# same modules should appear in the setup.py list as given below.
1919

2020
flake8==3.8.3
21+
# Pin importlib-metadata to <5 due to https://github.com/python/importlib_metadata/issues/409.
22+
importlib-metadata==4.13.0
2123
matplotlib==3.3.1
2224

2325
# Pin numpy to 1.18.5 due to tensorflow v2.1.1 hard pinning it to that version.

0 commit comments

Comments
 (0)