Tool/software:
How to use vxlib for my c7x dsp? I want to dilate an image, however the includes in the source code (vxlib.h) checks c66 and it returns invalid target. Is there any way to use vxlib with c7x dsp?
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.
Tool/software:
How to use vxlib for my c7x dsp? I want to dilate an image, however the includes in the source code (vxlib.h) checks c66 and it returns invalid target. Is there any way to use vxlib with c7x dsp?
Hi Teknik,
Are you needing to use a particular SDK version? Would you be needing OpenVX integration?
Best,
Asha
Processor SDK RTOS j784s4 09_01_00
Should I use tiovx source codes for dilation? Or like using dsplib can I use vxlib directly on dsp c7x?
Actually, I can summarize the problem. I am new with these stuff and trying to find a way that lets say dilate an image cpp code run on c7x using some libraries. Could you guide me?
Thanks
Hi Teknik,
Yes, thank you for the clarifications regarding what stage you are in your project. Let me clarify some of the options below -
Option 1 - If you are looking for functionality that is similar to DSPLIB in the sense that you are simply looking for a standalone library (baremetal library that does not built in integration to the rest of the SDK) that is accelerated for C7x for VXLIB, then this functionality is within SDKs starting from 9.2 SDK and onward. If this is what you are looking for this functionality, then for the 9.2 SDK you should look at the vxlib_09_02_00_04 folder and for the 10.0 SDK (preferably, this is our newest code) this is vxlib_10_00_00_02. Both will have a VXLIB_dilate function which is what you are looking for.
Option 2 - Otherwise if you are looking to run within the TIOVX environment, then the vxlib (note the no numbers) will have to be used. There should be a library within that which is compiled for C7x. The difference here, other than the TIOVX integration, is that this library is C66x code that has then compiled for the C7x core - meaning you won't achieve full performance on the C7x core with using this version, but you should get the correct functionality.
Or like using dsplib can I use vxlib directly on dsp c7x?
So maybe to answer your question directly, what I have given in option 1 would be what you are looking for I'd imagine.
Best,
Asha
Hi Asha,
Thank you very much for your responses, they are very helpful.
Let me check whether my understanding is correct. For option 1, I can get maximum performance for c7x dsp cores with vxlib (newer versions), right?. I have checked the mentioned sdk and seen some example codes for such purposes. I could not try them yet, but that was exactly what I asked for.
For option 2, you are talking about the sdk version that I have, right? I am not familiar with tiovx environment, and as I see there is no example codes provided. Can you suggest any guide or tutorial for me to write my code? And how different this option from the other one in terms of coding, one includes vxlib, other tiovx files?
Thanks
Hi Teknik,
Let me check whether my understanding is correct. For option 1, I can get maximum performance for c7x dsp cores with vxlib (newer versions), right?. I have checked the mentioned sdk and seen some example codes for such purposes. I could not try them yet, but that was exactly what I asked for.
Yes, and yes I believe this is what you are looking for.
For option 2, you are talking about the sdk version that I have, right? I am not familiar with tiovx environment, and as I see there is no example codes provided. Can you suggest any guide or tutorial for me to write my code? And how different this option from the other one in terms of coding, one includes vxlib, other tiovx files?
Essentially, this would be something that is similar to what is demonstrated in this vision_apps demo here
Best,
Asha
Hi again Asha,
Let's continue with the option 1. Should I change all components in sdk to be able to use vxlib_10_00_00_02, or just adding vxlib_10_00_00_02 folder into sdk is ok?
Thanks
HI Teknik,
Overall, we recommend using components from the same SDK as this is how we test our software. In this case, vxlib_10_00_00_02 is a standalone component, however it does depend on 4.1.0 LTS C7x compiler, while I believe 3.1.0 LTS is the compiler that is given with the 9.1 SDK.
Essentially, if you are able to move SDK versions, that is always useful as you will be gaining the most recent software with updated fixes.
Best,
Asha
Hi,
vxlib_09_02_00_04 has dilate kernel. What about erosion? I could not see it. How possibly it is not included?
In the beginning of this issue, option 1 seems to be ok for me. However, I also need erosion. There is a solution that comes my mind, Is there any other than provided below?
Lets say I am using vxlib_09_02_00_04 for dilation. And, I am going to use vxlib for erosion purposes. However, there are lots of file in the sdk source. Such as, VXLIB_dilate_3x3_i8u_o8u.h, VXLIB_dilate_3x3_i8u_o8u_cn.c, VXLIB_dilate_3x3_i8u_o8u_idat.c ...
what is _cn for, or idat for? which one I should use? Or there is a c66 folder, it is a bit confusing. Can you guide me, or is there any tutorial or example code?
Best,
Hi Teknik,
It seems you have posted this question in a few different places - in the future please respond to the original question and do not create duplicates so we can support you better.
vxlib_09_02_00_04 has dilate kernel. What about erosion? I could not see it. How possibly it is not included?
Nikhil has addressed this in your other thread, see his answer for reference: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1420576/processor-sdk-j784s4-tiovx
Lets say I am using vxlib_09_02_00_04 for dilation. And, I am going to use vxlib for erosion purposes. However, there are lots of file in the sdk source. Such as, VXLIB_dilate_3x3_i8u_o8u.h, VXLIB_dilate_3x3_i8u_o8u_cn.c, VXLIB_dilate_3x3_i8u_o8u_idat.c ...
what is _cn for, or idat for? which one I should use? Or there is a c66 folder, it is a bit confusing. Can you guide me, or is there any tutorial or example
Some of this information is covered in the User Guide. I would recommend going through the docs/ folder for the complete information but the below is a screenshot:
Please link to the vxlib_C7120.lib in the lib/ folder. This will be the library that is C66x code crosscompiled for C7x (hence the c66/ folder in the specific kernel directories). This c66/ folder has the actual implementation of the function.
_cn files will refer to Natural "C" code that is a standard C implementation and does not use specialized intrinsics from the compiler.
idat is referring to the test cases that are provided.
The _d file will have the test driver which is also an example of what functions to use to utilize that kernel.
Best,
Asha
here is a part of my problem:
I include
#include <ti/vxlib/src/vx/VXLIB_erode_3x3_i8u_o8u/c66/VXLIB_erode_3x3_i8u_o8u.h>
Build fails with #10234-D unresolved symbols remain
unresolved symbol VXLIB_erode_3x3_i8u_o8u(const, first referenced in unsigned)
Btw, I added the vxlib_C7120.lib in project properties.
Or should I include "ti/vxlib/src/vx/VXLIB_erode_3x3_i8u_o8u/VXLIB_erode_3x3_i8u_o8u.h" with _TMS320C6600 defined. Otherwise, it says invalid target. What does _TMS320C6600 mean and Should it be defined?
Hi Teknik,
Could you look at the system integration documentation and confirm you've followed all steps there?
Best,
Asha