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.

AM6442: connection between DMASS, RING ACC, and CBASS (VBUSM)

Hi, 

I'm working on DMSS on the AM64X HS-FS board.

I have some questions. All the references to TRM are either to AM64x/243x version 2.0 TRM or to AM65x TRM.

The following picture that I have drawn is my understanding of how the DMSS module works. 

I would appreciate it if you could correct me if I'm wrong in describing it.

1.IA trigger can come from L2G to INTAGGR (like from GPIO through GPIO_INTRMUX), it will be mapped to PSI-L then it will go to the BCDMA module to do trigger the start of the transfer for BCDMA.

 

However, also there is a Ring pending coming from the Ring Accelerator to BCDMA (section 11.1.4.16, step 3, or figure 11-180). This signal is happening when there is an element queued in the ring waiting for transmission.

In the TRM the “Ring pending signal” is mentioned as “level sensitive status signal” in “This level sensitive status line is sent to the hardware block which is responsible for scheduling DMA operations”)

 

Finally, which of these two (Mapped trigger coming from PSI-L versus Ring Pending signal) triggers the start of transmission on BCDMA? Does it mean that it should be queued first and then triggered, or first the BCDMA should be triggered and then queued after?

 

The ring Pending concept is at section 10.1.3.8 of AM65x TRM, step 3, however in the AM64x TRM the word Ring Accelerator is replaced by BCDMA, which is very confusing.

 

2.In the AM64x TRM section 11.1.1.5.1.4, it is mentioned that the DMA controller (DMA read/write unit in case of BCDMA) initiates the VBUSM transfer to read descriptor pointers from memory-mapped rings, read descriptors, transfer request records and payload data from memory and keep it in the channel buffers in the meantime to transfer it to destination finally. It implements all the state machines required to perform these transfers. What does it mean here when it says "it initiates the VBUSM transfers"? Does it really send a read/write command on the VBUSM or not? The connection between VBUSM, BCDMA, and RA is not clear here.

In AM64x TRM there are two different types of figures that demonstrate the DMASS connections to the bus which makes it even more confusing:

a)This figure shows the only way the DMASS is connected to CBASS is either through the RA or through the SEC_PROXY. This Idea matches with the interconnect tables for CBASS; tables 3-7 and 3-10 show that the only connection to DMASS is either through SEC_PROXY or RING. However, in Table 3-10, we can see other DMASS connections on CBASS that are used for setting the register for DMASS as well (I believe these are not related to DMA data transfers)

 b)In the following schematics, however, we see something different. We see that BCDMA and PKTDMA also have a connection to CBASS. Why there is a difference between the above figure/table and the following figures? It does not seem these connections are for the configuration of the registers, because the configurations are already shown with P_SLV. Therefore, what is this difference and why?

3.Based on my understanding the steps for a BCDMA-BlkCpy transfer are as follows. However, I’m not sure about step (f) as it is not clear in the TRM and I can interpret it in two different ways as I described in the following. Also as mentioned in item (2) the mismatching block-diagram figures do not help either.

In addition to that, the following figure from AM65x TRM gives me a second interpretation:

  1. First Interpretation:
    1. The software queues the Transfer Request Descriptor pointer into the proper ring (corresponding ring for the chosen channel for blkCpy operation).
    2. When the pointer is queued, RA sends a level status signal to the hardware block that is responsible for scheduling DMA (I believe in this case is the BCDMA Write/Read unit module).
    3. The BCDMA-BlkCpy channel will be triggered by a mapped event coming from IA.
    4. Receiving the trigger, the DMA controller is going to start to process the Transfer packet descriptor. Is it the case or still the channel still need to wait for the arbitration and its turn or it will escape its turn because it was triggered?
    5. DMA controller reads the packet descriptor pointer from the RA through the DMSS-CBASS.
    6. Then DMA controller reads the packet descriptor from the memory meaning that BCDMA reads the memory through CBASS (VBUSM).
    7. As TRs are read from the descriptor they are stored in the internal state of the DMA channel, until all are read.
    8. All the data transfers that are specified in the TR will be complete, meaning that the data payload transfers are happening from the internal BCDMA channel to the destination memory address through the CBASS (VBUSM).
    9. As each TR is completed and the response received, the response will be written into the Transfer Response record array, using CBASS (VBUSM) from BCDMA to the memory.
    10. When all the transfer requests in the packet are processed all the transfer responses received, and confirmed that they are landed in the memory, BCDMA writes the pointer to the descriptor in the return queue of the packet descriptor, meaning that BCDMA will write into the corresponding ring in the Ring Accelerator.
    11. Then RA sends an event for ring completion to the IA. However, if the event is based on the TR, I believe it will be triggered after transferring the defined number of bytes at step (h).
  2. The other interpretation is as follows:

a-e. The same

f. The RA translates it to the address for the proper ring pointer (based on the Ring Accelerator functional description in section 11.2.2.3 of the TRM). Then RA sends the command on CBASS to the memory to read the corresponding address and then passes the read packet descriptor to the BCDMA.

h-k. The same

  1. when in the TRM it talks about the channelized firewalls is it talking about the following? or is it sth else?

  • Hi Boshra,

    I have assigned your query to our expert. Due to public holiday in TI India office,  expect delay in response from our expert,

    Apologies for the delay.

    Best Regards,

    Suren

  • Some of the diagrams you refer to are conceptual, not necessarily what is actually on AM64x. AM65x has the full UDMA, as do higher end devices like https://www.ti.com/product/DRA821U . AM64x and AM243x have a lower cost DMA, basically Packet DMA and BCDMA. We support using those with the drivers in the SDK while trying to keep a common UDMA driver, see https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/latest/exports/docs/am64x_am243x/Migrating_Applications_from_NAVSS_UDMA_to_DMSS_using_TI-RTOS.pdf for a description of the SW visible differences.

  • Hi, 

    Thanks for your reply, I will read the pdf document you referred to. However, your response is very general and doesn't answer my questions. 

    I have asked many questions above. Would it be better if I ask in a different ticket? I need to have this general information to move to the safety analysis. 

    Can you tell me which figures are conceptual and which one not? 

    And how is the connection between BCDMA, RA, CBASS, and Memory? 

    During the mean-time, I will read the document and check if I can find the answers in that document. But I appreciate if you could guide me as well as the DMASS  is already very complicated. 

    Thanks, 

    Boshra

  • I read the pdf. It doesn't answer my questions. 

    Bests, 

    Boshra

  • Table 2. Comparison between DMSS and NAVSS UDMA is the key to look at if you are trying to mix and match AM65x to AM64x.

    The ring Pending concept is at section 10.1.3.8 of AM65x TRM, step 3, however in the AM64x TRM the word Ring Accelerator is replaced by BCDMA, which is very confusing.

    AM65x had flexibility in mappings rings to DMA channels. AM64x does not. So each BCDMA channel is one ring.

    What does it mean here when it says "it initiates the VBUSM transfers"? Does it really send a read/write command on the VBUSM or not? The connection between VBUSM, BCDMA, and RA is not clear here.

    Yes. "initiates VBUSM transfer" means reads or writes to a memory address. VBUSM is a multi-issue bus protocol, read/erite an address. BCDMA is a HW blockbeing able to do bulk memory copies. RA is able to read and write TR's or trandfer requests to command BCDMA to do the transfer. In AM64x BCDMA to ring relationship is hard coded.

    f. The RA translates it to the address for the proper ring pointer (based on the Ring Accelerator functional description in section 11.2.2.3 of the TRM). Then RA sends the command on CBASS to the memory to read the corresponding address and then passes the read packet descriptor to the BCDMA.
    Then DMA controller reads the packet descriptor from the memory meaning that BCDMA reads the memory through CBASS (VBUSM).

    To me these both are correct. A data structure in the ring tells BCDMA to copy data. There is no independent ring accelerator, rings are tied to DMA channels, even though the section 11.2.2.1 shows an independent RA.

    when in the TRM it talks about the channelized firewalls is it talking about the following? or is it sth else?

    AM64x channelized firewalls are listed at https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am64x/firewalls.html?highlight=channelized#list-of-channelized-firewalls .

  • Hi Pekka,

    Thank you again for your helpful responses. It is truly appreciated.

    I have the following questions: 

    1. Considering that AM64x and AM243x have the same TRM. Is it true that the DMASS in AM243x is exactly the same as AM64x? 
    2. So basically means that there is no ring mapping and RA is integrated inside BCDMA and PKTDMA. Right?
    3. When you say here hard-coded it means that it's not a hardware module. So is it the M3 that is proggamed to this scheduling and sending the commands based on the TRD (Transfer Request Descriptor), or you are talking about the state-machine that is shown it exists in the RA?
    4. Both BCDMA and PKTDMA have Ring registers, tables 11-69 and 11-237. However, there are tables 11-433 to 11-436 which contain the same information and more. If RA is integrated inside BCDMA, then why the register sets defined in 11-433 to to 11-436 exist? 
    5. Is there any updated TRM for AM243x that matches the existing functionalities? Or will be there any?
    6. Is there any documentation for TISCI ? I'm not talking about the online documentation. Like a PDF that is published that we can refer to?
    7. I have seen this link before. The section is empty. 
      • Receiving the trigger, the DMA controller is going to start to process the Transfer packet descriptor. Is it the case or still the channel still need to wait for the arbitration and its turn or it will escape its turn because it was triggered?

      I defined my BCDMA to be triggered by software. However sometimes, In the debugging mode, I see that as soon as the queueing of the ring happens, the transfer starts, despite I haven't triggered the BCDMA yet. I dont know if it is really the case or I see it like that because of the code optimization (I'm not always able to see the steps in the debug mode). But What are we expecting to happen? first queueing to the ring then triggering then it starts after arbitration when DMA has got free and allocated to that channel?

    8. In continuing to question 8, Are the channel transfers supposed to interrupt each other so that the one with the higher priority is transferred as soon as it is triggered? or does it need to wait until the DMA engine is free? I assume the first case is correct. Otherwise, the priority would be useless, however, I would like to confirm it still.

    Regards, 

    Boshra

  • Considering that AM64x and AM243x have the same TRM. Is it true that the DMASS in AM243x is exactly the same as AM64x? 

    Yes. The only difference is the Cortex A53 cluster and the L2 cache that comes with it.

    So basically means that there is no ring mapping and RA is integrated inside BCDMA and PKTDMA. Right?

    Yes

    When you say here hard-coded it means that it's not a hardware module. So is it the M3 that is proggamed to this scheduling and sending the commands based on the TRD (Transfer Request Descriptor), or you are talking about the state-machine that is shown it exists in the RA?
    In AM64x BCDMA to ring relationship is hard coded.

    There is no M3 involved in BCDMA. Ring to channel relationship is hard coded. See for example https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am64x/ra_cfg.html the rings 0 through 27 are for BCDMA. The TRM seems to be limited on this mapping, 11.2.1.5.2.20 DMASS0_BCDMA_0_CAP2 Register in TRM revision H has the channel count for BCDMA.

    Both BCDMA and PKTDMA have Ring registers, tables 11-69 and 11-237. However, there are tables 11-433 to 11-436 which contain the same information and more. If RA is integrated inside BCDMA, then why the register sets defined in 11-433 to to 11-436 exist? 

    These table numbers 11-433 onwards are for tracing at least in revision H of the TRM ? Are you looking at a different revision?

    Is there any updated TRM for AM243x that matches the existing functionalities? Or will be there any?

    Revision H has a number of updates, but section 11.2.2 Ring Accelerator (RINGACC) still comes from superset UDMA.

    Is there any documentation for TISCI ? I'm not talking about the online documentation. Like a PDF that is published that we can refer to?

    No the online documentation https://software-dl.ti.com/tisci/esd/latest/index.html is it. Instead of latest you can link to specific versions with a link like https://software-dl.ti.com/tisci/esd/09_01_01/index.html .

    I have seen this link before. The section is empty. 

    Section is empty as there are no modifiable channelized firewalls on AM64x. See TRM (revision H) section 3.8.3 Firewall Block

    I defined my BCDMA to be triggered by software. However sometimes, In the debugging mode, I see that as soon as the queueing of the ring happens, the transfer starts, despite I haven't triggered the BCDMA yet. I dont know if it is really the case or I see it like that because of the code optimization (I'm not always able to see the steps in the debug mode). But What are we expecting to happen? first queueing to the ring then triggering then it starts after arbitration when DMA has got free and allocated to that channel?

    With debugging mode, do you mean with JTAG debugger attached? Writing the pointer to the TR to the queue/ring will trigger the BCDMA. I'm not sure what you mean with triggering BCDMA after queueing?

    In continuing to question 8, Are the channel transfers supposed to interrupt each other so that the one with the higher priority is transferred as soon as it is triggered? or does it need to wait until the DMA engine is free? I assume the first case is correct. Otherwise, the priority would be useless, however, I would like to confirm it still.

    No channels are in flight in parallel. See 11.1.3.5 Channels in the TRM (revision H). The priority is related to usage of the read and write units (11.1.1.5.1.4 Read Unit(s) and 11.1.1.5.1.9 Write Unit(s)) when more than one channel is serviceable (FIFO has space, i.e. previous bursts have completed) . See description in 11.2.1.5.2.4 DMASS0_BCDMA_0_ST_SCHED Register :

    Arbitration between bins is performed in a strict priority fashion. High priority channels will always be serviced first. If no high priority
    channels are requesting then all medium-high priority channels will be serviced next. If no high priority or medium-high priority
    channels are requesting then all medium-low priority channels will be serviced next. When no other channels are requesting, the low
    priority channels will be serviced. All channels within a given bin are serviced in a round robin order. Only channels which are enabled
    and which have sufficient free space in their Per Channel FIFO will be included in the round robin arbitration.