Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Post a new Thread
ADSP21160N memory to File on hard disk - sati...@rediffmail.com - Jan 1 4:44:00 2006
I am using ADSP21160N in VisualDSP 3.5 Environment.I want to carry out the following task :
File 1 contains data.
File 2 contains co-efficients.
File 3 will hold the modified data.
I want to get the data and co-effs into the DSP memory and multiply each data by its respective
co-eff and send this modified data to file3.
I have written code to receive data and coeff into DSP and modify it but I have no clue on how
to write this modified data to file 3.
Please help me out.
How do I write data from DSP to a file?[DSP is ADSP 21160 and programming Environment as VDSP
3.5]
My thanks to all those who go through the trouble of assisting me.
My code is as follows :
#include "def21160.h"
#define N 8
/*------------ DM data --------------*/
.section/dm seg_dmda;
.VAR Raw_Data[] = "raw.dat"; /* Input Data */
.VAR Mul_Coeff[] = "mul_coeff.dat"; /* Co-efficients */
.VAR Output[] = "Output.dat"; /* Output Data File */
/*---- PM interrupt vector code -----*/
.section/pm seg_rth;
Reserved_1: rti; nop; nop; nop;
Chip_Reset: idle; jump begin; nop; nop;
/*------ program memory code -------*/
.section/pm seg_pmco;
begin:
ustat1 = dm(SYSCON); /* Clear Buffer Hang Disable */
bit clr ustat1 BHD;
dm(SYSCON) = ustat1;
B1=Raw_Data;l1=4;m1=1;
B2=Mul_Coeff;l2=4;m2=1;
B3=Output;l3=4;m3=1;
r4=N;
mul: r1=dm(i1,m1);
r2=dm(i2,m2);
r3=r1*r2(ssi);
dm(i3,m3)=r3;
r4=r4-1;
IF GT jump mul;
wait1:
jump wait1;
--------------------------------------------------------
The .var transfers data from file to dsp memory.I want to do the reverse
i.e transfer from dsp memory to file.
Let me know how to do it.
Regards,
Satish

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )
Re: ADSP21160N memory to File on hard disk - Jaime Andres Aranguren Cardona - Jan 2 9:15:00 2006
Hi,
The Memory->Dump function should work. VisualDSP++
documentation will tell you how you can do that.
JaaC
--- satish_sac@sati... wrote:
> I am using ADSP21160N in VisualDSP 3.5
> Environment.I want to carry out the following task :
>
> File 1 contains data.
> File 2 contains co-efficients.
> File 3 will hold the modified data.
>
> I want to get the data and co-effs into the DSP
> memory and multiply each data by its respective
> co-eff and send this modified data to file3.
>
> I have written code to receive data and coeff into
> DSP and modify it but I have no clue on how to write
> this modified data to file 3.
> Please help me out.
> How do I write data from DSP to a file?[DSP is ADSP
> 21160 and programming Environment as VDSP 3.5]
>
> My thanks to all those who go through the trouble of
> assisting me.
>
> My code is as follows :
>
> #include "def21160.h"
> #define N 8
>
> /*------------ DM data --------------*/
> .section/dm seg_dmda;
>
> .VAR Raw_Data[] = "raw.dat"; /* Input Data */
> .VAR Mul_Coeff[] = "mul_coeff.dat"; /*
> Co-efficients */
> .VAR Output[] = "Output.dat"; /* Output Data File
> */
>
> /*---- PM interrupt vector code -----*/
> .section/pm seg_rth;
> Reserved_1: rti; nop; nop; nop;
> Chip_Reset: idle; jump begin; nop; nop;
>
> /*------ program memory code -------*/
> .section/pm seg_pmco;
> begin:
> ustat1 = dm(SYSCON); /* Clear Buffer Hang
> Disable */
> bit clr ustat1 BHD;
> dm(SYSCON) = ustat1;
>
> B1=Raw_Data;l1=4;m1=1;
> B2=Mul_Coeff;l2=4;m2=1;
> B3=Output;l3=4;m3=1;
> r4=N;
>
> mul: r1=dm(i1,m1);
> r2=dm(i2,m2);
> r3=r1*r2(ssi);
> dm(i3,m3)=r3;
> r4=r4-1;
> IF GT jump mul;
>
> wait1:
> jump wait1;
--------------------------------------------------------
>
> The .var transfers data from file to dsp memory.I
> want to do the reverse
> i.e transfer from dsp memory to file.
> Let me know how to do it.
>
> Regards,
> Satish
>
>
> adsp-unsubscribe@adsp...
Jaime Andrés Aranguren Cardona
jaime.aranguren@jaim...
jaime.aranguren@jaim...
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com

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