Skip to content

Commit

Permalink
Merge pull request #176 from xmos/release/v6.0.2
Browse files Browse the repository at this point in the history
Merge release/v6.0.2 into master
  • Loading branch information
xluciano authored Oct 8, 2020
2 parents a032c8d + 9501177 commit dd65d87
Show file tree
Hide file tree
Showing 40 changed files with 159 additions and 97 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
xCORE-200 DSP library change log
================================

6.0.2
-----

* CHANGED: use XS2 version of platform-specific functions on XS3
* CHANGED: Pin Python package versions
* REMOVED: not necessary cpanfile

6.0.1
-----

Expand Down
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@Library('[email protected]') _
@Library('[email protected]') _

getApproval()

pipeline {
Expand Down
15 changes: 0 additions & 15 deletions Pipfile

This file was deleted.

2 changes: 0 additions & 2 deletions cpanfile

This file was deleted.

2 changes: 1 addition & 1 deletion lib_dsp/api/dsp_bfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void dsp_div_bfp_vect_complex_int32(
int32_t * UNSAFE c, int c_exp, unsigned c_hr,
unsigned length);

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)


/** This function computes the number of leading sign bits in an array of
Expand Down
2 changes: 1 addition & 1 deletion lib_dsp/api/dsp_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ inline q8_24 dsp_math_cos(q8_24 rad) {
*/
q8_24 dsp_math_atan(q8_24 x);

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
/** Function that computes a fast fixed point atan2 and hypothenuse. The input
* comprises an array of two integers (notionally a complex number with the
* real value stored in the first index, and the imaginary value stored in
Expand Down
2 changes: 1 addition & 1 deletion lib_dsp/module_build_info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 6.0.1
VERSION = 6.0.2

DEPENDENT_MODULES = lib_logging(>=3.0.0)

Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/bfp/dsp_bfp_bit_reverse_shl.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/bfp/dsp_bfp_cls.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
#define NSTACKWORDS 2
.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/bfp/dsp_bfp_shl.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#undef NSTACKWORDS
#define NSTACKWORDS 0
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_biquad.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2017-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2017-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#define NSTACKWORDS 8

Expand Down
8 changes: 4 additions & 4 deletions lib_dsp/src/dsp_complex.xc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dsp_complex_t dsp_complex_mul_conjugate(dsp_complex_t a, dsp_complex_t b, uint32
return sum;
}

#if !defined(__XS2A__)
#if !defined(__XS2A__) && !defined(__XS3A__)
dsp_complex_t dsp_complex_fir(dsp_complex_t a[], dsp_complex_t b[],
uint32_t L, uint32_t off, uint32_t N) {
int64_t re = 0;
Expand All @@ -42,7 +42,7 @@ dsp_complex_t dsp_complex_fir(dsp_complex_t a[], dsp_complex_t b[],
}
#endif

#if !defined(__XS2A__)
#if !defined(__XS2A__) && !defined(__XS3A__)
void dsp_complex_mul_vector(dsp_complex_t a[], dsp_complex_t b[],
uint32_t L, uint32_t N) {
for(unsigned i = 0; i < L; i++) {
Expand All @@ -51,7 +51,7 @@ void dsp_complex_mul_vector(dsp_complex_t a[], dsp_complex_t b[],
}
#endif

#if !defined(__XS2A__)
#if !defined(__XS2A__) && !defined(__XS3A__)
void dsp_complex_mul_conjugate_vector(dsp_complex_t a[], dsp_complex_t b[],
uint32_t L, uint32_t N) {
for(unsigned i = 0; i < L; i++) {
Expand All @@ -60,7 +60,7 @@ void dsp_complex_mul_conjugate_vector(dsp_complex_t a[], dsp_complex_t b[],
}
#endif

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
void dsp_complex_magnitude_vector(uint32_t magnitude[],
dsp_complex_t input[],
uint32_t N, uint32_t P) {
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_complex_add_vector.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#define NSTACKWORDS 2

Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_complex_fir.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_complex_hann.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#define NSTACKWORDS 6

Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_complex_mul_vector.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_fast_atan.S
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2015-2016, XMOS Ltd, All rights reserved
#if defined(__XS2A__)
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved
#if defined(__XS2A__) || defined(__XS3A__)

#define ITER(X) \
{bf t, y_negative_ ## X ; add j, j, 1}; \
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_fast_float.xc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2018-2020, XMOS Ltd, All rights reserved
#include <xs1.h>
#include <xclib.h>
#include <limits.h>
Expand Down Expand Up @@ -411,7 +411,7 @@ dsp_u32_float_t dsp_sqrt_u32(const dsp_u32_float_t a){

dsp_sqrt_calc_exp(a.e, clz(a.m), &shl, &b.e);

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
if(shl > 0)
b.m = dsp_sqrt30_xs2(a.m<<shl);
else
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_filters.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved


#include <platform.h>
Expand Down Expand Up @@ -1476,7 +1476,7 @@ int32_t dsp_filters_biquad
int32_t* state_data,
const int32_t q_format
) {
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
return dsp_filters_biquads(input_sample, filter_coeffs, state_data, 1, q_format);
#else
return 0;
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_logistics.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#define NSTACKWORDS 0

Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_min_vector.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#define NSTACKWORDS 2

Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/dsp_poly_eval.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2017-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2017-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

#define NSTACKWORDS 4

Expand Down
6 changes: 3 additions & 3 deletions lib_dsp/src/dsp_sqrt_xs2.S
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2016-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2016-2020, XMOS Ltd, All rights reserved

.section .dp.data,"awd",@progbits
.text

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
.cc_top dsp_sqrt30_xs2.function
.globl dsp_sqrt30_xs2
.type dsp_sqrt30_xs2,@function
Expand All @@ -15,7 +15,7 @@
.align 16
.globl sqrt_as
.issue_mode dual
dsp_sqrt30_xs2:
dsp_sqrt30_xs2:
dualentsp 0 //TODO remove this - it's here to allow call from SI
{ bf r0, zero_sqrt ; clz r11, r0 }
{ dualentsp NSTACKWORDS ; shr r3, r11, 1 }
Expand Down
18 changes: 9 additions & 9 deletions lib_dsp/src/fft/dsp_fft.xc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) 2015-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved
#include <xs1.h>
#include <xclib.h>
#include <stdint.h>
#include <stdio.h>
#include "dsp_fft.h"

#ifndef __XS2A__
#if !defined(__XS2A__) && !defined(__XS3A__)
void dsp_fft_bit_reverse( dsp_complex_t pts[], const uint32_t N )
{
#warning "Bit reverse code in dsp_fft_bit_reverse not verified for XS1"
Expand Down Expand Up @@ -223,7 +223,7 @@ void dsp_fft_inverse_DIF_xs1 (
}
}

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

extern void dsp_fft_forward_xs2 (
dsp_complex_t pts[],
Expand All @@ -249,7 +249,7 @@ void dsp_fft_forward (
dsp_complex_t pts[],
const uint32_t N,
const int32_t sine[] ){
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
dsp_fft_forward_xs2 (pts, (uint32_t) N, sine);
#else
dsp_fft_forward_xs1 (pts, N, sine);
Expand All @@ -260,7 +260,7 @@ void dsp_fft_inverse (
dsp_complex_t pts[],
const uint32_t N,
const int32_t sine[] ){
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
dsp_fft_inverse_xs2 (pts, (uint32_t) N, sine);
#else
dsp_fft_inverse_xs1 (pts, N, sine);
Expand All @@ -269,7 +269,7 @@ void dsp_fft_inverse (


void dsp_fft_split_spectrum( dsp_complex_t pts[], const uint32_t N ){
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
dsp_fft_split_spectrum_xs2(pts, (uint32_t) N);
#else
for(uint32_t i=1;i<N/2;i++){
Expand Down Expand Up @@ -302,7 +302,7 @@ void dsp_fft_split_spectrum( dsp_complex_t pts[], const uint32_t N ){
}

void dsp_fft_merge_spectra( dsp_complex_t pts[], const uint32_t N ){
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
dsp_fft_merge_spectra_xs2(pts, (uint32_t) N);
#else
for(uint32_t i=1;i<N/4;i++){
Expand Down Expand Up @@ -332,7 +332,7 @@ void dsp_fft_merge_spectra( dsp_complex_t pts[], const uint32_t N ){
}

void dsp_fft_short_to_long( const dsp_complex_short_t s[], dsp_complex_t l[], const uint32_t N ) {
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
dsp_fft_short_to_long_xs2(s, l, (uint32_t) N);
#else
for(uint32_t i=0;i<N;i++){
Expand All @@ -343,7 +343,7 @@ void dsp_fft_short_to_long( const dsp_complex_short_t s[], dsp_complex_t l[], co
}

void dsp_fft_long_to_short( const dsp_complex_t l[], dsp_complex_short_t s[], const uint32_t N ) {
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
dsp_fft_long_to_short_xs2(l, s, (uint32_t) N);
#else
for(uint32_t i=0;i<N;i++){
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/fft/dsp_fft_bit_reverse.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/fft/dsp_fft_forward.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/fft/dsp_fft_gc.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/fft/dsp_fft_inverse.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2017, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/fft/dsp_fft_inverse_DIF.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright (c) 2015-2020, XMOS Ltd, All rights reserved

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)

.text
.issue_mode dual
Expand Down
4 changes: 2 additions & 2 deletions lib_dsp/src/fft/dsp_fft_merge_spectra.S
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2016-2019, XMOS Ltd, All rights reserved
// Copyright (c) 2016-2020, XMOS Ltd, All rights reserved

.section .dp.data,"awd",@progbits
.text

#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
.cc_top dsp_fft_merge_spectra_xs2.function
.globl dsp_fft_merge_spectra_xs2
.align 4
Expand Down
Loading

0 comments on commit dd65d87

Please sign in to comment.