Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Post a new Thread
How to include data files at load or run time? - Krieger,Alex - Mar 26 17:16:00 2005
Hello all,
by the way, is it possible to compile and link into a ready, executable program, but have the
coefficients designed afterwards, saved into a text file, and then loaded into memory either at
program load time, or at run time? The only alternative I know of (that I have done with Visual
C++), is to write explicit code in the program to open and read in a text file of data at run
time.
Thanks,
AK
-----Original Message-----
From: Steve Holle [mailto:sholle@shol...]
Sent: March 25, 2005 7:57 AM
To: Artur; adsp@adsp...
Subject: Re: [adsp] Re: how to include header files
Defining the header with the dat should work. We have a number of filter
coefficients defined exactly that way. Do you use the "acoeffs" array
anywhere? It might be optimized out if you don't use it.
At 09:01 PM 3/24/2005, Artur wrote:
>i tried that already,and it didn't help
>--- In adsp@adsp..., Jaime Andres Aranguren Cardona
><jaime_aranguren@y...> wrote:
> > Hi,
> >
> > What if you have your a.h file like this:
> >
> > #define NUM_TAPS 4
> >
> > float pm acoeffs[NUM_TAPS+1] = {
> > -0.21705450402503,
> > 0.75444857321363,
> > -1.61627447577916,
> > 2.01218164151296,
> > -1.00000000000000
> > };
> >
> > And simply in your C file:
> >
> > #include "a.h"
> >
> > ???
> >
> > --- Artur <artek_04@y...> wrote:
> > >
> > >
> > >
> > > i'm trying to include a header file with my filter
> > > coefficients, but
> > > while debuging in visualDSP++ using expression
> > > window, it shows me
> > > that my array is full of zeros instead of my
> > > coefficients
> > > does anyone knows how to fix this?
> > >
> > > this is how i'm including my file in main program
> > >
> > > float pm acoeffs[NUM_TAPS+1] =
> > > {
> > > #include "a.h"
> > > };
> > >
> > > and this is my a.h file
> > >
> > > -0.21705450402503,
> > > 0.75444857321363,
> > > -1.61627447577916,
> > > 2.01218164151296,
> > > -1.00000000000000
> > >
> > >
> > > thanks
> >
> >
> > Jaime Andrés Aranguren Cardona
> > jaime.aranguren@i...
> > jaime.aranguren@c...
> >
> >
> >
> >
> > __________________________________
>
>
Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101
sholle@shol...

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )
Re: How to include data files at load or run time? - Jaime Andres Aranguren Cardona - Mar 27 22:36:00 2005
Hi,
--- "Krieger,Alex" <alexk@alex...> wrote:
> Hello all,
>
> by the way, is it possible to compile and link into
> a ready, executable program, but have the
> coefficients designed afterwards, saved into a text
> file, and then loaded into memory either at program
> load time, or at run time? The only alternative I
> know of (that I have done with Visual C++), is to
> write explicit code in the program to open and read
> in a text file of data at run time.
If your DSP system is going to be connected to a PC
permanently and you have some means of accessing it,
yes it is possible. But certainly not the most
effective way. Can't the coeffs be computed by the
DSP, in your setup?
Jaime Andrés Aranguren Cardona
jaime.aranguren@jaim...
jaime.aranguren@jaim...
__________________________________

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )
Re: How to include data files at load or run time? - Steve Holle - Mar 28 10:57:00 2005
Do you have a file system on your DSP board? Or are you talking about
sending the coefficients across a host port?
We commands and data over the host port.
At 02:16 PM 3/26/2005, Krieger,Alex wrote:
>Hello all,
>
>by the way, is it possible to compile and link into a ready, executable
>program, but have the coefficients designed afterwards, saved into a text
>file, and then loaded into memory either at program load time, or at run
>time? The only alternative I know of (that I have done with Visual C++),
>is to write explicit code in the program to open and read in a text file
>of data at run time.
>
>Thanks,
>
>AK
>
>-----Original Message-----
>From: Steve Holle [mailto:sholle@shol...]
>Sent: March 25, 2005 7:57 AM
>To: Artur; adsp@adsp...
>Subject: Re: [adsp] Re: how to include header files
>
>Defining the header with the dat should work. We have a number of filter
>coefficients defined exactly that way. Do you use the "acoeffs" array
>anywhere? It might be optimized out if you don't use it.
>At 09:01 PM 3/24/2005, Artur wrote:
>
> >i tried that already,and it didn't help
> >
> >
> >--- In adsp@adsp..., Jaime Andres Aranguren Cardona
> ><jaime_aranguren@y...> wrote:
> > > Hi,
> > >
> > > What if you have your a.h file like this:
> > >
> > > #define NUM_TAPS 4
> > >
> > > float pm acoeffs[NUM_TAPS+1] = {
> > > -0.21705450402503,
> > > 0.75444857321363,
> > > -1.61627447577916,
> > > 2.01218164151296,
> > > -1.00000000000000
> > > };
> > >
> > > And simply in your C file:
> > >
> > > #include "a.h"
> > >
> > > ???
> > >
> > > --- Artur <artek_04@y...> wrote:
> > > >
> > > >
> > > >
> > > > i'm trying to include a header file with my filter
> > > > coefficients, but
> > > > while debuging in visualDSP++ using expression
> > > > window, it shows me
> > > > that my array is full of zeros instead of my
> > > > coefficients
> > > > does anyone knows how to fix this?
> > > >
> > > > this is how i'm including my file in main program
> > > >
> > > > float pm acoeffs[NUM_TAPS+1] =
> > > > {
> > > > #include "a.h"
> > > > };
> > > >
> > > > and this is my a.h file
> > > >
> > > > -0.21705450402503,
> > > > 0.75444857321363,
> > > > -1.61627447577916,
> > > > 2.01218164151296,
> > > > -1.00000000000000
> > > >
> > > >
> > > > thanks
> > >
> > >
> > > Jaime Andrés Aranguren Cardona
> > > jaime.aranguren@i...
> > > jaime.aranguren@c...
> > >
> > >
> > >
> > >
> > > __________________________________
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>Steve Holle
>Link Communications, Inc.
>1035 Cerise Rd.
>Billings, MT 59101
>sholle@shol...
Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101
sholle@shol...

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )
Re: How to include data files at load or run time? - Steve Holle - Mar 29 10:58:00 2005
I'm afraid I'm not familiar with the EZ-Kit you mention but you should be
able to pass data over the USB link, I think. Are you planning on
designing around the EZ-Kit? If not, ADI has held the USB interface
proprietary in the past. I will defer to those working with the EZ-Kit for
details about transferring data over the USB.
We use the host port as ours is a custom design that communicates to a
Motorola Coldfire processor via the host port. It works very
well. Another path could be to use the SPI port or one of the SPORT
channels. We use a pair of SPORT channels set up in multichannel mode
(TDM) to communicate audio samples between DSP's. Each DSP has four
consecutive timeslots for the four audio channels handled by that DSP.
There are many ways data could be uploaded from an external source.
At 02:53 PM 3/28/2005, Krieger,Alex wrote:
>Hello,
>
>I'm just starting up with a ADSP-21161 EZ Kit system (although in the past
>I have worked with 2181 and 21992 systems, so the same question/answer
>should be adapted).
>
>? File system? What is that? Host port? You did get my attention, as that
>had not occurred to me, but is that additional connection really required
>if there is already the USB line? Furthermore, how do you connect a PC to
>the host port? Through the (parallel) printer port?
>
>Thanks for your input,
>
>AK
>-----Original Message-----
>From: Steve Holle [mailto:sholle@shol...]
>Sent: March 28, 2005 7:58 AM
>To: Krieger,Alex; Artur; adsp@adsp...
>Subject: Re: How to include data files at load or run time?
>Do you have a file system on your DSP board? Or are you talking about
>sending the coefficients across a host port?
>We commands and data over the host port.
>At 02:16 PM 3/26/2005, Krieger,Alex wrote:
> >Hello all,
> >
> >by the way, is it possible to compile and link into a ready, executable
> >program, but have the coefficients designed afterwards, saved into a text
> >file, and then loaded into memory either at program load time, or at run
> >time? The only alternative I know of (that I have done with Visual C++),
> >is to write explicit code in the program to open and read in a text file
> >of data at run time.
> >
> >Thanks,
> >
> >AK
> >
> >-----Original Message-----
> >From: Steve Holle [mailto:sholle@shol...]
> >Sent: March 25, 2005 7:57 AM
> >To: Artur; adsp@adsp...
> >Subject: Re: [adsp] Re: how to include header files
> >
> >
> >
> >Defining the header with the dat should work. We have a number of filter
> >coefficients defined exactly that way. Do you use the "acoeffs" array
> >anywhere? It might be optimized out if you don't use it.
> >At 09:01 PM 3/24/2005, Artur wrote:
> >
> >
> >
> > >i tried that already,and it didn't help
> > >
> > >
> > >--- In adsp@adsp..., Jaime Andres Aranguren Cardona
> > ><jaime_aranguren@y...> wrote:
> > > > Hi,
> > > >
> > > > What if you have your a.h file like this:
> > > >
> > > > #define NUM_TAPS 4
> > > >
> > > > float pm acoeffs[NUM_TAPS+1] = {
> > > > -0.21705450402503,
> > > > 0.75444857321363,
> > > > -1.61627447577916,
> > > > 2.01218164151296,
> > > > -1.00000000000000
> > > > };
> > > >
> > > > And simply in your C file:
> > > >
> > > > #include "a.h"
> > > >
> > > > ???
> > > >
> > > > --- Artur <artek_04@y...> wrote:
> > > > >
> > > > >
> > > > >
> > > > > i'm trying to include a header file with my filter
> > > > > coefficients, but
> > > > > while debuging in visualDSP++ using expression
> > > > > window, it shows me
> > > > > that my array is full of zeros instead of my
> > > > > coefficients
> > > > > does anyone knows how to fix this?
> > > > >
> > > > > this is how i'm including my file in main program
> > > > >
> > > > > float pm acoeffs[NUM_TAPS+1] =
> > > > > {
> > > > > #include "a.h"
> > > > > };
> > > > >
> > > > > and this is my a.h file
> > > > >
> > > > > -0.21705450402503,
> > > > > 0.75444857321363,
> > > > > -1.61627447577916,
> > > > > 2.01218164151296,
> > > > > -1.00000000000000
> > > > >
> > > > >
> > > > > thanks
> > > >
> > > >
> > > > Jaime Andrés Aranguren Cardona
> > > > jaime.aranguren@i...
> > > > jaime.aranguren@c...
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >Steve Holle
> >Link Communications, Inc.
> >1035 Cerise Rd.
> >Billings, MT 59101
> >sholle@shol...
> >
> >
> >
> >
> >
> >
> >
> >
>
>Steve Holle
>Link Communications, Inc.
>1035 Cerise Rd.
>Billings, MT 59101
>sholle@shol...
Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101
sholle@shol...

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )