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.

TDA4VH-Q1: TDA4VH SoC Debug

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: DRA829, TDA4VM, TDA4VH

Hi expers,

An Introduction of the SoC Debug can be found through the J784s4 TRM, Chapter 13 "On-Chip Debug", But there is no detailed explanation, such as which Soc/Peripherals DEBUGCELL and CPTracter2 correspond to for debugging. The "device.h" file in ctoolslib_J721E_DRA829_TDA4VM_v0.2 is only applicable to the J721E platform. Is there a version for the J784s4 platform?

Thanks

  • Hi experts:

           More specifically, we want the device.h header file for TDA4VH in the ctoolslib library. The attachment is the definition of J721E platform.

    J721E definition:($(dir)/ctoolslib_J721E_DRA829_TDA4VM_v0.2/build/dra8x9/device.h)

    device.h

  • Hi Li 

    We are checking on this , will update you within a week.

    Regards
    Diwakar

  • Hello Li,

    For TDA4VH the trace config, capture, and decode process is only supported via a connection of a JTAG debugger (commonly CCS, but others also work here like TRACE32).   The information to setup up probes for the tool can be found for the current CCS install at C:\ti\ccs1250\ccs\ccs_base\emulation\analysis\dpk\devices\j7ahp\*.

    For TDA4VM (aka J7ES) the options to use the tools allowed for either a target setup or a jtag setup.  For TDA4VH only a JTAG setup is currently supported.  For both targets post processing did require CCS decode tools.  Its notable that the self-hosted setup for debug resources is firewall blocked by current TI firmware which runs on targets so any attempted porting (using the tool specific config files) would require more changes then one might assume.  The JTAG debugger is not effected by the firmware as it accesses the trace resources on a debug address plane (APB) and not the system address plane used by the processors. 

    Regards,
    Richard W.
  • Hi Richard W.

    1. The On-Chip debug module (dbgcell, CPTracer2...) address space of the TDA4VH platform on SDK8.6 can be read and written. It seems that this is not restricted by the TI firewall. The Linux test program code is based on ctoolslib_J721E_DRA829_TDA4VM_v0.2

    2. From the AETT_property_ks3_system_trace_j7ahp.xml file, we have learned about the TraceAggregator of MSMC_0/1, but the following probe seems to be somewhat different from J784s4. According to the description, CSI8_TARGET, CSI9_TARGET, CSI9_INITIATOR correspond to SoC 0/1 (NavSS Northbridge 0/1), but J784s4 TRM , shouldn't this be the 11/12 Coherent Interface? and 1/5/6/7 Coherent Interface is not reflected in AETT_property_ks3_system_trace_j7ahp.xml

    Thanks

  • Hello Li,

    The figure in the TRM version you are looking at is incorrect.  I had filed a bug on this a while back and a fix should show up in a future TRM.  A fix up looks like the below picture which should match the tool file.

    Are you using a GP (general purpose device like found with EVM) or a HS (high security like found on SK)?  The firewall settings will be different.  Firmware versioning also will come into play.
    TDA4VH uses a multi-level MSMC on C7x paths and the probe setup is different compared to TDA4VM where the C7xs are direct connected.     
    Regards,
    Richard W.
  • Hi Richard W

    1. Yes, we are using GP devices. You don’t seem to have explained the coherent interfaces of A72SS1 , this CSI1 probe is not defined in the AETT_database_ks3_j7ahp.jsonc.

    2. The following tables are analyzed based on the AETT_property_ks3_system_trace_j7ahp.xml file. Can you help me check to see if they are correct?

    3. How to use CCS to parse the CPTrace2 data read from TBR?
    Thanks
    QuanLi.
  • Hi Richard W

    Is there a more detailed explanation about the master-to-route-ID assignment. We didn't find it in the j784s4 TRM.

    Thanks
    QuanLi.
  • Hello Li,

    I'll attach an excerpt from my notes which can answer your MSMC3 probe question (type and address).  I had worked with Lauterbach to add capture and decoding into their tool TRACE32. I am aware of the CCS file basics however I have not dug into that implementation.  If you have specific CCS usage questions you will need to create another E2E to get that handled.  As I mention, at present we are only supported tool based capture and decode for TDA4VH.  From your questions it seems like you may be trying to extend the existing TDA4VM project for TDA4VH and that may work, however I don't think enough detailed information is in the public to do this without some tool (CCS or LB) assist.

    The mappings for MSMCs can be seen in here:

    Debug Address (ABP) : 0x9xxx_xxxx --> System Address (AXI) 0x4C:0x3xxx_xxxx
    
    ;     TraceID        Agg      TBR    APB:Agg base ; ProbeBase: AggBase+0x20000 + Prob#x0x1000
    ;STM2.TraceID 0x50 ; SOC-RC : TBR3 - 0x9E100000   ; 6 probes
    ;STM2.TraceID 0x51 ; MCU    : TBR3 - 0x9E000000   ; 4 probes
    ;STM2.TraceID 0x52 ; AC     : TBR3 - 0x9E180000   ; 7 probes
    ;STM2.TraceID 0x53 ; HC     : TBR3 - 0x9E200000   ; 6 probes
    ;STM2.TraceID 0x54 ; MV     : TBR3 - 0x9E1C0000   ; 1 probe
    ;STM2.TraceID 0x55 ; MI     : TBR3 - 0x9E140000   ; 1 probe
    ;STM2.TraceID 0x56 ; ACP    : TBR3 - 0x9E240000   ; 2 probes
    ;STM2.TraceID 0x57 ; MSMC_0 : TBR1 - 0x90140000   ; 9 probes
    ;STM2.TraceID 0x58 ; MSMC_1 : TBR1 - 0x90180000   ; 8 probes
    ;STM2.TraceID 0x59 ; C7-1   : TBR1 - 0x91440000   ; 6 probes
    ;STM2.TraceID 0x5a ; C7-2   : TBR1 - 0x91840000   ; 6 probes
    ;STM2.TraceID 0x5b ; C7-3   : TBR1 - 0x91C40000   ; 6 probes
    ;STM2.TraceID 0x5c ; C7-4   : TBR1 - 0x92040000   ; 6 probes
    ;STM2.TRACEID 0x5d : MSMC1_0: TBR1 - 0x93040000   ; 8 probes
    ;STM2.TRACEID 0x5e : MSMC1_1: TBR1 - 0x93140000   ; 8 probes
    ;STM2.TRACEID 0x5f : MSMC1_2: TBR1 - 0x93240000   ; 8 probes
    ;STM2.TRACEID 0x60 : MSMC1_3: TBR1 - 0x93340000   ; 8 probes
    
    ; MSMC_0            => MSMC3 probes
    00 DRU0.T 
    01 DRU0.I
    02 DRU1.T
    03 DRU1.I
    04 CSI0.T ARM Clust0
    05 CSI0.I ARM Clust0
    08 CSI4.T MSMC2
    09 CSI4.I MSMC2
    12 CSI8.T NAVSS NB1
    
    ; MSMC_1            => MSMC3 probes
    00 EMIF0               
    01 EMIF1
    02 CSI1.T ARM Clust1
    03 CSI1.I ARM Clust1
    10 CSI9.T
    11 CSI9.I
    30 EMIF3
    31 EMIF2
    
    ; MSMC1_x (x=0-3)   => Per C7x local MSMC1 probes
    00 DRU0.T
    01 DRU0.I
    02 DRU1.T
    03 DRU1.I
    04 CSI0.T C7-x
    05 CS10.I C7-x
    06 CSI2.T MSMC2
    07 CSI2.I MSMC2
    
    ; C7-x (x=1-4)      => Per C7x L1 and SE porbes
    00 L1D to L2
    01 L1P to L2
    02 SE0 to L2
    03 SE1 to L2
    04 L2 to L1D
    05 MMU to L2
    

    The decode of a frame should be possible using the process in the TDA4VM lib note which uses bin2tdf and td which are part of your CCS install.  Alternately, you can use the cptracertrace.list command inside of TRACE32.  In the TRACE32 case you need to capture it in the tool to display it, or use an la.import feature if its a raw TBR image.
    Regards,
    Richard W.
  • Hello QuanLi,

    Routeid additions will be included in a future TRM.  I have a preliminary list embedded in a traffic capture script I use with TRACE32.  The script samples activity during operation and prints out routes which targeted DDR. When inspecting an unknown use case this can be useful in understanding what is running. The script has a list of the TDA4VH routeid's at the base.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Log active routes for a J784S4 use case to EMIF0/1/2/3/4
    ; 14 Oct 22 - Richard Woodruff - Adapt J721S2 for J784S4.
    ; 20 Oct 23 - Richard Woodruff - Update routeids
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This script helps identify what source-to-destination routes are active
    ;  for a use case. The discovered routeids can be used to filter and measure
    ;  each flow. Route Names can be looked up from the list at the bottem.
    
    ;
    ; !Routeid naming needed for J784S4 when TRM is updated!
    ;
    
     DO ~~~~/j784s4-a72-cpt-throughput.cmm
    
     area.create found 1000.
     area.create notfound 1000.
     area.view notfound
     area.view found
    
     system.jtagclock ctck 40MHz
     break
    
     go
    
    ; Hit TRM ranges first
     LOCAL &route
     &route=0.
     area.select notfound
     RePeat
     (
       CPT.MSMC_1.EMIF0_I.RouteID &route
       cptt.arm
       screen.wait 1.s
       ;break
       cptt.off
       cptt.find , thru.totalbytes !=0x0
       IF found()
       (
          area.select found
          PRINT &route
          area.select notfound
       )
       ELSE
        PRINT &route
       &route=&route+1. 
     )
     WHILE &route<376.
    
     &route=522.
     area.select notfound
     RePeat
     (
       cptt.arm
       CPT.MSMC_1.EMIF0_I.RouteID &route
       screen.wait 1.s
       ;break
       cptt.off
       cptt.find , thru.totalbytes !=0x0
       IF found()
       (
          area.select found
          PRINT &route
          area.select notfound
       )
       ELSE
        PRINT &route
       &route=&route+1.
     )
     WHILE &route<642.
    
     &route=2560.
     area.select notfound
     RePeat
     (
       CPT.MSMC_1.EMIF0_I.RouteID &route
       cptt.arm
       screen.wait 1.s
       ;break
       cptt.off
       cptt.find , thru.totalbytes !=0x0
       IF found()
       (
          area.select found
          PRINT &route
          area.select notfound
       )
       ELSE
        PRINT &route
       &route=&route+1.
     )
     WHILE &route<2699.
    
     &route=4062.
     area.select notfound
     RePeat
     (
       CPT.MSMC_1.EMIF0_I.RouteID &route
       cptt.arm
       screen.wait 1.s
       ;break
       cptt.off
       cptt.find , thru.totalbytes !=0x0
       IF found()
       (
          area.select found
          PRINT &route
          area.select notfound
       )
       ELSE
        PRINT &route
       &route=&route+1.
     )
     WHILE &route<4081.
    
    ; now walk the whole thing
    
     &route=0.
     area.select notfound
     RePeat
     (
       CPT.MSMC_1.EMIF0_I.RouteID &route
       cptt.arm
       screen.wait 1.s
       ;break
       cptt.off
       cptt.find , thru.totalbytes !=0x0
       IF found()
       (
          area.select found
          PRINT &route
          area.select notfound
       )
       ELSE
        PRINT &route
       &route=&route+1.
     )
     WHILE &route<4081.
    
    enddo
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; TDA4VH list of RouteIDs
    ;;;;;;;;;;;;;;;;;;;;;;;;;;
    A72-CORE0-C0	0
    A72-CORE1-C0	1
    A72-CORE2-C0	2
    A72-CORE3-C0	3
    A72-L2Cache-C0	4
    A72-CORE0-C1	8
    A72-CORE1-C1	9
    A72-CORE2-C1	10
    A72-CORE3-C1	11
    A72-L2Cache-C1	12
    C70-CORE0	32
    C70-DRU0	33
    C70-DRU1	34
    C70-CMMU	35
    C71-CORE0	36
    C71-DRU0	37
    C71-DRU1	38
    C71-CMMU	39
    C72-CORE0	40
    C72-DRU0	41
    C72-DRU1	42
    C72-CMMU	43
    C73-CORE0	44
    C73-DRU0	45
    C73-DRU1	46
    C73-CMMU	47
    DRU00	104
    DRU01	105
    IOMMU	112
    MSMC3	127
    EMMC8SS0_WR	256
    EMMC8SS0_RD	257
    EMMCSD4SS0_WR	258
    EMMCSD4SS0_RD	259
    UFS0_RD	274
    UFS0_WR	275
    SA2_UL	300
    COMPUTE_CLUSTER0_RD	302
    COMPUTE_CLUSTER0_WR	303
    USB0_RD	304
    USB0_WR	305
    LED	334
    DEBUGSS0_RD	350
    DEBUGSS0_WR	351
    PCIE0_RD_HP	352
    PCIE0_WR_HP	353
    PCIE0_RD 	354
    PCIE0_RD_LP	354
    PCIE0_WR 	355
    PCIE0_WR_LP	355
    PCIE1_RD_HP 	356
    PCIE1_WR_HP 	357
    PCIE1_RD	358
    PCIE1_RD_LP 	358
    PCIE1_WR	359
    PCIE1_WR_LP 	359
    PCIE2_RD_HP	360
    PCIE2_WR_HP	361
    PCIE2_RD_LP	362
    PCIE2_RD	362
    PCIE2_WR_LP	363
    PCIE2_WR	363
    PCIE3_RD_HP	364
    PCIE3_WR_HP	365
    PCIE3_RD_LP 	366
    PCIE3_RD 	366
    PCIE3_WR_LP 	367
    PCIE3_WR 	367
    R5FSS0_CORE0_PER1_RD	522
    R5FSS0_CORE0_PER1_WR	523
    R5FSS0_CORE1_PER1_RD	530
    R5FSS0_CORE1_PER1_WR	531
    R5FSS1_CORE0_PER1_RD	538
    R5FSS1_CORE0_PER1_WR	539
    R5FSS1_CORE1_PER1_RD	546
    R5FSS1_CORE1_PER1_WR	547
    R5FSS2_CORE0_PER1_RD	554
    R5FSS2_CORE0_PER1_WR	555
    R5FSS2_CORE1_PER1_RD	556
    R5FSS2_CORE1_PER1_WR	557
    PDMA_SPI_G00_MEMW0	608
    PDMA_SPI_G00_MEMR0	609
    PDMA_SPI_G10_MEMW0	612
    PDMA_SPI_G10_MEMR0	613
    PDMA_UART_G00_MEMW0	616
    PDMA_UART_G00_MEMR0	617
    PDMA_UART_G10_MEMW0	618
    PDMA_UART_G10_MEMR0	619
    PDMA_UART_G20_MEMW0	620
    PDMA_UART_G20_MEMR0	621
    PDMA_MCAN_MEMW0 622
    PDMA_MCAN_MEMR0	623
    PDMA_DEBUG_CCSOC0_MEMR0	624
    PDMA_MCASP0_MEMW0	624
    PDMA_MCASP0_MEMR0	625
    PDMA_DEBUG_CCSOC1_MEMR0	626
    VUSR0	640
    VUSR1	641
    VPAC0_LDC0	2560
    VPAC0_DATA_MST0a	2564
    VPAC0_DATA_MST0b	2565
    VPAC0_DATA_MST1a	2566
    VPAC0_DATA_MST1b	2567
    DMPAC0_DATAa	2568
    DMPAC0_DATAb	2569
    VPAC1_LDC0 	2570
    VPAC1_DATA_MST0a	2572
    VPAC1_DATA_MST0b	2573
    VPAC1_DATA_MST1a 	2574
    VPAC1_DATA_MST1b	2575
    ENCODER0_RD	2576
    ENCODER0_WR	2577
    WAVE521CL0_P1_RD	2578
    WAVE521CL 0_P1_WR	2579
    WAVE521CL1_P0_RD	2580
    WAVE521CL1_P0_WR	2581
    WAVE521CL1_P1_RD	2582
    WAVE521CL 1_P1_WR	2583
    DSS0_DMA	2592
    DSS0_FBDC	2593
    GPU0_M1_RD	2600
    GPU0_M0_RD	2601
    GPU0_M0_WR	2602
    GPU0_M1_WR	2603
    GPU0_XPUa	2604
    GPU0_XPUb	2605
    R5FSS0_CORE0_MEM_RD	2688
    R5FSS0_CORE0_MEM_WR	2689
    R5FSS0_CORE1_MEM_RD	2690
    R5FSS0_CORE1_MEM_WR	2691
    R5FSS1_CORE0_MEM_RD	2692
    R5FSS1_CORE0_MEM_WR	2693
    R5FSS1_CORE1_MEM_RD	2694
    R5FSS1_CORE1_MEM_WR	2695
    R5FSS2_CORE0_MEM_RD	2696
    R5FSS2_CORE0_MEM_WR	2697
    R5FSS2_CORE1_MEM_RD	2698
    R5FSS2_CORE1_MEM_WR	2699
    MCU_SA3_UL	3713
    DMSS_HSM_PKTDMA	4062
    MCU_PDMA_MISC_G00_MEMW0	4063
    MCU_PDMA_MISC_G00_MEMR0	4064
    MCU_PDMA_MISC_G10_MEMW0	4065
    MCU_PDMA_MISC_G10_MEMR0	4066
    MCU_PDMA_MISC_G20_MEMW0	4067
    MCU_PDMA_MISC_G20_MEMR0	4068
    MCU_PDMA_ADC0_MEMR0	4069
    MCU_R5FSS0_CORE1_MEM_WR	4072
    MCU_R5FSS0_CORE1_MEM_RD	4073
    MCU_R5FSS0_CORE0_MEM_WR	4076
    MCU_R5FSS0_CORE0_MEM_RD	4077
    MCU_R5FSS0_CORE0_PER0	4078
    MCU_R5FSS0_CORE1_PER0	4079
    SMS Base ROUTEID 	4080
    NAVSS MAIN	0-255,2560-3071
    NAVSS MCU	3584-3711
    SPARE_MST_RSVD 	368-375
    

    Regards,
    Richard W.
  • Hi Richard W

    Yes, we are trying to extend CToolsLib to support TDA4VH.
    1. We use the bin2tdf tool to generate the .tdf file, and the command is as shown below. But we are a little confused about the `-app` option. The parameter C:\Users\Ding\Desktop\cpt2_trace_ddr_throughput_example.out followed by the command `-app` option in the picture is an empty file, but the command is still executed successfully. This will affect Parsing of .tdf files? And what are the correct parameters for this `-app` option?

    2. The probes information you provided above is not involved in the AETT_property_ks3_system_trace_j7ahp.xml file. Can you also explain the maser ID corresponding to these probes?
    Thanks
    QuanLi.
  • 3. We use CCS to import tdf, but the TDF browsing window is blank.

  • Hello QuanLi,

    -1-

    The getting started document in the J721E ctools provides the command lines needed for bin2tdf and td commands.  They are not matching what you are doing above.  The -app option is not used for system trace.  As you guess, it makes no sense as there is no elf object information needed to decode system trace, that is only needed for processor trace.  I would suggest following the examples in ctools the lib sources.

    - bin2tdf.exe -bin "c:\temp\CPT2_ddr_throu.bin" -rcvr ETB -output "c:\temp\CPT2_ddr_throu.tdf" -procid stm -devicekey 0x0bb6402f -dcmfile "c:\temp\CPT2_ddr_throu.dcm"

    td.exe -bin c:\temp\CPT2_ddr_throu.tdf -rcvr ETB -output c:\temp\CPT2_ddr_throu.csv -procid stm -devicekey 0x0bb6402f –timestamp abs

    The device key in the example is for J7ES and not for TDA4VH. Since the underlying CPT2 message format is the same hopefully you can just use the above as is.
    -2-
    The aggregator uses the STP protocol to wrap message data (similar flow to how STM messages are handled).  The IP needs to be programmed with a MSTID to be emitted as a way to tell a decoder how to sort out if multiple aggregators are active at once.  At least for LB its necessary to specify which MSTIDs to look for in the stream so it can decode and attribute the data properly.   CCS does not expose that and hides that detail from the user.
    Regards,
    Richard W.
  • Hi Richard W

    Ok, use the trace decoding command you provided to convert the .csv file. This is the same as what we see in CCS: go to "Tools" menu and select "Hardware Trace Analyzer->Open File->.tdf".

    1. On TDA4VH, the TBR buffer is 64KB. When collecting data, this space is quickly used up, causing new data to overwrite old data. Is there any documentation on trace data, for example, how long is a piece of data and what is its format? In this way, we can roughly analyze the correctness of the data.

    2. We just want to know the Master IDs of CPTrace2 probes, because it seems that the CPTrace2 probes configuration seems to require the master id value, such as the MSMC_0 probes mentioned in the AETT_property_ks3_system_trace_j7ahp.xml file:

    The Master IDs of some CPTrace2 probes you mentioned above cannot be found in the file.

    3. What is the clock/tick of CPTrace2 probes? This involves the calculation of the sampling period.

    4. 0x0bb6402f is the devicekey for TDA4VM, which is not fully applicable to TDA4VH. When testing the CPTracer2 probes that both TDA4VM and TDA4VH have, using this devicekey, the trace data can be parsed, but when using TDA4VH’s proprietary CPTracer2 probes, the parsing format does not seem to be correct. . Or the current CCS does not fully support TDA4VH, and we are using version 12.5.0.

    Thanks
    QuanLi.
  • Hello QuanLi,

    A CPT-throughput message will have this format.  I believe its wrapped in the STPv2 protocol which is outlined in MIPI specs.

    The message provide the total bytes during a sample interval.  The default without changing registers is 16mS period for the 1GHz MSMC bus clock.

      

    At the tool level data start and stop events can be software or hardware controlled.  One method is to software start and stop on full.  Another is to force stop via software.  Another method is to setup a hardware CTI trigger to start/stop.   All these things have some tool support but I think not much less ability in the library.
    You mention your hand decode matched what the ccs tool gave.  What does that look like?  As I mentioned before at the start the library is not fully supported past first processors but tools are.  A new CCS specific E2E can be opened maybe to track questions there.
    Regards,
    Richard W.
  • Hi Richard W

    The format we are talking about is incorrect, it is the format converted by the `td` command. The following figure are obtained using the following commands:

    PS > C:\ti\ccs1250\ccs\ccs_base\emulation\analysis\bin\bin2tdf.exe -bin memcpy_nocache_ddr_throughput_example.bin -rcvr ETB -output memcpy_nocache_ddr_throughput_example.tdf -procid stm -devicekey 0x0bb6402f -dcmfile memcpy_nocache_ddr_throughput_example.dcm

    PS > C:\ti\ccs1250\ccs\ccs_base\emulation\analysis\bin\td.exe -bin memcpy_nocache_ddr_throughput_example.tdf -rcvr ETB -output memcpy_nocache_ddr_throughput_example.csv -procid stm -devicekey 0x0bb6402f -timestamp abs

    DDR_EMIF0 Throughput:

    However , DDR_EMIF1 Throughput:

    Obviously, the format of the DDR EMIF0 interface is correct, while the format of DDR EMIF1 is wrong.

    We are not very familiar with the MIPI STPv2 protocol. Do you have any source code examples that support parsing this format?

    Thanks
    QuanLi.
  • Hello QuanLi,

    Thanks for providing the output you see.  It does appear like the raw numbers might be OK but the name substitution is not working.  I will look to submit an issue report to the CCS owner.

    I have not looked into STMv2 protocol decode examples to give a concrete pointer.  I have hand and (T32 tool assisted) decoded some sequences in the past as part of looking into low level issues, but I didn't work with the actual tool code.  ARM does have an opencsd project which I believe should have a free decode example.

    I made a quick check at data received on my TDA4VH board on different channels and I do see the HW is presenting the data fine.  The issue seems to be with the CCS decoder here.  The TDA4VM only has 1 channel, so perhpas that porting needs a tweak.

    I made a recording using the TDA4VH setup at my desk:  /cfs-file/__key/communityserver-discussions-components-files/791/tda4vh_5F00_cpt_5F00_emif1_5F00_2_5F00_2023_2D00_10_2D00_30_5F00_19h03_5F00_39.mp4

    Regards,
    Richard W.
  • Hi Richard W

    Yes, the data should be correct, but the output format is wrong.

    Have you modified the CCS decoder to support TDA4VH, and may you provide bin2tdf and td tools for ARM64? We may want to parse the data directly on the board.

    When we verified CPTrace2, we also found this phenomenon, which may also be a BUG.

    On TDA4VH, the four DDR controllers are configured with an interleaving granularity size of 128 bytes by default.  If 1KB bytes are copied, each of the four DDR EMIF interfaces should be 512 bytes (READ + WRITE). The following figure shows the memory transaction with 1KB bytes copied through the DDR
    EMIF0 interface:

    This result is consistent with the theoretical analysis. Now let's copy only 640 bytes, so the DDR EMIF0 interface should still be 512 bytes. The following figure shows the memory transaction with 640 (0x400 - 128 * 3) bytes copied through the DDR EMIF0 interface:

    From above figure, we can see that the transmitted bytes are 544 (512 + 32) bytes, and the extra 32 bytes in the bandwidth statistics are due to two more transmissions: (Read: 0x8020000C0, Write: 0x8020001C0).

    Thanks
    QuanLi.
  • Hello QuanLi,

    I checked with an engineer working on the CCS DPK for TDA4VH and found there is an update pending on some automated test results.  I can see the EMIF1 has been populated in the properties file and they in theory should result in your EMIF1 data report printing when used (assuming no other issues).  I notice EMIF2/3 are commented out and I've asked about that.  I was informed CCS has some tracking-association limits which might explain this.  I'll attach the updated candidate files, you can save what you are using and try these, and also experiment with uncommenting the others.

    /cfs-file/__key/communityserver-discussions-components-files/791/dpk.7z

    Regarding an AARCH64 binary, that is a nice idea. I asked the tools team about this and they said there currently is no plans to do this.  The tool does support windows/linux for x86 but not yet ARM.

    It looks like you have used the cptracer 'transaction' report to get a lot of accesses to EMIF0.  Its notable that the mechanism for capturing transaction information is different than what is used for bandwidth counting.  You should run this same experiment with a cptracer 'throughput' report and see if the measured value is as you expect.  The transaction report capture has a limited tracking capacity, you might have slots to capture 15 transactions, and the shifting of that data from its capture FIFOs over STM to the trace buffer can take time as there is a lot of data captured per transaction. This can result in some holes in unfiltered transactions flows. In your experimental result you show a double read and write to C0 and 1C0 for the 640 byte size.  Does this happen every time?  If its sparse the maybe something like transaction interruption happened around a DDR auto-refresh.  If it happens every time it might be an artifact of hitting the transaction FIFO max on path.
    The actual data throughput engine counts bytes as they stream by so it doesn't have the FIFO'ing limitations like transaction capture will have.  Its messages are also much shorter in size so don't take long to stream.  For a bare metal 'non-cached' test I suspect the throughput engine will probably give the right answer for simple code.  In the scenarios I've measured using LB it did add up.
    While correlating as you are doing is a smart thing to do, you must be a bit careful in extrapolating precise bare-metal non-cached test streams to full up HLOS with cached use cases.   The A72 aggressively speculates on code and data and it can generate a lot of non-intuitive (usually more then you expect) traffic.  When that gets mixed with multi-level caching (with eviction traffic and random replacement) in different line sizes (64 bytes at ARM and 128 bytes at MSMC) along with competing multi-core traffic and multi-threaded async code, data from HLOS, a to precise counting will not work. The measurement is still very useful but it becomes more a statistic instead of an absolute.
     
    Regards,
    Richard W.
  • Hi, Richard W.

    1. Thank you for your reply. We basically confirm that the ctoolslib_J721E_DRA829_TDA4VM_v0.2 library can support TDA4VH after being extended. Currently we have temporarily created an STM devicekey to support TDA4VH, such as `0x0bb7503f`.

      

    The `j7ahp-in-development` directory contains .jsonc files under development that support TDA4VH. Then we can use the `bin2tdf` and `td.exe` tools to decode trace data.  This is working fine. 

    There may be CCS parsing tools left in the future that may need your support.

    2. Regarding the extra 32 bytes, we actually discovered this phenomenon through bandwidth statistics. In order to analyze this reason, we captured the transaction logs. I will provide more detailed information below, which may be helpful to you. 

    The following table shows the memory bandwidth with (0x300000 - 128 * 3) bytes copied:

    The following table shows the memory bandwidth with (0x300000 - 128 * 2) bytes copied:

    The following table shows the memory bandwidth with (0x300000 - 128 ) bytes copied:

    The following table shows the memory bandwidth with (0x300000) bytes copied:

    This happens every time.

    3. Yes, the statistics about cache are relatively complicated, and it is difficult to theoretically analyze the exact value.


    Thanks

    QuanLI.

  • Hello QuanLi,

    It is very positive that you were able to successfully extend and use the cptracer2 feature in ctools lib on TDA4VH. I hope you will be able to leverage this in your development. I will look into recreating your finding of an extra data read and share it with a designer who worked with this IP block. Its my impression the issue likely will not stop productive use of the engine however it is something which should be understood.  Thanks. 

    Regards,
    Richard W.