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.

Integrating AER as an add-on library into universal_copy example to use IUNIVERSAL interface

Other Parts Discussed in Thread: DM3730

Hi all,

I'm integrating AEC/AER into codec engine. The platform is DM3730, and DVSDK version is 4.01.00.09.

AER algorithm is NOT XDAIS-compliant. I want to archive all objects and the existing libs into a aerlib.l64P file using ar6x. And then link aerlib.l64P into universal_copy example as an add-on library by modifying C64P.lnkOpts in config.bld. So I think I can call aer interface in universal_copy.c now.

Now I have two questions here:
1. Is it feasible to integrate AER as an add-on library into codec engine to use IUNIVERSAL interface
2. How to add SECTIONS to fix the following link error? The attached file is the AER link cmd, how can I integrate it into dvsdk compilation environment?

4341.aertest_c64Ple.cmd.txt


=======================================================
# lnk64P bin/ti_platforms_evm3530/all.x64P ...
rm -f package/cfg//bin/ti_platforms_evm3530/all.x64P.map
/home/zijing/jeff/ti_dvsdk_dm3730/cgt6x_6_1_14/bin/lnk6x -w -q -u _c_int00 -l link.cmd -q -o bin/ti_platforms_evm3530/all.x64P package/cfg/bin/ti_platforms_evm3530/all_x64Pcfg_c.o64P package/cfg/bin/ti_platforms_evm3530/all/main.o64P package/cfg/bin/ti_platforms_evm3530/all_x64Pcfg.o64P package/cfg/bin/ti_platforms_evm3530/all_x64P.o64P package/cfg/bin/ti_platforms_evm3530/all_x64P.xdl -c -m package/cfg//bin/ti_platforms_evm3530/all.x64P.map -l /home/zijing/jeff/ti_dvsdk_dm3730/cgt6x_6_1_14/lib/rts64plus.lib -l /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P
warning: creating output section ".drc_scratch_buf" without a SECTIONS
specification

undefined first referenced
symbol in file
--------- ----------------
_aepAddEcho /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepControl /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepFilterTemp_16K /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepFilterTemp_16K_new /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepFilterTemp_8K /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepFilterTemp_8K_new /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepOpen /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aepbuffer /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aepsim.o64P>
_aerActivate /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<siu_multi_mic.o64P>
_aerClose /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<siuaer.o64P>
_aerControl /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<aersim_setup.o64P>
_aerCreate /home/zijing/jeff/ti_dvsdk_dm3730/aer_16_0_0_1/lib/aerlib.l64P<siuaer.o64P>

error: unresolved symbols remain
error: errors encountered during linking; "bin/ti_platforms_evm3530/all.x64P"
not built
gmake[1]: *** [bin/ti_platforms_evm3530/all.x64P] Error 1
gmake: *** [/home/zijing/jeff/ti_dvsdk_dm3730/codec-engine_2_26_01_09/examples/ti/sdo/ce/examples/servers/all_codecs,.executables] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/zijing/jeff/ti_dvsdk_dm3730/codec-engine_2_26_01_09/examples/ti/sdo/ce/examples/servers/all_codecs'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/zijing/jeff/ti_dvsdk_dm3730/codec-engine_2_26_01_09/examples/ti/sdo/ce/examples/servers'
make: *** [ceexamples_servers] Error 2

Thanks,
Jeff

  • Hello Jeff,

    Q1. Is it feasible to integrate AER as an add-on library into codec engine to use IUNIVERSAL interface?

    Yes, it is possible to integrate AER modules (AER, DRC, AGC) as an add-on library for Codec Engine. I'm just not sure if IUNIVERSAL interface would be the best way to go. The approach you should take is to create XDAIS-compliant component which integrates together AER modules that you need and within the signal flow diagram of your choice. For example, you may choose to have AGC -> AER in Send direction and DRC->AER in Receive direction, like it was done in the example code (aersim.c). You may also choose to have DRC in send direction as well (two independent instances). Or, you may choose not to use DRC at all for some simple applications.

    Your XDAIS-compliant component can subsequently be integrated within the Codec Engine. I am not expert on Codec Engine and cannot help you with that part, but I know it was done in the past. The reason I am not sure about IUNIVERSAL interface is that you may want to have your analog front end and AER component to be "closely coupled" (in case they both reside within the DSP, which is preferred). By using Codec Engine as is, you may run into problems since you may not be able to route signals to/from the Analog Front End directly to your newly created XDAIS compliant component that has AER within it. This could introduce more end-to-end delay that in some applications may not be acceptable. If IUNIVERSAL interface allows you to do some sort of "tunneling" within the DSP so you do not have to go up/down to ARM as you go between the analog front and AER, you should be OK. If not, you may need to "extend" Codec Engine with a type of interface that would not require all signals to go through ARM, but could be routed within the DSP to achieve low delay implementations. Also, if IUNVERSAL interface allows you to implement both Analog Front End along with the AER modules within a single XDAIS compliant component, you may be OK as well. It is just that in such a case the analog front end would not be independent from the AER.

    Codec Engine was designed with Video/Voice Codecs in mind. Hence the name: "Codec" Engine. Without tunneling, implementing signal processing chains becomes very inefficient very quickly.

    Q2. How to add SECTIONS to fix the following link error? The attached file is the AER link cmd, how can I integrate it into dvsdk compilation environment?

    It seems that you are trying to "integrate" complete AER simulation application within the DVSDK environment. That probably cannot and should not be done. :) The AER simulation application is standalone and the makefile is provided with it. You just need to run that makefile if you want to recreate the executable. Once you get the executable which I believe is also provided within the AER package, all you need to do is load it to your target with the CCS application. The simulation application (aersim.c) is standalone and does not require anything else. It does not use any OS and it runs on a DSP. So, you need to load it to the DSP. Some other people on the forum may help you figure out how to do that in case you have problems.

    So, the first step for you would be to try running aersim.out and getting familiar with how AER modules operate.

    Once you are done with that, you may go for integration into your XDAIS component or directly into your target application. When you do that, you should only use the required AER modules and you should not integrate additional code used in the simulation application. For example, the AEP module is used only in simulation to provide acoustic echo so you can see how AER would deal with it. You should not use any of the "simulation" code and "simulation" modules in your application. You should only use the AER modules at that point.

    Once you start writing your application or XDAIS component, you may add your source code and include any header files for AER library as needed. At that point you should not expect to have any problems with the compilation environment. You would also need to provide your own linker command file that would provide necessary memory map for your target application. In the process you would need to properly allocate buffers for the instances of AER that you would want to create. As you can see from the aersim.c, the AER component, like XDAIS components, is not doing the memory management. You need to provide buffers and memory management within your application.

    In summary, the first step would be to run aersim.out using CCS on target or using C64x+ simulator. That would help you learn more about how AER and associated modules work and how to configure them. The second step is to create your own application/component that integrates the AER modules, making sure you do not attempt to use any of the code that was just supporting the simulation. You should include only the header files that you actually require in your code.

    Regards,
    Bogdan

  • Thank you, Bogdan. I have integrated it via C6Accel. I works well for now.