Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | help on adsp-2181 needed

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

help on adsp-2181 needed - invictus_4_ever - Jan 17 8:58:00 2003



hi,
Im working on adsp-2181 using VDSP++ 3.0.
To get data from a file we can use
.var d1[10]="coeff.dat";

when programming in assembly. I would like to do the same in C.

previous versions used the format

int dm d1[10]={
#include "coeff.dat"
};
but the compiler is giving errors.

ANY ideas?






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

Re: help on adsp-2181 needed - Ali Irfan Ahmed - Jan 18 6:43:00 2003

Hi,
 
The syntax is the same but u have to make the coeff file in the following format
 
1,2,3,4,5,6,7
 
instead of the usual newline terminated format
 
1
2
3
4
5
6
7
 
Regards,
Ali Irfan Ahmed.
----- Original Message -----
From: ">invictus_4_ever <i...@yahoo.com>
To: a...@yahoogroups.com
Sent: Friday, January 17, 2003 1:58 PM
Subject: [adsp] help on adsp-2181 needed

hi,
   Im working on adsp-2181 using VDSP++ 3.0.
 To get data from a file we can use
.var      d1[10]="coeff.dat";

when programming in assembly. I would like to do the same in C.

previous versions used the format

int dm d1[10]={
               #include "coeff.dat" 
              };
but the compiler is giving errors.

ANY ideas?
 
_____________________________________
/groups.php3
 




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

Re: help on adsp-2181 needed - Federico Zandanel - Jan 18 16:36:00 2003

Try to insert this line in your C code as an Assembly line with the "asm"
command:

asm(".var d1[10]="coeff.dat");

----- Original Message -----
From: <>
To: <>
Sent: Friday, January 17, 2003 9:58 AM
Subject: [adsp] help on adsp-2181 needed > hi,
> Im working on adsp-2181 using VDSP++ 3.0.
> To get data from a file we can use
> .var d1[10]="coeff.dat";
>
> when programming in assembly. I would like to do the same in C.
>
> previous versions used the format
>
> int dm d1[10]={
> #include "coeff.dat"
> };
> but the compiler is giving errors.
>
> ANY ideas? >
>
> _____________________________________
> /groups.php3




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

Re: help on adsp-2181 needed - Ali Irfan Ahmed - Jan 19 20:02:00 2003

Hi,

I am just adding more to this solution.

Doing so will not make ur variable visible to "C" code. the correct way to do so
will be

asm(".global _d1; .var _d1[10]="coeff.dat");

Now to access this variable in any C file declare it as .extern int d1[]; and
access the array as usual and in assembly file as .extern _d1. and access the
variable as _d1. the leading underscore in the name of the variable is usual way
for ANSI C compiler to mangle the name of global variable. C++ compiler uses a
different type of mangaling. So it will be better if u use the other format

int d1[10] = {
"#include coeff.dat;"
};
with comma delimited file for coeff.dat as this will keep ur code compatible to
C and C++ compiler.

Regards,
Ali Irfan Ahmed.
----- Original Message -----
From: Federico Zandanel
To: ;
Sent: Saturday, January 18, 2003 9:36 PM
Subject: Re: [adsp] help on adsp-2181 needed Try to insert this line in your C code as an Assembly line with the "asm"
command:

asm(".var d1[10]="coeff.dat");

----- Original Message -----
From: <>
To: <>
Sent: Friday, January 17, 2003 9:58 AM
Subject: [adsp] help on adsp-2181 needed > hi,
> Im working on adsp-2181 using VDSP++ 3.0.
> To get data from a file we can use
> .var d1[10]="coeff.dat";
>
> when programming in assembly. I would like to do the same in C.
>
> previous versions used the format
>
> int dm d1[10]={
> #include "coeff.dat"
> };
> but the compiler is giving errors.
>
> ANY ideas? >
>
> _____________________________________
> /groups.php3
_____________________________________
/groups.php3




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