Does anyone have a simple example moving data from one proc to another using hyperlink?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Does anyone have a simple example moving data from one proc to another using hyperlink?
Hi Gaius,
You may want to look at the HyperLink Example project that is packaged with the MCSDK. This project can be found at the following location: <PDK_INSTALL_DIR>\packages\ti\drv\exampleProjects\hyplnk_exampleProject\ (e.g. C:\Program Files\Texas Instruments\pdk_C6670_1_0_0_19\packages\ti\drv\exampleProjects\hyplnk_exampleProject).
If you do not have the MCSDK installed, you can download it from here:
http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html
One more thing to add to Derek
There is a flag in the file hyplnkLLDCfg.h that determines if the example runs loop-back or board to board.
You need to comment out the line
#define hyplnk_EXAMPLE_LOOPBACK
if you want board to board example
Ran
Hi,
I have a question regarding the data transfer between the two DSP (in that example):
In which place does the CPU take the token to transfer it to the other DSP? and in which place does it send it to the other DSP ? Is it from MSCM to MSCM ? or L2 SRAM/cache to L2 SRAM/cache ? Or any other memories ?..
Regards, Michael
Hi Mika,
The actual data transfer takes place in hyplnkExampleCPUTokenExchange() when hyplnkExampleSet() is called, and in hyplnkExampleCPUBlockXfer() when the remoteBuf ptr is assigned to. As to where in memory the transfer takes place, that depends on the linker's placement of the dataBuffer (see around line 438).
Those are the precise answers to your question, but I feel that may not be too helpful. I looked at this example when I was learning about how the hyperlink peripheral works and I found it to be quite confusing. I found it most helpful to concentrate on the function hyplnkExampleAddrMap() found within hyplnkLLDIFace.c. I recommend looking at that function in conjunction with reading the address-mapping section in the hyperlink user guide. If you understand what that function is doing (and it is only ~20 lines), then everything else will probably make sense.
Good luck,
Joel
Hi Joel,
Thank you very much for your reply. I looked for the databuffer and I found this:
/* This is the actual data buffer that will be accessed.
*
* When accessing this location directly, the program is playing
* the role of the remote device (remember we are in loopback).
*
* If this is placed in an L2 RAM there are no other dependancies.
*
* If this is placed in MSMC or DDR RAM, then the SMS
* or SES MPAX must be configured to allow the access.
*/
#pragma DATA_SECTION (dataBuffer, ".bss:remoteable");
#pragma DATA_ALIGN (dataBuffer, hyplnk_EXAMPLE_LINE_SIZE);
hyplnkExampleDataBuffer_t dataBuffer;
It's quite confusing because we don't know in wich place the databuffer is stored.
I looked for the function you told me: hyplnkExampleAddrMap().
I understood that the translation adress is maid and the window is created into hyperlink module in that function.
Another resource that you can use to understand how the translation is working is a presentation called intro to HyperLink
You can find it at teh following URL
https://processors.wiki.ti.com/index.php/Keystone/Trainings/Reading-MAR-27-12
look for intor To HyperLink and see if this helps
Ran
have you found
#pragma DATA_SECTION (dataBuffer, ".bss:remoteable");
#pragma DATA_ALIGN (dataBuffer, hyplnk_EXAMPLE_LINE_SIZE);
what does it mean?
I don't see any cmd file in the project and in the cfg file, i don't see any ".bss:remoteable"
can anyone help me ?
You understand what are the pragma doing, right? The DATA_ALIGN tells the linker how to align the buffer that follows, and DATA_SECTION tells the linker where to put the buffer or the code.
Now, the default setting is to put the .bss sections (one or more) where the target configured the data. Look at the platform configuration (from the debug prospective look at tools->RTSC tools->platform->edit/view and chose the packages in the repository that you use. It may be in c:\ti\XDCtools_3_23_2_47\packages or similar repository). Open the platform that you use (ti.platform.evm6678) and follow the next until you see the memory definitions. You will see that the data memory is assigned to L2SRAM and indeed if you look at the map file, there you will find the buffer.
Next change the platform (but only temporary, get it back to the original platform when you are done) to put the data in DDR3 and rebuild. Look at the map file and see that .bss with all its sections moved to the DDR address.
The last thing is to look for a link command file. In the link command you cannot change the memory names that are defined in the platform, but it can put a section wherever you want it. So define a new section for the buffer, and using a linker command file move it around the different memory locations (of course, you have to rebuild every time)