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.

TMS320C6678: TMS320C6678: Hyperlink segments configuration.

Part Number: TMS320C6678


Hi,

    Considering the Hyperlink memory window is 256MB size, between 0x4000.0000 - 0x4FFF.FFFF how should know an application from evmA which address should target for accessing for example segment 1 from evmB considering evmB has 2 segments configured:

segm0 at address 0x8000.0000, size 4MB

segm1 at address 0x8700.0000, size 32MB

In TI presentation, slide 35 it is specified that 0x4567.89a0. How knows TX side that this address from Hyperlink memory data is matching a remote address mapped to a segment?

 https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/KeyStone-Hyperlink.pptx

Thanks.

  • Hi,

    Have you checked section 2.7.4 Address Translation from the Hyperlink user guide, it is more detailed than the presentation you share?

    Best Regards,
    Yordan

  • Yes and it i is unclear. That's why we have this ticket !

  • To be more specific I will detail my question based on your example from PDK:

    - 2 boards, evmA and evmB connected throug hyperlink.

    - NO loopback mode

    - I want to send some data from evmA to evmB

    - for evmA I need to configure the hyplnkTXAddrOvlyReg_t register.

    - for evmB I need to configure the hyplnkRXAddrSelReg_t, hyplnkRXSegValReg_t and hyplnkRXSegIdxReg_t registers.

    - If I have 2 RX segments configured on evmB, one of 16 MB and one of 4MB.

    Considering I want to write some data from evmA to evmB into the second segment. At what range from 0x40000000 - 0x4FFFFFFF should I write from evmA for this? 

    The configuration of a RX segment must be done using a local variable (from evmB) mapped to some region. Based on this variable address there is configured the hyplnkRXSegValReg_t register on evmB.

    So, how evmA knows the base address of second segment from evmB?

    In you pdk excample you did something like this: *dataBufferViaHlink = (void *)( (char *)hlinkBase + globalAddrOffset + (segmentID<<(RXAddrSel.rxSegSel+16)));

    But this is working to use dataBufferViaHlink if you are in loopback mode, right?

    /Daniel

  • Hi,

    1. Attached is a PDF file for Hyperlink training. See the example for Address Translation: LUT Example 3 and Address Translation: LUT Example 4, where you have multiple segments with different sizes.

    2. As for how the EVMA know the EVMB side mapping? =========> EVMA can read/write the EVMB sides' register with address + offset 0x80.

    E.g, EVMB, you typically setup Rx at 

    0x2c Rx Address Selector Control Section 3.2.9
    0x30 Rx Address PrivID Index Section 3.2.10
    0x34 Rx Address PrivID Value Section 3.2.11
    0x38 Rx Address Segment Index Section 3.2.12
    0x3c Rx Address Segment Value Section 3.2.13

    You can do this locally at EVMB side.

    C66x-KeyStoneTraining-HyperLink.pdfAlso, you can do this from EVMA side, using 0x80+above address. Note this has to be done after Hyperlink interface coming up.

    Regards, Eric

  • Hi,

       Actually my question was targeting another point.

       In the Hyperlink user guide it says: "The address translations for ingress and egress are done independently...."

       Supposing that I have on evmB (receiver side) 2 segments of 4 MB length and the rxseg_val is set based on 2 global variables that are stored in external RAM of evmB, somewhere in the region up from 0x8000.0000.

       On the sender side, evmA, what address should I use or how I could detect it if for example I want to address the second segment. As documentation, the sender sees a region between 0x4000.0000 - 0x4FFF.FFFF (256 MB max). Should I assume that to access region0 I should read/write to 0x4000.0000-0x403F.FFFF and to access region1 I should read/write to 0x4040.0000-0x407F.FFFF, whatever rxseg_val was used on evmB?

       If I have 16 regions of different sizes for evmB then it means I should know from evmA the entire configuration of evmB rx segments (segment index and  size of each) because I should calculate my local offsets on evmA (for read/write the space of 0x4000.0000 - 0x4FFF.FFFF) if I would like to address a specific segment on evmB based on hyperlink memory and hyperlink address?

      Considering that I will use every segment from evmB to transmit only one data block at once time and if I would like to use from core0_evmA the remote segment 0, core1_evmA to remote segment1, then I should implement some kind of LUT on evmA for the segments configured on evmB? Else how can I address the remote segment ID from evmB?

    /Daniel.

  • Daniel,

    It is good to try the example to understand how the translation works, besides the discussion on user guide. What is the exact independence between Tx and Rx sides means and in rest questions.

    For example, if you program below in Rx side, then what is the Tx side starting address to access the Rx side? 

    Rx side:                                                                       Tx side

    • index 0, value 0x10800012 (512KB     L2)     0x40000000
    • index 1, value 0x80000015 (4MB     DDR)     0x40400000
    • index 2, value 0x0C000013 (1MB MSMC)     0x40800000
    • index 3, value 0x84000015 (4MB     DDR)     0x40c00000

    If you use different segment sizes on the Rx side, you will see there are holes in the Tx side (0x4000_0000 to 0x4FFF_FFFF). You can't say I use the next Tx side 0x40900000 for the next DDR region (it actually starts from 0x40c00000).

    You can run the hyplnk_evmc6678_C66BiosExampleProject, then halt the CPU, using the CCS memory browser to poke 0x38 for index and 0x3c for value (e.g, write 0 to 0x38, then write something into 0x3c, then write 1 to 0x38, write something in 0x3c, write 2 to 0x38, write something to 0x3c, .....). Then look at 0x4xxx_xxxx to understand where mapped to where.

    Regards, Eric