The libraries distributed here
http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c67_fastmath/latest/index_FDS.html
in c67xmathlib_2_01_00_00/lib
do not include entry points for _exp and _log10.
The included documentation c67xfastRTS_user_guide.pdf states that exp and log10 are included. Previous versions of the library included them.
This question may find more knowledgeable people in the BIOS Forum instead of the C67x Single Core Forum. A Moderator will move it there for you.
Regards,RandyP
Search for answers, Ask a question, click Verify when complete, Help others, Learn more.
Examining the distributed c67xfastMath.lib shows no global entry point for _log10 or
servo-lnx:/tmp/c67xmathlib_2_01_00_00/lib% nm6x -g -f -l c67xfastMath.libARCHIVE: c67xfastMath.libfile [index] value sclass section name symbol nameatan2dp.obj |[14] |0x00000000|C_EXT |.data |Vatn2dpatan2dp.obj |[11] |0x00000204|C_EXT |.text |_atan2atan2dp.obj |[13] |0x00000204|C_EXT |.text |_atan2dpatan2dp.obj |[12] |0x00000000|C_EXT |.text |_atandpatan2dp.obj |[15] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdpatan2dp.obj |[17] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnoatan2dp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_recipdpatan2dp_v.obj |[17] |0x00000000|C_EXT |.text |_atan2dp_vatan2sp.obj |[11] |0x00000000|C_EXT |.text |_atan2fatan2sp.obj |[12] |0x00000000|C_EXT |.text |_atan2spatan2sp.obj |[13] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnoatan2sp_v.obj |[13] |0x00000000|C_EXT |.text |_atan2sp_vatandp.obj |[15] |0x00000000|C_EXT |.data |Vatndpatandp.obj |[13] |0x00000000|C_EXT |.text |_atanatandp.obj |[14] |0x00000000|C_EXT |.text |_atandpatandp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdpatandp.obj |[17] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_recipdpatandp_v.obj |[17] |0x00000000|C_EXT |.text |_atandp_vatansp.obj |[13] |0x00000048|C_EXT |text |_atanfatansp.obj |[14] |0x00000048|C_EXT |text |_atanspatansp_v.obj |[13] |0x00000000|C_EXT |.text |_atansp_vcosdp.obj |[14] |0x00000000|C_EXT |.data |_HPisDPcosdp.obj |[13] |0x00000000|C_EXT |.text |_coscosdp.obj |[15] |0x00000000|C_EXT |.text |_cosdpcosdp_v.obj |[13] |0x00000000|C_EXT |.text |_cosdp_vcossp.obj |[12] |0x00000000|C_EXT |.text |_cosfcossp.obj |[11] |0x00000000|C_EXT |.text |_cosspcossp_v.obj |[13] |0x00000000|C_EXT |.text |_cossp_vdivdp.obj |[12] |0x00000000|C_EXT |.text |__divddivdp.obj |[11] |0x00000000|C_EXT |.text |_divdpdivdp_v.obj |[13] |0x00000000|C_EXT |.text |_divdp_vdivsp.obj |[11] |0x00000000|C_EXT |.text |__divfdivsp.obj |[12] |0x00000000|C_EXT |.text |_divspdivsp_v.obj |[13] |0x00000000|C_EXT |.text |_divsp_vexp10dp.obj |[14] |0x00000028|C_EXT |.data |OneEtwoexp10dp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdpexp10dp.obj |[17] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnoexp10dp.obj |[13] |0x00000000|C_EXT |.text |_exp10exp10dp.obj |[15] |0x00000000|C_EXT |.text |_exp10dpexp10dp_v.obj |[13] |0x00000000|C_EXT |.text |_exp10dp_vexp10sp.obj |[15] |0x00000038|C_EXT |.data |Expon_Ctableexp10sp.obj |[16] |0x00000000|C_EXT |.data |Expon_Ktableexp10sp.obj |[17] |0x00000090|C_EXT |.data |_exp10fexp10sp.obj |[13] |0x00000090|C_EXT |.data |_exp10spexp10sp.obj |[14] |0x00000060|C_EXT |.data |_expon2sp_asmexp10sp_v.obj |[13] |0x00000000|C_EXT |.text |_exp10sp_vexp2dp.obj |[13] |0x00000028|C_EXT |.data |OneExp2exp2dp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdpexp2dp.obj |[17] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnoexp2dp.obj |[15] |0x00000188|C_EXT |.text |_exp2exp2dp.obj |[14] |0x00000188|C_EXT |.text |_exp2dpexp2dp_v.obj |[13] |0x00000000|C_EXT |.text |_exp2dp_vexp2sp.obj |[17] |0x00000000|C_EXT |text |_exp2fexp2sp.obj |[18] |0x00000000|C_EXT |text |_exp2spexp2sp.obj |[19] |0x00000000|C_EXT |text |_exp2sp_asmexp2sp.obj |[15] |0x00000000|C_EXT |.data |expon_ctableexp2sp.obj |[16] |0x00000000|C_EXT |.text:hand |expon_ktableexp2sp_v.obj |[13] |0x00000000|C_EXT |.text |_exp2sp_vexpdp.obj |[14] |0x00000028|C_EXT |.data |OneE2expdp.obj |[15] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdpexpdp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnoexpdp.obj |[13] |0x00000000|C_EXT |.text |_expdpexpdp_v.obj |[13] |0x00000000|C_EXT |.text |_expdp_vexpsp.obj |[18] |0x00000060|C_EXT |text |_expfexpsp.obj |[15] |0x00000060|C_EXT |text |_expspexpsp.obj |[16] |0x00000000|C_EXT |.data |exp_ctableexpsp.obj |[17] |0x00000000|C_EXT |.text:hand |exp_ktableexpsp_v.obj |[17] |0x00000000|C_EXT |.text |_expsp_vlog10dp.obj |[15] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdplog10dp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnolog10dp.obj |[13] |0x00000000|C_EXT |.text |_log10dplog10dp.obj |[14] |0x00000000|C_EXT |.data |_nmn_L2log10dp_v.obj |[13] |0x00000000|C_EXT |.text |_log10dp_vlog10sp.obj |[14] |0x00000000|C_EXT |.text:hand |Logtable_asmlog10sp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnolog10sp.obj |[13] |0x00000020|C_EXT |.text |_log10flog10sp.obj |[15] |0x00000020|C_EXT |.text |_log10splog10sp_v.obj |[17] |0x00000000|C_EXT |.text |_log10sp_vlog2dp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdplog2dp.obj |[17] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnolog2dp.obj |[14] |0x00000000|C_EXT |.text |_log2log2dp.obj |[15] |0x00000000|C_EXT |.text |_log2dplog2dp.obj |[13] |0x00000000|C_EXT |.data |_nmnL2log2dp_v.obj |[13] |0x00000000|C_EXT |.text |_log2dp_vlog2sp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnolog2sp.obj |[13] |0x00000000|C_EXT |.text |_log2flog2sp.obj |[14] |0x00000000|C_EXT |.text |_log2splog2sp.obj |[15] |0x00000000|C_EXT |.data |log_table_asmlog2sp_v.obj |[17] |0x00000000|C_EXT |.text |_log2sp_vlogdp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_divdplogdp.obj |[17] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnologdp.obj |[14] |0x00000000|C_EXT |.text |_loglogdp.obj |[15] |0x00000000|C_EXT |.text |_logdplogdp.obj |[13] |0x00000000|C_EXT |.data |_numnL2logdp_v.obj |[13] |0x00000000|C_EXT |.text |_logdp_vlogsp.obj |[15] |0x00000000|C_EXT |.data |Logtab_asmlogsp.obj |[16] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnologsp.obj |[14] |0x00000040|C_EXT |.text |_logflogsp.obj |[13] |0x00000040|C_EXT |.text |_logsplogsp_v.obj |[17] |0x00000000|C_EXT |.text |_logsp_vpowdp.obj |[13] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_expdppowdp.obj |[14] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_logdppowdp.obj |[12] |0x00000020|C_EXT |.text |_powpowdp.obj |[11] |0x00000020|C_EXT |.text |_powdppowdp_v.obj |[13] |0x00000000|C_EXT |.text |_powdp_vpowsp.obj |[14] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_expsppowsp.obj |[13] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_logsppowsp.obj |[11] |0x00000000|C_EXT |.text |_powfpowsp.obj |[12] |0x00000000|C_EXT |.text |_powsppowsp_v.obj |[17] |0x00000000|C_EXT |.text |_powsp_vrecipdp.obj |[12] |0x00000000|C_EXT |.text |_reciprecipdp.obj |[11] |0x00000000|C_EXT |.text |_recipdprecipdp_v.obj |[13] |0x00000000|C_EXT |.text |_recipdp_vrecipsp.obj |[11] |0x00000000|C_EXT |.text |_recipfrecipsp.obj |[12] |0x00000000|C_EXT |.text |_recipsprecipsp_v.obj |[13] |0x00000000|C_EXT |.text |_recipsp_vrsqrtdp.obj |[12] |0x00000000|C_EXT |.text |_rsqrtrsqrtdp.obj |[11] |0x00000000|C_EXT |.text |_rsqrtdprsqrtdp_v.obj |[13] |0x00000000|C_EXT |.text |_rsqrtdp_vrsqrtsp.obj |[11] |0x00000000|C_EXT |.text |_rsqrtfrsqrtsp.obj |[12] |0x00000000|C_EXT |.text |_rsqrtsprsqrtsp_v.obj |[13] |0x00000000|C_EXT |.text |_rsqrtsp_vsindp.obj |[15] |0x00000000|C_EXT |.data |_HPisdpsindp.obj |[13] |0x0000001c|C_EXT |.text |_sinsindp.obj |[14] |0x0000001c|C_EXT |.text |_sindpsindp_v.obj |[13] |0x00000000|C_EXT |.text |_sindp_vsinsp.obj |[11] |0x00000014|C_EXT |.text |_sinfsinsp.obj |[12] |0x00000014|C_EXT |.text |_sinspsinsp_v.obj |[13] |0x00000000|C_EXT |.text |_sinsp_vsqrtdp.obj |[13] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnosqrtdp.obj |[12] |0x00000000|C_EXT |.text |_sqrtsqrtdp.obj |[11] |0x00000000|C_EXT |.text |_sqrtdpsqrtdp_v.obj |[13] |0x00000000|C_EXT |.text |_sqrtdp_vsqrtsp.obj |[13] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_errnosqrtsp.obj |[11] |0x00000000|C_EXT |.text |_sqrtfsqrtsp.obj |[12] |0x00000000|C_EXT |.text |_sqrtspsqrtsp_v.obj |[13] |0x00000000|C_EXT |.text |_sqrtsp_vservo-lnx:/tmp/c67xmathlib_2_01_00_00/lib%
servo-lnx:/tmp/c67xmathlib_2_01_00_00/lib% cat c67xfastMath.lib.names | grep _log10log10dp.obj |[13] |0x00000000|C_EXT |.text |_log10dplog10dp_v.obj |[13] |0x00000000|C_EXT |.text |_log10dp_vlog10sp.obj |[13] |0x00000020|C_EXT |.text |_log10flog10sp.obj |[15] |0x00000020|C_EXT |.text |_log10splog10sp_v.obj |[17] |0x00000000|C_EXT |.text |_log10sp_vservo-lnx:/tmp/c67xmathlib_2_01_00_00/lib% cat c67xfastMath.lib.names | grep _expexp10dp.obj |[13] |0x00000000|C_EXT |.text |_exp10exp10dp.obj |[15] |0x00000000|C_EXT |.text |_exp10dpexp10dp_v.obj |[13] |0x00000000|C_EXT |.text |_exp10dp_vexp10sp.obj |[17] |0x00000090|C_EXT |.data |_exp10fexp10sp.obj |[13] |0x00000090|C_EXT |.data |_exp10spexp10sp.obj |[14] |0x00000060|C_EXT |.data |_expon2sp_asmexp10sp_v.obj |[13] |0x00000000|C_EXT |.text |_exp10sp_vexp2dp.obj |[15] |0x00000188|C_EXT |.text |_exp2exp2dp.obj |[14] |0x00000188|C_EXT |.text |_exp2dpexp2dp_v.obj |[13] |0x00000000|C_EXT |.text |_exp2dp_vexp2sp.obj |[17] |0x00000000|C_EXT |text |_exp2fexp2sp.obj |[18] |0x00000000|C_EXT |text |_exp2spexp2sp.obj |[19] |0x00000000|C_EXT |text |_exp2sp_asmexp2sp_v.obj |[13] |0x00000000|C_EXT |.text |_exp2sp_vexpdp.obj |[13] |0x00000000|C_EXT |.text |_expdpexpdp_v.obj |[13] |0x00000000|C_EXT |.text |_expdp_vexpsp.obj |[18] |0x00000060|C_EXT |text |_expfexpsp.obj |[15] |0x00000060|C_EXT |text |_expspexpsp_v.obj |[17] |0x00000000|C_EXT |.text |_expsp_vpowdp.obj |[13] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_expdppowsp.obj |[14] |0x00000000|C_EXT |UNDEFINED EXTERNAL |_expsp
I have filed a bug for this so this issue should be filed in the next release. In the meantime, you can fix this issue by uncommenting the statement on line 111 of log10dp.asm that is found under the path c67xmathlib_2_01_00_00\src\dp\log10dp
Uncomment this statement:
;_log10: ; rts lib DP FP log (base 10)
For creating the global symbol _exp, do the same on line number 108 of expdp.asm file found under the path c67xmathlib_2_01_00_00\src\dp\exp10dp\
;_exp: ; rts entry
After you change this file recompile the library by rebuilding the project under c67xmathlib_2_01_00_00\build. Linking the resulting binary should resolve the issue.
Regards,
Rahul
---------------------------------------------------------------------------------Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------
Thanks Rahul.
I believe you meant to change expdp.asm in 67xmathlib_2_01_00_00\src\dp\expdp, not in c67xmathlib_2_01_00_00\src\dp\exp10dp.
In addition to this issue, the linux Makefile needs numerous corrections. I create a service request, Service Request# 1-770270390, to report this issue on 4/12/2012. Unfortunately I have had no response. I attached the patch file I sent in with the SR to fix c67xmathlib_2_01_00_00/build/Makefile. Can you please file a bug for the Makefile problem as well?
With the source changes you suggested, and the Makefile patch, I am able to regenerate the library picking up the missing entry points (and not losing any others).
Can you also let me know tracking numbers for the bugs?
Thanks
Steve
Steve,
Yes I meant the expdp.asm.
This library was recently updated with some major structural changes and additional platform support. A new 3.x version library which has support for C66x DSP platforms is now available on ti.com. Functionally the library is the same but the directory structure has been aligned with other DSP software like SYS/BIOS and XDC and is easier to integrate with CCS. This library can be found on ti.com under the name MATHLIB. The update also has major bug fixes and better documentation. You can find the latest release here:
http://www.ti.com/tool/mathlib
I noticed that the latest release also had this bug so I have filed the missing symbol bug against that release but I am not sure the makefile bug applies to the 3.x release anymore.
Rahul,
I see c66x and c674x libs at the link you provided, but i need c67x libraries.
The next release of the library will cover those family of devices. My post was just a "fyi" to inform you of the coming update and to explain the situation on the makefiles.
When will the new release be available? It has been 6 months. thanks
In contact with Rahul to get update on MATHLIB release and status of bug fixes. Either he or I will update you in the next 1-2 days.
FYI, this thread had been marked ANSWERED, so was not being actively monitored any longer by TI. In the future, either reject the ANSWER (button on ANSWERED post), if answer if not complete or satisfactory. Alternatively start a new post with reference to this thread to get into actively monitored queue.
Regards.
---------------------------------------------------------------------------------------------------------
ACAT/DCAT Team
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
The C67x version of MATHLIB has been delayed due to some high priority activities that have come up for the team managing the release process. I'm trying to get a schedule update for you.
In the mean time for a short term solution if you want to take advantage of the new MATHLIB release you can start with the new C674x MATHLIB source and recompile for the C67x device. In the C674x MATHLIB release, there is a project to rebuild the library, You can change the target to C67x, rebuild the library source and generate the C67x version of the library.
Another approach would be to pick the source code for the functions that are required in your project and integrate them into your code base.
Let me know if either of these approaches will work for you.
I have been unable to build the c674x version for the c67x target due to tool and platform difficulties. I remain interested in a c67x release.
I am investigating when the next MATHLIB release will be available for the C67xx family. I will give you an update within the next 1-2 days.
I am also investigating the build failure you reported. When I tried to import the project into CCSv5 the process failed at that step. Is that what you saw when you tried the newer version of CCS? My goal is to get the retarget and build process worked out so you can use the newer library source for your C67xx application until the new library is released. I will have update when I report on the schedule.
There will not be a separate C67xx MATHLIB release for v3.x and beyond. The plan is to provide a C67xx build option with the C674x MATHLIB package. The C67x is a superset of the C67xx CPU. A patch release for the C674x MATLIB to migrate the build process to CCSv5.2. The project files are different between the original release platform CCS4 and the newer CCSv5.2. That is the reason the build didn't work when you tried it on CCSv5. In addition, the issues that you have reported will also be taken care. If you want to test the build process you can download CCSv4 you can download it from this site: http://processors.wiki.ti.com/index.php/Download_CCS. It won't be possible to have a release for CCSv3.3, however it should be possible to build the library using an external make file.
I don't have schedule yet because I need to clarify a couple of issues with you first.
You want to include _exp and _log10 symbols in the MATHLIB library which are RTS library names. In current Mathlib, the assembly kernel uses _log10dp as entry point instead of _log10 and instead of _exp MATHLIB functions expsp or expdp. There is a build option to compile with RTS names. Do you need both MATHLIB and RTS names in the library, or just to override RTS names? There is an option (RTS override) to generate RTS names.
In the case of _exp, it has 2 matches in the current MATHLIB release (expsp and expdp). We can only provide one symbol in a library, so I need to know which of the 2 MATHLIB functions you want to use. I am thinking it will be expdp, so that it matches the _log10 MATHLIB function, log10dp. Can you confirm?
For more flexibility our plan is to generate ccs 5.2 projects and provide hooks for customers to rebuild either sp RTS override or dp RTS override for C67x. For the supported targets, we will provide 3 libraries, the normal one, sp RTS override and dp RTS override.
Tommy,
I don't believe there is a linux CCSv4 build available. In the v2.x library there was a makefile that could be used with the code gen tools and without CCS. Unfortunately it had numerous issues that made it unusable. The support for CGT only mathlib builds seems to have been totally dropped from the v3.x library instead of being fixed. Normally we don't use CCS at all.
I am using a v1.x mathlib library currently. At that time override RTS wasn't a build option, I think it was just the way it worked, i.e. it was always overridden.
I would like all the functions related to mathlib that are supported in C99 to be supported simultaneously for both doubles and floats. For example, I want to be able to use exp(), expf(), exp2(), exp2f(), log(), logf(), log10(), log10f(), log2, log2f(), etc. This also applies to the trig functions, pow, sqrt, etc. I need both of the nonstandard entry points _div and _divf. These are two non-standard routines that the compiler will generate references to. There are other nonstandard routines (that didn't get added in C99) I would like you to continue support for, e.g. exp10(), exp10f(). I can mail you an exhaustive list of the entry points in v1.x.
I don't understand your plan to have two RTS overide libraries, one for sp and one for dp. Why can't they coexist as they used to? For example, in v3.0.1.1 expsp.asm doesn't have a label of _exp at all, for OVERRIDE_RTS it has _expf. expdp.asm defined _exp for OVERRIDE_RTS. I question the accuracy of your statement "In the case of _exp, it has 2 matches in the current MATHLIB release (expsp and expdp)."
It does appear to me that an all inclusive library will be bigger than it was in v1.x because you have duplicated code in places, e.g. in expdp.asm, exp2dp.asm, exp10dp.asm. The v1.x code did not have this duplication. The duplication is acceptable, but it does seem like a step backwards.
I am concerned about your plan, it doesn't seem like it has what I want or what was provided in v1.x. At the same time I don't understand what library "the normal one" is and how it differs the traditional v1.x library.
Best Regards,
Hi Steve,
I am responsible for making this Mathlib release. In mathlib, every function has a sp and a dp version, for example, expsp and expdp. Because in the unit test code, both dp and sp versions are using double precision RTS function, e.g. exp, as reference, I thought that's the only function in RTS. You are correct that there are both exp and expf in RTS. So the information I gave Tom about needing separate dp and sp libraries is not correct. They can be included in a single library.
In current Mathlib release, we do not provide RTS function names. We only use xxxsp or xxxdp, because RTS functions are linked in unit tests as reference. When we build the library, we also build unit tests, then use the unit tests to verify the library and generate test report and benchmark information. Override RTS has not been a priority for us, because for newer chip sets, such as C66, the C with intrinsic implementation are becoming the main kernel with better performance than asm code. Recently, we are getting requests to add RTS override capability. So this patch release will address this issue.
Our current plan is to make a separate RTS override library, which will use RTS names such as exp, expf instead of expsp and expdp. We will test the normal version (expsp and expdp), but not the override version. Since the source codes are the same, only symbols are different, I think that should be acceptable. We didn't plan to make a single library that would include both normal names (expsp, expdp) and override names (exp, expf). Please let me know if this would be acceptable to you.
We actually do not use CCS to make builds. We use makefile and xdc tools. If you would like to build mathlib this way ,we can provide the details about what you need to install and how to make builds.
We also have plans to add other routines into Mathlib in the future. We would like your inputs to see which functions are more important to you.
best regards,
Yimin