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.

CCS/AWR1843BOOST: DPC of DSP

Part Number: AWR1843BOOST
Other Parts Discussed in Thread: AWR1642, AWR1843

Tool/software: Code Composer Studio

Hello,TI's engineer:

I meet some problem when i use AWR1843BOOST.We use 3.4.0.3 SDK to develop the AWR1843BOOST.The demo offer two ways dpc.One is HWA, Two is dsp only.By default, demo compilation and links use HWA.Now we want to use dsp not the hwa,How can we achieve it? Which files do we need to modify?

At the same time, we also want to port the corresponding DPC(only dsp) project to the CCS project, how to achieve it? Is there any relevant documentation

Thanks a lot!

Bryant.

  • Hello Bryant,

    you can follow AWR1642 mmw demo, where it uses only DSP

    dss_main.c : MmwDemo_dssInitTask(), change the init params to below settings to skip from HWA.

    objDetInitParams.L3ramCfg.addr = (void *)&gMmwL3[0];
    objDetInitParams.L3ramCfg.size = sizeof(gMmwL3);
    objDetInitParams.CoreL2RamCfg.addr = &gDPC_ObjDetL2Heap[0];
    objDetInitParams.CoreL2RamCfg.size = sizeof(gDPC_ObjDetL2Heap);
    objDetInitParams.CoreL1RamCfg.addr = &gDPC_ObjDetL1Heap[0];
    objDetInitParams.CoreL1RamCfg.size = sizeof(gDPC_ObjDetL1Heap);

    Regards,

    JG

  • Hello JG,

    I want to know what is the difference between the only DSP and HWA version?What are the pros and cons of these two approaches?Which approach is faster and more suitable for engineering development?

    Thanks a lot!

    Bryant

  • Hi Bryant,

    From the HWA user guide:

    "

    The Radar Hardware Accelerator (HWA) is a hardware IP that enables off-loading the burden of certain frequently used computations in FMCW radar signal processing from the main processor. It is well known that FMCW radar signal processing involves the use of FFT and log-magnitude computations to obtain a radar image across the range, velocity, and angle dimensions. Some of the frequently used functions in FMCW radar signal processing can be done within the Radar Hardware Accelerator, while still retaining the flexibility of implementing other proprietary algorithms in the main processor.

    "

    This is the primary advantage of using the HWA.  It frees up the DSP for other computations.

    In DSP only DPC, the HWA is not utilized for FFT and log magnitude computations used in the DPUs. This has to necessarily be the case for AWR1642, which doesn't have a HWA.

    Let me get back to you with more details on your questions after the weekend.

    Regards,

    Aayush

  • Hello,JG:

    Why use the HWA,the memory only have two parts:L3ramObj and CoreLocalRamObj;Howere use the DSP have three parts:L3ramObj and gDPC_ObjDetL2Heap and gDPC_ObjDetL1Heap.Why HWA one less than DSP?What's the point of this?

    And could you offer me some datasheet about dataflow  and memory allocation with HWA.

    I am waiting for your message about more details on my questions  this weekend.

    Regards,

    Bryant

  • Hi Bryant,

    Let me answer your questions one by one.

    Firstly, here are the list of changes you would need to make to the demo for it to run DSP based DPC on xwr18xx (please refer to the xwr16xx demo as needed):

    1. In all demo source files, change  #include <ti/datapath/dpc/objectdetection/objdethwa/objectdetection.h> header to #include <ti/datapath/dpc/objectdetection/objdetdsp/objectdetection.h>

    2. In dss_main.c, in addition to what Jitendra mentioned in the previous reply, you also need to add an appropriate  gDPC_ObjDetL1Heap global variable (refer to xwr16xx demo for this).
    3. In mmw_dss_linked.cmd, add  .dpc_l1Heap  : { } > L1DSRAM
    4. In mmw_dss.mak:
    4.1. in vpath, change datapath/dpc/objectdetection/objdethwa/src to datapath/dpc/objectdetection/objdetdsp/src
    4.2. Add -ldsplib.ae64P \ to DSS_MMW_DEMO_STD_LIBS
    4.3. change llibrangeproc_hwa_..., llibdopplerproc_hwa_..., llibcfarcaproc_hwa_... to ..._dsp_... in DSS_MMW_DEMO_STD_LIBS
    4.4. Add -llibaoaproc_dsp_$(MMWAVE_SDK_DEVICE_TYPE).$(C674_LIB_EXT) \ to DSS_MMW_DEMO_STD_LIBS
    4.5. Remove the if else statement present in lines 32-36
    4.6. Add -i$(C64Px_DSPLIB_INSTALL_PATH)/packages/ti/dsplib/lib \ and -i$(MMWAVE_SDK_INSTALL_PATH)/ti/datapath/dpc/dpu/aoaproc/lib \ to DSS_MMW_DEMO_LOC_LIBS.
    4.7. Remove if else statement present in lines 54-58
    5. In DSP DPC, staticCfg->rangeFFTtuning and memUsage->CoreLocalRamTotal are not present. Simply delete references to them in mss_main.c (in SDK 3.5.0.4 lines 1897-1914 and 2212-2215)
    6. Replace entire mmw_res.h file with the one provided with xwr16xx demo.
    I was able to run DSP DPC based demo on AWR1843 device with these steps.

    As for your other questions,

    DSP vs HWA based DPC approach pros/cons:

    After speaking with the wider team, the opinion is that HWA based approach saves DSP cycles and power for the same computation. However, if DSP MIPS is sufficient for your algorithms, DSP only approach might have a faster development cycle.


    Why HWA based DPC asks for CoreLocalRamObj only instead of CoreL2RamCfg and CoreL1RamCfg:
    The CoreLocalRamObj for HWA DPC is the L2 DSP RAM of the device in case of the demo. The HWA DPC doesn't use the L1 RAM at all, and hence doesn't ask for it from the programmer. The L1 RAM is used in DSP based DPC to allocate fast scratch buffers for use in calculations in DPUs. These calculations are not done in the DSP in HWA based DPC, hence no need for L1 memory (HWA operates on its own internal memory banks). See the resources I mention below for more details.


    Resources for understanding data flow and memory allocation with HWA/DPC:
    • To understand how the HWA works and utilizes memory, refer to the HWA user guide.
    • To understand how data flows in DPC and DPUs, I'd recommend looking at the doxygen documentation present in the docs/ folder in each of the SDK components.
    • To see details on memory allocation in the DPC, you can refer to the "Data Memory" section of their respective doxygen documentations. This details what the different memories are used for.
    • If needed, you can have a look at the EDMA user guide as well. EDMA is used extensively in DPUs, especially HWA based DPUs.


    Let me know if you have any other questions,
    Regards,
    Aayush
  • Hello, Aayush

     Thank you very much for your answer,I have configured the DSP DPC according to your steps.and compile and link success.

    Then i take the xwr18xx_mmw_demo.bin burn-in the awr1843boost,open the mmWave_Demo_Visualizer see the result of DSP DPC version,It does have the right target results at the beginning,but then mistakes followed,see as follow picture:

    Then i see the debug on CCS,when run mss is normal,when load bss and run meet error,see as follow:

    I adjust the stack size in dss_main,the error still happens.What's wrong with it?

    Thanks

    Bryant

  • Hi Bryant,

    I've run the demo visualizer for around 10 minutes and am not seeing any errors. Perhaps it has something to do with runtime calibrations. Could you use the "save config to PC" option in the demo visualizer and share the config file you are using so I can recreate the error? Can you also tell me how long after the errors start to appear?

    Regards,

    Aayush

  • Hello, Aayush

    The error occurred less than a second after startup.profile_2020_11_04T09_14_47_452.cfg

    Thanks

    Bryant

  • Hi Bryant,

    I could not recreate the error with your config file. I'm attaching my source code (based on SDK 3.5.0.4) and binary for DSP only DPC based AWR1843 mmwave demo. Perhaps you could use the binary and let me know if you still encounter the error.

    xwr18xx.zip

    Regards,

    Aayush

  • Hello, Aayush

    you offer the file of mmw_res.h,where can i get it?I found the awr1642 demo,but do not find this file.Can you give me some help.

    Thanks.

    Bryant

  • Hi Bryant,

    You can find this in <SDK_INSTALL_LOC>/packages/ti/demo/xwr16xx/mmw/mmw_res.h

    Regards,

    Aayush

  • Hello Aayush,

    Thank you very much for your patience and help me solve the problem!

    Regards,

    Bryant