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.

question about hyperlink interface

hello ;

i have a question about the presentation that talk about hyperlink( http://keystone-workshop.googlecode.com/svn/trunk/pdf/Intro%20to%20Hyperlink.pdf )

1-In slide 16 : i couldn't understand by (Privilege ID) and what is the mean by (Lower portion of the remote address – offset into the segment)

2-In slide 17 : is (Segment Lookup Table) determine the portion of memory that will be transferred by hyperlink interface or what ?

Is the example about Hyperlink (pdk_C6678_1_0_0_17\packages\ti\drv\exampleProjects\hyplnk_exampleProject.) is adjusted to certain number of segments or i have to Build  the Segment Lookup Table and do i need to use EDMA , if yes why ??

and i understood from the presentation that the hyperlink interface will transfer the the data that put in certain location in memory from Tx(0x4000_0000 to 0x4FFF_FFFF.) to certain location determined by Segment Lookup Table

Regards

  • Hi,

    That presentation doesn't give you the detail for the hyperlink. Please download hyperlink Users guide from TI website and read it first before you get answer from us. I believe the UG may have all answers you asked. Let me know if you still have the same question after you fully read the document.

    Regards,

    Albert 

  • Ahmed,

    Try to understand the examples given in the document http://keystone-workshop.googlecode.com/svn/trunk/pdf/Intro%20to%20Hyperlink.pdf

    They are very helpful to understand the address translation.

    For your questions, I understood that you have to program two Look Up Tables : one for the segments and one for the PrivID.

    According to the documents, I understood that PrivID can have two values: 0xD if a request come from a core and 0xE if a request come from an other master.

    By programing the register on Tx side, you can choose the place of the PrivID index on Tx address.

    In the example given by Texas, only 1 segment of 4MB is declared.

    Try to read this example and specially the function : hyplnkExampleAddrMap().

    This is where the address translation take place.Try to understand it after reading the User Guide and the .pdf presentation.

    Regards.

  • thank you John ,

    but in the user guide

    -In page 33:(The main function of the ingress address translation is to overlay the control information into the address field.) so, what is the mean by overlay the control information into the address field and the engress address and is that the address of the data in memory (DDR-L2 or what)

    -In page 34 : (On the TX side, the TX overlay control register determines how the security bit and PRIVID overlay on top of the slave address to form the outgoing address.) so, what is the mean by overlay on top of the slave address

    wait your response

  • any body help me there ??

  • Ahmed,

    this two things mean that you have to program where you want to put the privID and the security bit.

    The main purpose of the address translation on Tx side is to put the privID and the security bit in the 32 bits address.

    On the Tx side you have two things to configure: the place of the PrivID and the place of the security bit.

    For a simple transaction between two processor using hyperlink don't take care about the values of the PrivID and focus on the segment look up table of the Rx side.

    Have a look to the function hyplnkexampleaddrmap() on the TI example. If you understand this function and the examples on the document http://keystone-workshop.googlecode.com/svn/trunk/pdf/Intro%20to%20Hyperlink.pdf  then all will be clear for you.

  • thanks John for your help

    I read  the example in the user guide and the example in the presentation and understood the address Translation and as you told me and as i discovered In the example given by Texas, only 1 segment of 4MB is declared in the remote device.

    But as in the hyplnkexampleaddrmap()                                                                                                                                                                                                                                        /* Make one segment which can see dataBuffer */
      if ((globalAddr >= 0x800000) && (globalAddr < 0xa00000)) {
        /* Address is in L2 */
        globalAddr |= 0x10000000 | (DNUM << 24);
      } else {
        System_printf ("Don't know how to make global address for 0x%08x\n", globalAddr);
      }

    I didn't understand this section, is that mean  the address On the receive side must be from 0x800000 to 0xa00000(before applying Address Translation on the RX Side) and then the address of the data at remote device will be at L2 at 0x10000000 (because i understood that globalAddr & 0x3fffff(mask of rxSegSel) )? and what is the mean by (DNUM << 24) ?

    And is the dataBuffer is the address of the data that it's sent before applying Address Translation on the TX Side ?

    wish anybody can help me .



  • Ahmed,

    What I understood from the example given by Texas is that a token or a block is sent from L2SRAM of DSP local to L2SRAM of DSP remote.

    To answer to your question, DNUM is the number of the core running and "<<24" mean that you shift this number to the 24th bit on the left.

    Maybe this link http://en.wikipedia.org/wiki/Bitwise_operation#Shifts_in_C.2C_C.2B.2B.2C_C.23 would be clearer.

    To be clear, the variable "globalAddr" is set to the base adress of L2SRAM of each core running.

    If Core0 is running, the value of "globalAddr" would be 0x10800000

    If Core1 is running, the value of  "globalAddr" would be 0x11800000

    If Core2 is running, the value of "globalAddr"would be 0x12800000

    ...


    Personaly, when I wrote my own software, I didn't use this thing because it seems a little bit confusing.


    The transfer of the data is made in this function "hyplnkExampleIOCycle"


    You should run the example in debug mode and look for L2SRAM memory of each DSP (run only core0, it would be easier to debug) and look when the buffer appear on DSP remote. By doing this you will maybe better understand when the transaction is made and how.


    Regards.

  • thank you for your reply but to allocate the data to be sent by hperlink interface(o/p from core 0) to L2SRAM memmory.

    there is a liker file i made it so, is there any modification to it ?

    /****************************************************************************/
    /*  lnk.cmd   v#####                                                        */
    /*  Copyright (c) 1996@%%%%  Texas Instruments Incorporated                 */
    /*    Usage:  lnk6x <obj files...>    -o <out file> -m <map file> lnk.cmd   */
    /*            cl6x  <src files...> -z -o <out file> -m <map file> lnk.cmd   */
    /*                                                                          */
    /*    Description: This file is a sample linker command file that can be    */
    /*                 used for linking programs built with the C compiler and  */
    /*                 running the resulting .out file on a C620x/C670x         */
    /*                 simulator.  Use it as a guideline.  You will want to     */
    /*                 change the memory layout to match your specific C6xxx    */
    /*                 target system.  You may want to change the allocation    */
    /*                 scheme according to the size of your program.            */
    /*                                                                          */
    /*    Notes: (1)   You must specivy a directory in which rts6x00.lib is     */
    /*                 located.  either add a -i"<directory>" line to this      */
    /*                 file or use the system environment variable C_DIR to     */
    /*                 specify a search path for the libraries.                 */
    /*                                                                          */
    /*           (2)   If the run-time library you are using is not named       */
    /*                 rts6200[e].lib, rts6400[e].lib, or rts6700[e].lib, be    */
    /*                 sure to use the correct name here.                       */
    /*                                                                          */
    /****************************************************************************/
    -c
    -heap  0x2000
    -stack 0x80000
    /* Memory Map 1 - the default */
    MEMORY
    {
            L1P:      o = 0x000E00000   l = 0x00008000 
            L1D:      o = 0x000F00000   l = 0x00008000
            L2SRAM:   o = 0x000800000   l = 0x00100000
    } 
    
    SECTIONS
    {
        .text       >       L2SRAM
        .stack      >       L2SRAM
        .bss        >       L2SRAM
        .cinit      >       L2SRAM
        .cio        >       L2SRAM 
        .const      >       L2SRAM
        .data       >       L2SRAM
        .switch     >       L2SRAM 
        .sysmem     >       L2SRAM
        .far        >       L2SRAM
        .ppdata     >       L2SRAM
    }
    

    thanks you in advance;

  • Well... I'm sorry not to answer you about that question. I'm not yet familiar with linker files...

    The best way is to try running your sofware and check with the debugger if your variables are located where you want.

    Regards.

  • so, how to active the example(how to start the sending of data) ,is there any functions must be called in order to operate hyperlink , in the presentation ,in slide 45, It is written, (Configuration functions are part of the HyperLink example in the PDK release) and in the example ,in hyplnkLLDIFace.c at line no. 627 it's written, Place peripheral into reset.

    so i don't to operate the example ,please  help me

    Ahmed

  • Hi Ahmed

    Have you gone through the HyperLink User's Guide? It is located at http://www.ti.com/lit/ug/sprugw8a/sprugw8a.pdf. It contains a lot of useful information that will be helpful in getting you started, along with this example.

    Here are some points that address your questions

    I. Addressing your question on how to operate Hyperlink....
    The typical configuration flow for HyperLink is provided below.
    Step 1. PLL, Power and SerDes
           -- Setup PLL
           -- Enable power domain for HyperLink
           -- Configure SerDes
           -- Confirm that power is enabled
    Step 2.Configure HyperLink Registers
           -- Enable HyperLink via HyperLink Control Register (base + 0x4)
           -- Once link is up, both devices can see each other‟s registers. Here there‟s a choice: device configures own registers; or one master programs registers for both devices; or direction-based.
          -- Register configuration also involves specifying address translation scheme on Tx & Rx side, and any event/interrupt configuration

    The PDK example, along with the address translation examples in the user guide, as Jhon mentioned, will be useful in understanding how this is done.
    Once steps 1 and 2 are done, as soon as you write to memory in the HyperLink address space (0x4000_0000 to 0x4FFF_FFFF), a write transaction will occur, and similarly for read. You can see how write/read transactions take place by reading the description in the HyperLink user guide.

    II. How is the above done in software ...
    Both the Chip Support Library (CSL) and HyperLink Low-Level Drivers (LLD) make available APIs that can be used to configure HyperLink. The general recommendation is that wherever LLD functions are available to do something, use LLD. If LLD API does not exist for what you want to achieve, use CSL. You can see how various CSL and LLD functions are used to setup PLL, power and Serdes, and configure registers for address translation. You can essentially use the various functions created in this example directly into your project and modify whatever you need to modify.

    III. Addressing your earlier question on writing to Segment LUT (or PrivID LUT)
    To program the LUT:
    •Write to Rx Address PrivID/Segment Index Register
    •Write to Rx Address PrivID/Segment Value Register, which will populate the corresponding index in the LUT with this value
    To check LUT content:
    •Write to Rx Address PrivID/Segment Index Register
    •Read Rx Address PrivID/Segment Value Register, which will return value from LUT for index specified in Index Register

  • The configuration of the Hyperlink is made at the beginning of the program when the function hyplnkExampleSysSetup() is called.

    Then, the DSP wait the remote side to initialize his module too in that function: hyplnkExamplePeriphSetup().

    Take a look at the hyperlink user guide, it's very well explained (if you want to have different configurations for the hyperlink module).

    Once Hyperlink is configured, you don't have to re configure it to send data. You just have to configure the address translation.

  • thanks John for your effort , but what do you mean by configure the address translation , you mean to configure the registers that are in section Address Translation in user guide such as (TX Address Overlay Control register - RX Address Selector Control Register - Rx Address PrivID Index Register - Rx Address PrivID
    Value Register) according to the following values

    TXAddrOvly.txSecOvl    = 0;  /* Ignore the secure bit */
      TXAddrOvly.txPrivIDOvl = 12; /* Put privid in the MS 4 bits of address */
      TXAddrOvly.txIgnMask   = 11; /* Open whole 256MB window */

      RXAddrSel.rxSecHi     = 0; /* Don't care about secure */
      RXAddrSel.rxSecLo     = 0; /* Don't care about secure */
      RXAddrSel.rxSecSel    = 0; /* Don't care about secure */
      RXAddrSel.rxPrivIDSel = 12; /* Symmetric with TXAddrOvly.txPrivIDOvl */
      RXAddrSel.rxSegSel    = 6;  /* Make segments of 4MB each */

    and put the configuration in hyplnkExamplePeriphSetup or you mean to form the Segment Lookup Table ??

    thank you again for helping me;

    Ahmed

  • You have to configure the address translation like they did in the function : hyplnkExampleAddrMap();

    This function place the fields needed where the user wants. (place of the PrivID or the index of segment).

    This function also initializes segments that will be used for the translation address on remote side (look up table).

    I think you have to spend a lot of time on the documents (the example code, the UG and the power point presentation) to have your ideas clear on that subject.

  • hello John;

    I just want to ensure that this example is a write operation .I mentioned that The General Bus Control Word transfers bus commands that provide the capability to
    read and write remote HyperLink devices. i didn't find it in the example but i notice from the main function that it's a write operation ?

    another question,when simulating the example , i need to connect both boards or i can simulate the example by debugging the code without connecting both boards? .That's because, i understood from the user guide that the Tx wait to the other side to come up .

    thanks in advance

  • Hi Ahmed,

    This example send a token or a block from a local device to a remote device. So it is a write operation.

    For your second question, you can choose to run the example in loopback mode by uncomment the line //#define hyplnk_EXAMPLE_LOOPBACK located at hyplnkLLDCfg.h

    When you comment that line, you don't run the example in loopback mode and the DSP will wait for the other DSP to initialize his SerDes module. So, in board to board mode, you have to run the example on both DSP.

    I didn't run the example in loopback mode so I can't tell you what it does exactly.

  • The example has two modes.  Loopback (only one board) and Normal (two boards)

     

    read the readme file and find out what parameter you should set for loopback.  It is in the file hyplnkLLDCfg.h line 75 (I think)

     

    Ran

  • hello;

    I connect the 2 Kits and run the example in debug mode but the data didn't transfer from the local device to the remote device and the the local device after setup the peripheral couldn't continue and written (waiting for the other side to come up)

    so can any one help me , Are i missing any thing ?

  • Sometimes there are some bugs..

    Please verify that the settings are the same for both codes. That mean there is some #defines in order to select the desired settings.

    So please verify you initialize both SerDes at the same speed (6,5 GBaud max, after this value there is some bugs due to the length of the link).

    And please verify that you have the line //#define hyplnk_EXAMPLE_LOOPBACK commented.

    You can find this settings in "hyplnkLLDCfg.h"

    An other thing, when you run the code:

    Begin to run the example on one board and wait until you see the message "waiting for the other side to come up". Just after seeing this message, run the example on the other board.

    If they are both well configured they should stop running into the infinity loop and they should begin transfert some data.

  • thanks for your help , John;

    Finally the example worked ,but i want to ask about the number of iteration,is that number of resending  the data from master to slave ?

    and if i want to control the number of iteration ,change the number of it as following

     #define hyplnk_EXAMPLE_NTOKENS    0x10000 /* token pass round trip cycles */

    so i change 0x10000 with the number i want ??

    is that true ? and if not how can i change it ??

    wish to help me ;

  • This #define correspond to the number of tokens passed through hyperlink. 

    You can change that number by whatever you want. 

    In the example there is two way to send data:

    Exchange of token or exchange of block. 

    Try to run both modes in debug mode, step by step. Look at the function where the sending of data take place. 

    It would be helpfull for you to understand how it works.

  • So,is the iteration refer to the number that will send tokens?

  • No, the example run into an infinity loop and there is an infinity number of iteration. 

    You have to understand how the example works so you could write your own code after. 

    The better way to understand the example is to run it in debug mode.

  • i understood that hyplnk_EXAMPLE_NTOKENS is the number of tokens passed through hyperlink(65536 in the example) but i mean by iteration is the number that the all tokens are sent (at iteration=0 hyperlink will sent 65536 tokens and at iteration=1 will sent 65536 again and so on) that's what i meant ,so is that true ? 

    when debugging(run the example step by step ) the example in the local kit , what is the situation in the remote kits(run the example in the remote device step by step or what)?

    thanks in advance and sorry for my several question;

  • There are two modes for this example:

    - the local device sends a number of tokens to the remote device

    - the local device sends a number of block to the remote device

    In the first example, the local device sends 0x1000 tokens to the remote device. That mean, it sends 65536 tokens at each itteration.

    When you are running step by step the local device, you don't have to take care about the remote device. You just have to run the example on it in order to initialize his SerDes module. After this, you can choose to suspend it or let it run, it doesn't matter.

  • hello John;

    I ran the example but i want to make the interface sending a stream of bits not a single token so,in your opinion how to do this ?

    wish to help me very soon

  • Hi,

    The example shows you how hyperlink works. Based on that example, you can write your own code that fits to your application.

    You can, for example, write a program wich uses a DMA transfer to send a data buffer into the hyperlink window. There are several ways to send data...

    Maybe you've got to spend more time on the example to really undestand how it works.

  • hello John;

    when changing the mode from CPU_token to DMA_token just making lines 113&119 commented and make lines 116&122 not commented ?

    because when i done this it didn't run so, wish to help me.

  • You really need to spend more time on the example.

    I remember that it is written somewhere that DMA transfert is not implemented for now.

    When I said : "You can, for example, write a program wich uses a DMA transfer to send a data buffer into the hyperlink window.", I wanted to say : try to code your own program wich fits to your application.

    If you are waiting for the example to do what you want, it should never occur. So, try to understand what the program does and how it does using the debugger. And in a second time, try to code your own program wich fits to your application.

    If you are getting some troubles, post specific questions into a new thread. But try to look for the answer before posting your question here.

    For example: if you're asking me "What the hyperlink example do?" I should answer "there is comments at the beginning of the program." or "Run it and you should see by yourself".

  • Ahmed,

    I agree with Jhon; you'll benefit immensely by spending some more time reading the hyperlink user guide and systematically stepping through the code, and then writing code to fit your implementation needs. 

    Also, for every new question which does not directly relate to the original e2e question in the post, we'd appreciate it if you could please post a new e2e post. It will help you get an answer quicker since multiple experts will notice the post and can get to it, and it also helps keeps topics organized for other community members.

    Thanks.