Robert,
If you are looking at transferring data using PROC_read & PROC_write,
then it's a very simple method. Refer to ProgrammersGuide.pdf document
section 2 (Getting started with writing applications). Section 2.2
(Static buffer system with minimal control communication with the DSP)
gives an application scenario for which PROC_read & PROC_write would be
useful.
Additional details for this method:
1. You can modify the configuration file in DSPLink directly:
/dsplink/config/all/CFG_Davinci_DM6446.cReserve two regions of memory in
LINKCFG_memTable_00 (add two more entries).
For example, if you want to transfer 1MB data to and fro, add the
following:
{
6, /* ENTRY : Entry number */
"WRITEMEM", /* NAME : Name of the memory
region */
0x8FC00000, /* ADDRPHYS : Physical address */
0x8FC00000, /* ADDRDSPVIRT : DSP virtual address
*/
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address
(if known) */
0x100000, /* SIZE : Size of the memory
region */
FALSE /* SHARED : Shared access memory?
*/
},
{
7, /* ENTRY : Entry number */
"READMEM", /* NAME : Name of the memory
region */
0x8FD00000, /* ADDRPHYS : Physical address */
0x8FD00000, /* ADDRDSPVIRT : DSP virtual address
*/
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address
(if known) */
0x100000, /* SIZE : Size of the memory
region */
FALSE /* SHARED : Shared access memory?
*/
}
Correspondingly, increase the value of MEMENTRIES field in
LINKCFG_dspObjects to 8.
8, /* MEMENTRIES : Number of entries in memory
table */
2. In your Linux bootargs, reserve further 2 MB for this. So, if you
were specifying mem=254M earlier, now specify mem=252M.
3. In the DSP-side TCI file, reserve these two regions of memory, to
ensure that they are not used by anything else.
In /dsplink/dsp/inc/DspBios/Davinci/DM6446/dsplink-davinci-base.tci,
add:
/*
========================================================================
====
* MEM : WRITEMEM
*
========================================================================
====
*/
var WRITEMEM= prog.module("MEM").create("WRITEMEM");
WRITEMEM.base = 0x8FC00000;
WRITEMEM.len = 0x100000;
WRITEMEM.createHeap = false;
WRITEMEM.comment = "WRITEMEM";
/*
========================================================================
====
* MEM : READMEM
*
========================================================================
====
*/
var READMEM= prog.module("MEM").create("READMEM");
READMEM.base = 0x8FC00000;
READMEM.len = 0x100000;
READMEM.createHeap = false;
READMEM.comment = "READMEM";
4. Finally, in your application, use PROC_read and PROC_write to
directly write to and read from these addresses. For example, ARM can
send data to DSP by using buffer WRITEMEM, and DSP can send data to ARM
by using buffer READMEM.
5. To send notification of available buffer, if it is infrequently
required, you can use NOTIFY module, which can send a 32-bit value with
the notification.
6. If you need to send frequent messages of variable size, you can use
MSGQ module.
In future, we will work towards adding this detail of information in
ProgrammersGuide also, or put out some app-notes for such topics.
Regeards,
Mugdha
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Robert W. Kuhn
Sent: Monday, February 11, 2008 7:29 PM
To: [email protected]
Subject: Re: dsp-link - readwrite-example: DSP address>
Am Mon, 11 Feb 2008 18:56:38 +0530 schrieb Kamoolkar, Mugdha:
> Please refer to the InstallGuide_Davinci.pdf for platform-specific
> instructions on running the sample applications.
> This is especially applicable for readwrite sample, because the memory
> addresses will differ for different platforms.
Thanks - I found all necessary data in UserGuide.pdf. I cannot transfer
more than 32k (via ./readwritegpp readwrite.out 2414804992 32768 0)
because of the default memory map?!? Where can I adjust this amount of
data? With cmem described in SPRAAQ6?
Robert
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source