[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7955 - gnuradio/branches/developers/ngoergen/spe_fir_
From: |
ngoergen |
Subject: |
[Commit-gnuradio] r7955 - gnuradio/branches/developers/ngoergen/spe_fir_fff |
Date: |
Fri, 7 Mar 2008 08:07:07 -0700 (MST) |
Author: ngoergen
Date: 2008-03-07 08:07:07 -0700 (Fri, 07 Mar 2008)
New Revision: 7955
Modified:
gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_ccc_spe.cpp
gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff64_spe.cpp
gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff_spe.cpp
gnuradio/branches/developers/ngoergen/spe_fir_fff/gr_spe_dma_lock.h
gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_ccc_ppe.c
gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff64_ppe.c
gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff_ppe.c
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.S
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.h
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.S
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.h
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.S
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.h
gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_params.h
Log:
spe_fir_xxx: Added file headers.
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_ccc_spe.cpp
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_ccc_spe.cpp
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_ccc_spe.cpp
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include "gr_spe_dma_lock.h"
#include "spe_fir_fff_params.h"
@@ -11,39 +33,36 @@
float taps[MAX_BUFSIZE] __attribute__((aligned(16)));
float outputs[MAX_BUFSIZE] __attribute__((aligned(16)));
-
-int main(unsigned long long spe, unsigned long long argp, unsigned long long
envp)
+int main(unsigned long long spe, unsigned long long argp,
+ unsigned long long envp)
{
- int tag = 1;
- spe_fir_fff_params_t spe_fir_fff_params __attribute__((aligned(16)));
+ int tag = 1;
+ spe_fir_fff_params_t spe_fir_fff_params __attribute__((aligned(16)));
- {
- gr_spe_dma_lock_in<spe_fir_fff_params_t> argp_lock(
- argp, &spe_fir_fff_params,
sizeof(spe_fir_fff_params_t), tag);
- gr_spe_dma_lock_in<__vector float> inputs_lock(
- spe_fir_fff_params.ea_in1, reinterpret_cast<__vector
float *>(&inputs),
- spe_fir_fff_params.size * sizeof(float), tag);
- gr_spe_dma_lock_in<__vector float> taps_lock(
- spe_fir_fff_params.ea_in2, reinterpret_cast<__vector
float *>(&taps),
- spe_fir_fff_params.size * sizeof(float), tag);
- gr_spe_dma_lock_out<__vector float> outputs_lock(
- spe_fir_fff_params.ea_out, reinterpret_cast<__vector
float *>(&outputs),
- spe_fir_fff_params.size * sizeof(float), tag);
- //
- // spe_fir_fff_params.offset = 0;
- // spe_fir_fff_params.nsamples = 7;
- // spe_fir_fff_params.ntaps = 16;
-
- spe_fir_ccc(
- reinterpret_cast<__vector float *>(&inputs),
- reinterpret_cast<__vector float *>(&taps),
- reinterpret_cast<__vector float *>(&outputs),
- 0,
- spe_fir_fff_params.offset,
- spe_fir_fff_params.nsamples,
- spe_fir_fff_params.ntaps);
-
- }
+ {
+ gr_spe_dma_lock_in<spe_fir_fff_params_t> argp_lock(argp,
+ &spe_fir_fff_params, sizeof(spe_fir_fff_params_t), tag);
+ gr_spe_dma_lock_in<__vector float> inputs_lock(spe_fir_fff_params.ea_in1,
+ reinterpret_cast<__vector float *>(&inputs), spe_fir_fff_params.size
+ * sizeof(float), tag);
+ gr_spe_dma_lock_in<__vector float> taps_lock(spe_fir_fff_params.ea_in2,
+ reinterpret_cast<__vector float *>(&taps), spe_fir_fff_params.size
+ * sizeof(float), tag);
+ gr_spe_dma_lock_out<__vector float> outputs_lock(spe_fir_fff_params.ea_out,
+ reinterpret_cast<__vector float *>(&outputs), spe_fir_fff_params.size
+ * sizeof(float), tag);
+ //
+ // spe_fir_fff_params.offset = 0;
+ // spe_fir_fff_params.nsamples = 7;
+ // spe_fir_fff_params.ntaps = 16;
- return 0;
+ spe_fir_ccc( reinterpret_cast<__vector float *>(&inputs),
+ reinterpret_cast<__vector float *>(&taps),
+ reinterpret_cast<__vector float *>(&outputs), 0,
+ spe_fir_fff_params.offset, spe_fir_fff_params.nsamples,
+ spe_fir_fff_params.ntaps);
+
+ }
+
+ return 0;
}
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff64_spe.cpp
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff64_spe.cpp
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff64_spe.cpp
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include "gr_spe_dma_lock.h"
#include "spe_fir_fff_params.h"
@@ -9,34 +31,33 @@
double taps[MAX_BUFSIZE] __attribute__((aligned(16)));
double outputs[MAX_BUFSIZE] __attribute__((aligned(16)));
-int main(unsigned long long spe, unsigned long long argp, unsigned long long
envp)
+int main(unsigned long long spe, unsigned long long argp,
+ unsigned long long envp)
{
- int tag = 1;
- spe_fir_fff_params_t spe_fir_fff_params __attribute__((aligned(16)));
+ int tag = 1;
+ spe_fir_fff_params_t spe_fir_fff_params __attribute__((aligned(16)));
- {
- gr_spe_dma_lock_in<spe_fir_fff_params_t> argp_lock(
- argp, &spe_fir_fff_params, sizeof(spe_fir_fff_params_t), tag);
- gr_spe_dma_lock_in<__vector double> inputs_lock(
- spe_fir_fff_params.ea_in1, reinterpret_cast<__vector
double *>(&inputs),
- spe_fir_fff_params.size * sizeof(double), tag);
- gr_spe_dma_lock_in<__vector double> taps_lock(
- spe_fir_fff_params.ea_in2, reinterpret_cast<__vector
double *>(&taps),
- spe_fir_fff_params.size * sizeof(double), tag);
- gr_spe_dma_lock_out<__vector double> outputs_lock(
- spe_fir_fff_params.ea_out, reinterpret_cast<__vector
double *>(&outputs),
- spe_fir_fff_params.size * sizeof(double), tag);
-
- spe_fir_fff64(
- reinterpret_cast<__vector double *>(&inputs),
- reinterpret_cast<__vector double *>(&taps),
- reinterpret_cast<__vector double *>(&outputs),
- 0,
- spe_fir_fff_params.offset,
- spe_fir_fff_params.nsamples,
- spe_fir_fff_params.ntaps);
+ {
+ gr_spe_dma_lock_in<spe_fir_fff_params_t> argp_lock(argp,
+ &spe_fir_fff_params, sizeof(spe_fir_fff_params_t), tag);
+ gr_spe_dma_lock_in<__vector double> inputs_lock(spe_fir_fff_params.ea_in1,
+ reinterpret_cast<__vector double *>(&inputs), spe_fir_fff_params.size
+ * sizeof(double), tag);
+ gr_spe_dma_lock_in<__vector double> taps_lock(spe_fir_fff_params.ea_in2,
+ reinterpret_cast<__vector double *>(&taps), spe_fir_fff_params.size
+ * sizeof(double), tag);
+ gr_spe_dma_lock_out<__vector double> outputs_lock(
+ spe_fir_fff_params.ea_out,
+ reinterpret_cast<__vector double *>(&outputs), spe_fir_fff_params.size
+ * sizeof(double), tag);
- }
+ spe_fir_fff64( reinterpret_cast<__vector double *>(&inputs),
+ reinterpret_cast<__vector double *>(&taps),
+ reinterpret_cast<__vector double *>(&outputs), 0,
+ spe_fir_fff_params.offset, spe_fir_fff_params.nsamples,
+ spe_fir_fff_params.ntaps);
- return 0;
+ }
+
+ return 0;
}
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff_spe.cpp
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff_spe.cpp
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/fir_fff_spe.cpp
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include "gr_spe_dma_lock.h"
#include "spe_fir_fff_params.h"
@@ -9,35 +31,32 @@
float taps[MAX_BUFSIZE] __attribute__((aligned(16)));
float outputs[MAX_BUFSIZE] __attribute__((aligned(16)));
-
-int main(unsigned long long spe, unsigned long long argp, unsigned long long
envp)
+int main(unsigned long long spe, unsigned long long argp,
+ unsigned long long envp)
{
- int tag = 1;
- spe_fir_fff_params_t spe_fir_fff_params __attribute__((aligned(16)));
+ int tag = 1;
+ spe_fir_fff_params_t spe_fir_fff_params __attribute__((aligned(16)));
- {
- gr_spe_dma_lock_in<spe_fir_fff_params_t> argp_lock(
- argp, &spe_fir_fff_params,
sizeof(spe_fir_fff_params_t), tag);
- gr_spe_dma_lock_in<__vector float> inputs_lock(
- spe_fir_fff_params.ea_in1, reinterpret_cast<__vector
float *>(&inputs),
- spe_fir_fff_params.size * sizeof(float), tag);
- gr_spe_dma_lock_in<__vector float> taps_lock(
- spe_fir_fff_params.ea_in2, reinterpret_cast<__vector
float *>(&taps),
- spe_fir_fff_params.size * sizeof(float), tag);
- gr_spe_dma_lock_out<__vector float> outputs_lock(
- spe_fir_fff_params.ea_out, reinterpret_cast<__vector
float *>(&outputs),
- spe_fir_fff_params.size * sizeof(float), tag);
-
- spe_fir_fff(
- reinterpret_cast<__vector float *>(&inputs),
- reinterpret_cast<__vector float *>(&taps),
- reinterpret_cast<__vector float *>(&outputs),
- 0,
- spe_fir_fff_params.offset,
- spe_fir_fff_params.nsamples,
- spe_fir_fff_params.ntaps);
+ {
+ gr_spe_dma_lock_in<spe_fir_fff_params_t> argp_lock(argp,
+ &spe_fir_fff_params, sizeof(spe_fir_fff_params_t), tag);
+ gr_spe_dma_lock_in<__vector float> inputs_lock(spe_fir_fff_params.ea_in1,
+ reinterpret_cast<__vector float *>(&inputs), spe_fir_fff_params.size
+ * sizeof(float), tag);
+ gr_spe_dma_lock_in<__vector float> taps_lock(spe_fir_fff_params.ea_in2,
+ reinterpret_cast<__vector float *>(&taps), spe_fir_fff_params.size
+ * sizeof(float), tag);
+ gr_spe_dma_lock_out<__vector float> outputs_lock(spe_fir_fff_params.ea_out,
+ reinterpret_cast<__vector float *>(&outputs), spe_fir_fff_params.size
+ * sizeof(float), tag);
- }
+ spe_fir_fff( reinterpret_cast<__vector float *>(&inputs),
+ reinterpret_cast<__vector float *>(&taps),
+ reinterpret_cast<__vector float *>(&outputs), 0,
+ spe_fir_fff_params.offset, spe_fir_fff_params.nsamples,
+ spe_fir_fff_params.ntaps);
- return 0;
+ }
+
+ return 0;
}
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/gr_spe_dma_lock.h
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/gr_spe_dma_lock.h
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/gr_spe_dma_lock.h
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#ifndef GR_SPE_DMA_LOCK_H_
#define GR_SPE_DMA_LOCK_H_
@@ -72,5 +94,4 @@
~gr_spe_dma_lock_inout() { push(); }
};
-
#endif /*GR_SPE_DMA_LOCK_H_*/
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_ccc_ppe.c
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_ccc_ppe.c
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_ccc_ppe.c
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <libspe2.h>
@@ -61,14 +83,12 @@
1, 1, 1, 1, 1, 1, 1, 1, \
1, 1, 1, 1, 1, 1, 1, 1
-
#define MYMATRIX10 MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX, \
MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX,
MYMATRIX
#define MYMATRIX100 MYMATRIX10, MYMATRIX10, MYMATRIX10, MYMATRIX10,
MYMATRIX10, \
MYMATRIX10, MYMATRIX10, MYMATRIX10,
MYMATRIX10, MYMATRIX10
-
#define MYMATRIX210 MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, \
MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2
@@ -80,119 +100,121 @@
9, 10, 234, 234, 234, 234, 234, 234
#define TESTTAPS 2.32, -23.6563, -432.5434, -34.323, 0, 0, 0, 0, 0, 0, 0, 0,0,
0, 0, 0
-float in1[16] = {
- // MYMATRIX10
- TESTMATRIX
- };
-float in2[16] __attribute__((aligned(16))) = {
- // MYMATRIX210
- TESTTAPS
-} ;
+float in1[16] =
+{
+// MYMATRIX10
+ TESTMATRIX};
+float in2[16]
+__attribute__((aligned(16))) =
+{
+ // MYMATRIX210
+ TESTTAPS
+};
float out[SIZE] __attribute__((aligned(16)));
spe_fir_fff_params_t spe_fir_fff_params[NUM_SPE] __attribute__((aligned(16)));
-typedef struct {
- spe_context_ptr_t spe;
- spe_fir_fff_params_t *spe_fir_fff_params;
+typedef struct
+{
+ spe_context_ptr_t spe;
+ spe_fir_fff_params_t *spe_fir_fff_params;
} thread_arg_t;
void *run_abs_spe(void *thread_arg)
{
- int ret;
- thread_arg_t *arg = (thread_arg_t *) thread_arg;
- unsigned int entry;
- spe_stop_info_t stop_info;
+ int ret;
+ thread_arg_t *arg = (thread_arg_t *) thread_arg;
+ unsigned int entry;
+ spe_stop_info_t stop_info;
- entry = SPE_DEFAULT_ENTRY;
- ret = spe_context_run(arg->spe, &entry, 0, arg->spe_fir_fff_params, NULL,
&stop_info);
- if (ret < 0) {
- perror("spe_context_run");
- return NULL;
- }
+ entry = SPE_DEFAULT_ENTRY;
+ ret = spe_context_run(arg->spe, &entry, 0, arg->spe_fir_fff_params, NULL,
+ &stop_info);
+ if (ret < 0) {
+ perror("spe_context_run");
+ return NULL;
+ }
- return NULL;
+ return NULL;
}
int main(int argc, char **argv)
{
- int i;
- int ret;
+ int i;
+ int ret;
- spe_program_handle_t *prog;
- spe_context_ptr_t spe[NUM_SPE];
- pthread_t thread[NUM_SPE];
- thread_arg_t arg[NUM_SPE];
-
- printf("size: spe_fir_ccc_params_t: %02d\n", sizeof(spe_fir_fff_params_t));
+ spe_program_handle_t *prog;
+ spe_context_ptr_t spe[NUM_SPE];
+ pthread_t thread[NUM_SPE];
+ thread_arg_t arg[NUM_SPE];
- prog = spe_image_open("fir_ccc_spe.elf");
- if (!prog) {
- perror("spe_image_open");
- exit(1);
- }
+ printf("size: spe_fir_ccc_params_t: %02d\n", sizeof(spe_fir_fff_params_t));
- for (i = 0; i < NUM_SPE; ++i) {
- spe[i] = spe_context_create(0, NULL);
- if (!spe[i]) {
- perror("spe_context_create");
- exit(1);
- }
+ prog = spe_image_open("fir_ccc_spe.elf");
+ if (!prog) {
+ perror("spe_image_open");
+ exit(1);
+ }
- ret = spe_program_load(spe[i], prog);
- if (ret) {
- perror("spe_program_load");
- exit(1);
- }
+ for (i = 0; i < NUM_SPE; ++i) {
+ spe[i] = spe_context_create(0, NULL);
+ if (!spe[i]) {
+ perror("spe_context_create");
+ exit(1);
}
- unsigned int j;
- int size = SIZE/NUM_SPE;
-
- for (j = 0; j < 1; ++j) {
-
-
- for (i = 0; i < NUM_SPE; ++i) {
- spe_fir_fff_params[i].ea_in1 = (unsigned long) &in1[i*size ];
- spe_fir_fff_params[i].ea_in2 = (unsigned long) &in2[i*size ];
- spe_fir_fff_params[i].ea_out = (unsigned long) &out[i*size];
- spe_fir_fff_params[i].ntaps = 16;
- spe_fir_fff_params[i].nsamples = 7;
- spe_fir_fff_params[i].offset = 0;
- spe_fir_fff_params[i].size = size;
-
- arg[i].spe = spe[i];
- arg[i].spe_fir_fff_params = &spe_fir_fff_params[i];
-
- ret = pthread_create(&thread[i], NULL, run_abs_spe, &arg[i]);
- if (ret) {
- perror("pthread_create");
- exit(1);
- }
- }
- pthread_join(thread[i], NULL);
+ ret = spe_program_load(spe[i], prog);
+ if (ret) {
+ perror("spe_program_load");
+ exit(1);
}
-
-
+ }
+
+ unsigned int j;
+ int size= SIZE/NUM_SPE;
+
+ for (j = 0; j < 1; ++j) {
+
for (i = 0; i < NUM_SPE; ++i) {
- //pthread_join(thread[i], NULL);
- ret = spe_context_destroy(spe[i]);
- if (ret) {
- perror("spe_context_destroy");
- exit(1);
- }
- }
+ spe_fir_fff_params[i].ea_in1 = (unsigned long) &in1[i*size ];
+ spe_fir_fff_params[i].ea_in2 = (unsigned long) &in2[i*size ];
+ spe_fir_fff_params[i].ea_out = (unsigned long) &out[i*size];
+ spe_fir_fff_params[i].ntaps = 16;
+ spe_fir_fff_params[i].nsamples = 7;
+ spe_fir_fff_params[i].offset = 0;
+ spe_fir_fff_params[i].size = size;
- ret = spe_image_close(prog);
- if (ret) {
- perror("spe_image_close");
+ arg[i].spe = spe[i];
+ arg[i].spe_fir_fff_params = &spe_fir_fff_params[i];
+
+ ret = pthread_create(&thread[i], NULL, run_abs_spe, &arg[i]);
+ if (ret) {
+ perror("pthread_create");
exit(1);
+ }
}
+ pthread_join(thread[i], NULL);
+ }
- for (i = 0; i < 32; i +=2) {
- printf("out[%02d]=%f, %fi\n", i>>1, out[i], out[i+1]);
+ for (i = 0; i < NUM_SPE; ++i) {
+ //pthread_join(thread[i], NULL);
+ ret = spe_context_destroy(spe[i]);
+ if (ret) {
+ perror("spe_context_destroy");
+ exit(1);
}
+ }
- return 0;
+ ret = spe_image_close(prog);
+ if (ret) {
+ perror("spe_image_close");
+ exit(1);
+ }
+
+ for (i = 0; i < 32; i +=2) {
+ printf("out[%02d]=%f, %fi\n", i>>1, out[i], out[i+1]);
+ }
+
+ return 0;
}
Modified:
gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff64_ppe.c
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff64_ppe.c
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff64_ppe.c
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <libspe2.h>
@@ -61,14 +83,12 @@
1, 1, 1, 1, 1, 1, 1, 1, \
1, 1, 1, 1, 1, 1, 1, 1
-
#define MYMATRIX10 MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX, \
MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX,
MYMATRIX
#define MYMATRIX100 MYMATRIX10, MYMATRIX10, MYMATRIX10, MYMATRIX10,
MYMATRIX10, \
MYMATRIX10, MYMATRIX10, MYMATRIX10,
MYMATRIX10, MYMATRIX10
-
#define MYMATRIX210 MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, \
MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2
@@ -79,120 +99,121 @@
9, 10, 234, 234, 234, 234, 234, 234
#define TESTTAPS 5, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-double in1[16] = {
- // MYMATRIX10
- TESTMATRIX
- };
-double in2[16] __attribute__((aligned(16))) = {
- // MYMATRIX210
- TESTTAPS
-} ;
+double in1[16] =
+{
+// MYMATRIX10
+ TESTMATRIX};
+double in2[16]
+__attribute__((aligned(16))) = {
+ // MYMATRIX210
+ TESTTAPS
+};
double out[SIZE] __attribute__((aligned(16)));
spe_fir_fff_params_t spe_fir_fff_params[NUM_SPE] __attribute__((aligned(16)));
-typedef struct {
- spe_context_ptr_t spe;
- spe_fir_fff_params_t *spe_fir_fff_params;
+typedef struct
+{
+ spe_context_ptr_t spe;
+ spe_fir_fff_params_t *spe_fir_fff_params;
} thread_arg_t;
void *run_abs_spe(void *thread_arg)
{
- int ret;
- thread_arg_t *arg = (thread_arg_t *) thread_arg;
- unsigned int entry;
- spe_stop_info_t stop_info;
+ int ret;
+ thread_arg_t *arg = (thread_arg_t *) thread_arg;
+ unsigned int entry;
+ spe_stop_info_t stop_info;
- entry = SPE_DEFAULT_ENTRY;
- ret = spe_context_run(arg->spe, &entry, 0, arg->spe_fir_fff_params, NULL,
&stop_info);
- if (ret < 0) {
- perror("spe_context_run");
- return NULL;
- }
+ entry = SPE_DEFAULT_ENTRY;
+ ret = spe_context_run(arg->spe, &entry, 0, arg->spe_fir_fff_params, NULL,
+ &stop_info);
+ if (ret < 0) {
+ perror("spe_context_run");
+ return NULL;
+ }
- return NULL;
+ return NULL;
}
int main(int argc, char **argv)
{
- int i;
- int ret;
+ int i;
+ int ret;
- spe_program_handle_t *prog;
- spe_context_ptr_t spe[NUM_SPE];
- pthread_t thread[NUM_SPE];
- thread_arg_t arg[NUM_SPE];
-
- printf("size: spe_fir_fff_params_t: %02d\n", sizeof(spe_fir_fff_params_t));
+ spe_program_handle_t *prog;
+ spe_context_ptr_t spe[NUM_SPE];
+ pthread_t thread[NUM_SPE];
+ thread_arg_t arg[NUM_SPE];
- prog = spe_image_open("fir_fff64_spe.elf");
- if (!prog) {
- perror("spe_image_open");
- exit(1);
- }
+ printf("size: spe_fir_fff_params_t: %02d\n", sizeof(spe_fir_fff_params_t));
- for (i = 0; i < NUM_SPE; ++i) {
- spe[i] = spe_context_create(0, NULL);
- if (!spe[i]) {
- perror("spe_context_create");
- exit(1);
- }
+ prog = spe_image_open("fir_fff64_spe.elf");
+ if (!prog) {
+ perror("spe_image_open");
+ exit(1);
+ }
- ret = spe_program_load(spe[i], prog);
- if (ret) {
- perror("spe_program_load");
- exit(1);
- }
+ for (i = 0; i < NUM_SPE; ++i) {
+ spe[i] = spe_context_create(0, NULL);
+ if (!spe[i]) {
+ perror("spe_context_create");
+ exit(1);
}
- unsigned int j;
- int size = SIZE/NUM_SPE;
-
- for (j = 0; j < 1; ++j) {
-
-
- for (i = 0; i < NUM_SPE; ++i) {
- spe_fir_fff_params[i].ea_in1 = (unsigned long) &in1[i*size ];
- spe_fir_fff_params[i].ea_in2 = (unsigned long) &in2[i*size ];
- spe_fir_fff_params[i].ea_out = (unsigned long) &out[i*size];
- spe_fir_fff_params[i].ntaps = 16;
- spe_fir_fff_params[i].nsamples = 7;
- spe_fir_fff_params[i].offset = 0;
- spe_fir_fff_params[i].size = size;
-
- arg[i].spe = spe[i];
- arg[i].spe_fir_fff_params = &spe_fir_fff_params[i];
-
- ret = pthread_create(&thread[i], NULL, run_abs_spe, &arg[i]);
- if (ret) {
- perror("pthread_create");
- exit(1);
- }
- }
- pthread_join(thread[i], NULL);
+ ret = spe_program_load(spe[i], prog);
+ if (ret) {
+ perror("spe_program_load");
+ exit(1);
}
-
-
+ }
+
+ unsigned int j;
+ int size= SIZE/NUM_SPE;
+
+ for (j = 0; j < 1; ++j) {
+
for (i = 0; i < NUM_SPE; ++i) {
- //pthread_join(thread[i], NULL);
- ret = spe_context_destroy(spe[i]);
- if (ret) {
- perror("spe_context_destroy");
- exit(1);
- }
- }
+ spe_fir_fff_params[i].ea_in1 = (unsigned long) &in1[i*size ];
+ spe_fir_fff_params[i].ea_in2 = (unsigned long) &in2[i*size ];
+ spe_fir_fff_params[i].ea_out = (unsigned long) &out[i*size];
+ spe_fir_fff_params[i].ntaps = 16;
+ spe_fir_fff_params[i].nsamples = 7;
+ spe_fir_fff_params[i].offset = 0;
+ spe_fir_fff_params[i].size = size;
- ret = spe_image_close(prog);
- if (ret) {
- perror("spe_image_close");
+ arg[i].spe = spe[i];
+ arg[i].spe_fir_fff_params = &spe_fir_fff_params[i];
+
+ ret = pthread_create(&thread[i], NULL, run_abs_spe, &arg[i]);
+ if (ret) {
+ perror("pthread_create");
exit(1);
+ }
}
+ pthread_join(thread[i], NULL);
+ }
- for (i = 0; i < 32; ++i) {
- printf("out[%02d]=%f\n", i, out[i]);
+ for (i = 0; i < NUM_SPE; ++i) {
+ //pthread_join(thread[i], NULL);
+ ret = spe_context_destroy(spe[i]);
+ if (ret) {
+ perror("spe_context_destroy");
+ exit(1);
}
- printf("size %0d result=%f\n", size, out[0]);
+ }
- return 0;
+ ret = spe_image_close(prog);
+ if (ret) {
+ perror("spe_image_close");
+ exit(1);
+ }
+
+ for (i = 0; i < 32; ++i) {
+ printf("out[%02d]=%f\n", i, out[i]);
+ }
+ printf("size %0d result=%f\n", size, out[0]);
+
+ return 0;
}
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff_ppe.c
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff_ppe.c
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/multi_fir_fff_ppe.c
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <libspe2.h>
@@ -61,14 +83,12 @@
1, 1, 1, 1, 1, 1, 1, 1, \
1, 1, 1, 1, 1, 1, 1, 1
-
#define MYMATRIX10 MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX, \
MYMATRIX, MYMATRIX, MYMATRIX, MYMATRIX,
MYMATRIX
#define MYMATRIX100 MYMATRIX10, MYMATRIX10, MYMATRIX10, MYMATRIX10,
MYMATRIX10, \
MYMATRIX10, MYMATRIX10, MYMATRIX10,
MYMATRIX10, MYMATRIX10
-
#define MYMATRIX210 MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, \
MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2, MYMATRIX2
@@ -79,120 +99,122 @@
9, 10, 234, 234, 234, 234, 234, 234
#define TESTTAPS 5, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-float in1[16] = {
- // MYMATRIX10
- TESTMATRIX
- };
-float in2[16] __attribute__((aligned(16))) = {
- // MYMATRIX210
- TESTTAPS
-} ;
+float in1[16] =
+{
+// MYMATRIX10
+ TESTMATRIX};
+float in2[16]
+__attribute__((aligned(16))) =
+{
+ // MYMATRIX210
+ TESTTAPS
+};
float out[SIZE] __attribute__((aligned(16)));
spe_fir_fff_params_t spe_fir_fff_params[NUM_SPE] __attribute__((aligned(16)));
-typedef struct {
- spe_context_ptr_t spe;
- spe_fir_fff_params_t *spe_fir_fff_params;
+typedef struct
+{
+ spe_context_ptr_t spe;
+ spe_fir_fff_params_t *spe_fir_fff_params;
} thread_arg_t;
void *run_abs_spe(void *thread_arg)
{
- int ret;
- thread_arg_t *arg = (thread_arg_t *) thread_arg;
- unsigned int entry;
- spe_stop_info_t stop_info;
+ int ret;
+ thread_arg_t *arg = (thread_arg_t *) thread_arg;
+ unsigned int entry;
+ spe_stop_info_t stop_info;
- entry = SPE_DEFAULT_ENTRY;
- ret = spe_context_run(arg->spe, &entry, 0, arg->spe_fir_fff_params, NULL,
&stop_info);
- if (ret < 0) {
- perror("spe_context_run");
- return NULL;
- }
+ entry = SPE_DEFAULT_ENTRY;
+ ret = spe_context_run(arg->spe, &entry, 0, arg->spe_fir_fff_params, NULL,
+ &stop_info);
+ if (ret < 0) {
+ perror("spe_context_run");
+ return NULL;
+ }
- return NULL;
+ return NULL;
}
int main(int argc, char **argv)
{
- int i;
- int ret;
+ int i;
+ int ret;
- spe_program_handle_t *prog;
- spe_context_ptr_t spe[NUM_SPE];
- pthread_t thread[NUM_SPE];
- thread_arg_t arg[NUM_SPE];
-
- printf("size: spe_fir_fff_params_t: %02d\n", sizeof(spe_fir_fff_params_t));
+ spe_program_handle_t *prog;
+ spe_context_ptr_t spe[NUM_SPE];
+ pthread_t thread[NUM_SPE];
+ thread_arg_t arg[NUM_SPE];
- prog = spe_image_open("fir_fff_spe.elf");
- if (!prog) {
- perror("spe_image_open");
- exit(1);
- }
+ printf("size: spe_fir_fff_params_t: %02d\n", sizeof(spe_fir_fff_params_t));
- for (i = 0; i < NUM_SPE; ++i) {
- spe[i] = spe_context_create(0, NULL);
- if (!spe[i]) {
- perror("spe_context_create");
- exit(1);
- }
+ prog = spe_image_open("fir_fff_spe.elf");
+ if (!prog) {
+ perror("spe_image_open");
+ exit(1);
+ }
- ret = spe_program_load(spe[i], prog);
- if (ret) {
- perror("spe_program_load");
- exit(1);
- }
+ for (i = 0; i < NUM_SPE; ++i) {
+ spe[i] = spe_context_create(0, NULL);
+ if (!spe[i]) {
+ perror("spe_context_create");
+ exit(1);
}
- unsigned int j;
- int size = SIZE/NUM_SPE;
-
- for (j = 0; j < 1; ++j) {
-
-
- for (i = 0; i < NUM_SPE; ++i) {
- spe_fir_fff_params[i].ea_in1 = (unsigned long) &in1[i*size ];
- spe_fir_fff_params[i].ea_in2 = (unsigned long) &in2[i*size ];
- spe_fir_fff_params[i].ea_out = (unsigned long) &out[i*size];
- spe_fir_fff_params[i].ntaps = 16;
- spe_fir_fff_params[i].nsamples = 7;
- spe_fir_fff_params[i].offset = 0;
- spe_fir_fff_params[i].size = size;
-
- arg[i].spe = spe[i];
- arg[i].spe_fir_fff_params = &spe_fir_fff_params[i];
-
- ret = pthread_create(&thread[i], NULL, run_abs_spe, &arg[i]);
- if (ret) {
- perror("pthread_create");
- exit(1);
- }
- }
- pthread_join(thread[i], NULL);
+ ret = spe_program_load(spe[i], prog);
+ if (ret) {
+ perror("spe_program_load");
+ exit(1);
}
-
-
+ }
+
+ unsigned int j;
+ int size= SIZE/NUM_SPE;
+
+ for (j = 0; j < 1; ++j) {
+
for (i = 0; i < NUM_SPE; ++i) {
- //pthread_join(thread[i], NULL);
- ret = spe_context_destroy(spe[i]);
- if (ret) {
- perror("spe_context_destroy");
- exit(1);
- }
- }
+ spe_fir_fff_params[i].ea_in1 = (unsigned long) &in1[i*size ];
+ spe_fir_fff_params[i].ea_in2 = (unsigned long) &in2[i*size ];
+ spe_fir_fff_params[i].ea_out = (unsigned long) &out[i*size];
+ spe_fir_fff_params[i].ntaps = 16;
+ spe_fir_fff_params[i].nsamples = 7;
+ spe_fir_fff_params[i].offset = 0;
+ spe_fir_fff_params[i].size = size;
- ret = spe_image_close(prog);
- if (ret) {
- perror("spe_image_close");
+ arg[i].spe = spe[i];
+ arg[i].spe_fir_fff_params = &spe_fir_fff_params[i];
+
+ ret = pthread_create(&thread[i], NULL, run_abs_spe, &arg[i]);
+ if (ret) {
+ perror("pthread_create");
exit(1);
+ }
}
+ pthread_join(thread[i], NULL);
+ }
- for (i = 0; i < 32; ++i) {
- printf("out[%02d]=%f\n", i, out[i]);
+ for (i = 0; i < NUM_SPE; ++i) {
+ //pthread_join(thread[i], NULL);
+ ret = spe_context_destroy(spe[i]);
+ if (ret) {
+ perror("spe_context_destroy");
+ exit(1);
}
- printf("size %0d result=%f\n", size, out[0]);
+ }
- return 0;
+ ret = spe_image_close(prog);
+ if (ret) {
+ perror("spe_image_close");
+ exit(1);
+ }
+
+ for (i = 0; i < 32; ++i) {
+ printf("out[%02d]=%f\n", i, out[i]);
+ }
+ printf("size %0d result=%f\n", size, out[0]);
+
+ return 0;
}
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.S
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.S
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.S
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,71 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+
+# taps are guarenteed to be 16 byte aligned.
+# ntaps != 0
+
+# void spe_fir_ccc (
+# const float *input,
+# const float *taps,
+# float *output,
+# const float *delayline,
+# const unsigned int offset,
+# const unsigned int nsamples,
+# const unsigned int ntaps
+# )
+# {
+# unsigned int o_index = 0;
+#
+# do {
+# float sum0 = 0;
+# float sum1 = 0;
+# float sum2 = 0;
+# float sum3 = 0;
+#
+# unsigned int n_2_complex_blocks = ntaps / 2;
+#
+# unsigned int cur_tap = 0;
+# unsigned int cur_input = input + offset + o_index;
+#
+# do {
+#
+# sum0 += cur_input[0] * cur_tap[0] - cur_input[1] * cur_tap[1];
+# sum1 += cur_input[0] * cur_tap[1] + cur_input[1] * cur_tap[0];
+# sum2 += cur_input[2] * cur_tap[2] - cur_input[3] * cur_tap[3];
+# sum3 += cur_input[2] * cur_tap[3] + cur_input[3] * cur_tap[2];
+#
+# cur_input += 4;
+# cur_tap += 4;
+#
+# } while ((n_2_complex_blocks -= 2) != 0);
+#
+# output[o_index] = sum0 + sum2;
+# output[o_index+1] = sum1 + sum3;
+#
+# } while ((o_index += 2) != nsamples * 2);
+#
+# }
+#
+
.file "fir_ccc_spe.S"
.text
.align 3
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.h
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.h
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_ccc_as.h
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#ifndef SPE_FIR_CCC_AS_H_
#define SPE_FIR_CCC_AS_H_
@@ -2,15 +24,35 @@
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-extern void spe_fir_ccc (
- const __vector float *input,
- const __vector float *taps,
- __vector float *output,
- const __vector float *delayline,
- const unsigned int offset,
- const unsigned int nsamples,
- const unsigned int ntaps
-);
+/*!
+ * \brief compute an array of N interleaved complex output values from
+ * interleaved complex inputs and taps.
+ *
+ * \param input must have (nsamples - 1 + ntaps()) valid entries. input does
+ * NOT need to be aligned. input[0] .. input[nsamples - 1 + ntaps() - 1] are
+ * referenced to compute the output values.
+ *
+ * \param taps a pointer to the pre-reversed and aligned set of taps. Taps
+ * must be a multiple of 4 and padded accordingly.
+ *
+ * \param output a pointer to the filter output buffer
+ *
+ * \param delayline NOTE: currently not used
+ *
+ * \param offset the initial offset into input buffer to start the filter. If
+ * input is aligned, this should be zero. If input is not aligned, this is
+ * the difference in allignment.
+ *
+ * \param nsamples number of samples to produce for output
+ *
+ * \param ntaps length of the tap vector. Must be a multiple of 4.
+ */
+extern void spe_fir_ccc(const __vector float *input,
+ const __vector float *taps, __vector float *output,
+ const __vector float *delayline, const unsigned int offset,
+ const unsigned int nsamples, const unsigned int ntaps);
+
#ifdef __cplusplus
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.S
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.S
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.S
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,70 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+
+# taps are guarenteed to be 16 byte aligned.
+# ntaps != 0
+
+# void spe_fir_fff64 (
+# const __vector double *input,
+# const __vector double *taps,
+# __vector double *output,
+# const __vector double *delayline,
+# const unsigned int offset,
+# const unsigned int nsamples,
+# const unsigned int ntaps
+# )
+# {
+# unsigned int o_index = 0;
+#
+# do {
+# double sum0 = 0;
+# double sum1 = 0;
+# double sum2 = 0;
+# double sum3 = 0;
+#
+# unsigned int n_2_float_blocks = ntaps / 2;
+#
+# unsigned int cur_tap = 0;
+# unsigned int cur_input = input + offset + o_index;
+#
+# do {
+#
+# sum0 += cur_input[0] * cur_tap[0];
+# sum1 += cur_input[1] * cur_tap[1];
+# sum2 += cur_input[2] * cur_tap[2];
+# sum3 += cur_input[3] * cur_tap[3];
+#
+# cur_input += 4;
+# cur_tap += 4;
+#
+# } while ((n_2_float_blocks -= 4) != 0);
+#
+# output[o_index] = sum0 + sum1 + sum2 + sum3;
+#
+# } while (o_index++ != nsamples);
+#
+# }
+#
+
.file "fir_fff64_spe.S"
.text
.align 3
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.h
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.h
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff64_as.h
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#ifndef SPE_FIR_FFF64_AS_H_
#define SPE_FIR_FFF64_AS_H_
@@ -2,15 +24,34 @@
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-extern void spe_fir_fff64 (
- const __vector double *input,
- const __vector double *taps,
- __vector double *output,
- const __vector double *delayline,
- const unsigned int offset,
- const unsigned int nsamples,
- const unsigned int ntaps
-);
+/*!
+ * \brief compute an array of N output values.
+ *
+ * \param input must have (nsamples - 1 + ntaps()) valid entries. input does
+ * NOT need to be aligned. input[0] .. input[nsamples - 1 + ntaps() - 1] are
+ * referenced to compute the output values.
+ *
+ * \param taps a pointer to the pre-reversed and aligned set of taps. Taps
+ * must be a multiple of 8 and padded accordingly.
+ *
+ * \param output a pointer to the filter output buffer
+ *
+ * \param delayline NOTE: currently not used
+ *
+ * \param offset the initial offset into input buffer to start the filter. If
+ * input is aligned, this should be zero. If input is not aligned, this is
+ * the difference in allignment.
+ *
+ * \param nsamples number of samples to produce for output
+ *
+ * \param ntaps length of the tap vector. Must be a multiple of 8.
+ */
+extern void spe_fir_fff64(const __vector double *input,
+ const __vector double *taps, __vector double *output,
+ const __vector double *delayline, const unsigned int offset,
+ const unsigned int nsamples, const unsigned int ntaps);
+
#ifdef __cplusplus
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.S
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.S
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.S
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,70 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+
+# taps are guarenteed to be 16 byte aligned.
+# ntaps != 0
+
+# void spe_fir_fff (
+# const __vector float *input,
+# const __vector float *taps,
+# __vector float *output,
+# const __vector float *delayline,
+# const unsigned int offset,
+# const unsigned int nsamples,
+# const unsigned int ntaps
+# )
+# {
+# unsigned int o_index = 0;
+#
+# do {
+# float sum0 = 0;
+# float sum1 = 0;
+# float sum2 = 0;
+# float sum3 = 0;
+#
+# unsigned int n_4_float_blocks = ntaps / 4;
+#
+# unsigned int cur_tap = 0;
+# unsigned int cur_input = input + offset + o_index;
+#
+# do {
+#
+# sum0 += cur_input[0] * cur_tap[0];
+# sum1 += cur_input[1] * cur_tap[1];
+# sum2 += cur_input[2] * cur_tap[2];
+# sum3 += cur_input[3] * cur_tap[3];
+#
+# cur_input += 4;
+# cur_tap += 4;
+#
+# } while ((n_4_float_blocks -= 4) != 0);
+#
+# output[o_index] = sum0 + sum1 + sum2 + sum3;
+#
+# } while (o_index++ != nsamples);
+#
+# }
+#
+
.file "fir_fff_spe.S"
.text
.align 3
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.h
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.h
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_as.h
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#ifndef SPE_FIR_FFF_AS_H_
#define SPE_FIR_FFF_AS_H_
@@ -2,15 +24,34 @@
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-extern void spe_fir_fff (
- const __vector float *input,
- const __vector float *taps,
- __vector float *output,
- const __vector float *delayline,
- const unsigned int offset,
- const unsigned int nsamples,
- const unsigned int ntaps
-);
+/*!
+ * \brief compute an array of N output values.
+ *
+ * \param input must have (nsamples - 1 + ntaps()) valid entries. input does
+ * NOT need to be aligned. input[0] .. input[nsamples - 1 + ntaps() - 1] are
+ * referenced to compute the output values.
+ *
+ * \param taps a pointer to the pre-reversed and aligned set of taps. Taps
+ * must be a multiple of 16 and padded accordingly.
+ *
+ * \param output a pointer to the filter output buffer
+ *
+ * \param delayline NOTE: currently not used
+ *
+ * \param offset the initial offset into input buffer to start the filter. If
+ * input is aligned, this should be zero. If input is not aligned, this is
+ * the difference in allignment.
+ *
+ * \param nsamples number of samples to produce for output
+ *
+ * \param ntaps length of the tap vector. Must be a multiple of 16.
+ */
+extern void spe_fir_fff(const __vector float *input,
+ const __vector float *taps, __vector float *output,
+ const __vector float *delayline, const unsigned int offset,
+ const unsigned int nsamples, const unsigned int ntaps);
+
#ifdef __cplusplus
Modified: gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_params.h
===================================================================
--- gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_params.h
2008-03-07 04:23:16 UTC (rev 7954)
+++ gnuradio/branches/developers/ngoergen/spe_fir_fff/spe_fir_fff_params.h
2008-03-07 15:07:07 UTC (rev 7955)
@@ -1,15 +1,38 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
#ifndef SPE_FIR_FFF_PARAMS_H_
#define SPE_FIR_FFF_PARAMS_H_
-typedef struct {
- unsigned long long ea_in1;
- unsigned long long ea_in2;
- unsigned long long ea_out;
- unsigned int nsamples;
- unsigned int ntaps;
- unsigned int offset;
- unsigned int size;
- int pad[6];
+typedef struct
+{
+ unsigned long long ea_in1;
+ unsigned long long ea_in2;
+ unsigned long long ea_out;
+ unsigned int nsamples;
+ unsigned int ntaps;
+ unsigned int offset;
+ unsigned int size;
+ int pad[6];
} spe_fir_fff_params_t;
#endif /*SPE_FIR_FFF_PARAMS_H_*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7955 - gnuradio/branches/developers/ngoergen/spe_fir_fff,
ngoergen <=