|
|
名称 |
主机 |
操作系统 |
当前版本 |
版本日期 |
| C24x 定点数学函数库 |
PC |
Win 95/98/2000/NT |
v1.0 |
Mar-06-2002 |
;************************************************************************************* ;*********************** SECTION 1: FIXED POINT MATH FUNTIONS ******************** ;************************************************************************************* Thank you for trying C2000 Software Collateral. Fixed Point MATH Library is installed in C:\TIDCS\C24\DSP_TBOX\MATH directory.
Fixed point math library (QMATH) contains math/trigonometric routines that are developed as an easy-to-use library, which has to be linked to the user抯 application. The following table summarizes the set of functions that are defined in this library.
FIXED POINT MATH FUNTIONS |===============|==========================================================| | Module Name | Description | |===============|==========================================================| | QSIN | Fixed point SIN (Taylor series implementation) | |---------------|-----------------------------------------------------------------------| | QSINLT | Fixed point SIN (Table look-up and linear interpolation) | |---------------|-----------------------------------------------------------------------| | QCOS | Fixed point COS (Taylor series implementation) | |---------------|-----------------------------------------------------------------------| | QCOSLT | Fixed Point COS (Table look-up and linear interpolation) | |---------------|-----------------------------------------------------------------------| | QATAN | Fixed point ATAN (Taylor series implementation) | |---------------|-----------------------------------------------------------------------| | QSQRT | Fixed point Square-root (Taylor series implementation) | |---------------|-----------------------------------------------------------------------| | QLOG10 | Fixed point LOG10 (Taylor series implementation) | |---------------|-----------------------------------------------------------------------| | QLOGN | Fixed point LOGN (Taylor series implementation) | |---------------|-----------------------------------------------------------------------| | QINV1 | Reciprocal (32-bit Precision) | |---------------|-----------------------------------------------------------------------| | QINV2 | Reciprocal (16-bit Precision) | |===========================================================================|
DOCUMENTATION: |===============|============================================================| | DOC | DIRECTORY LOCATION | |===============|============================================================| | MODULE DOC | C:\TIDCS\C24\DSP_TBOX\MATH\DOC\MATH_MDL.PDF | |---------------|-----------------------------------------------------------------------| | STB DOC | C:\TIDCS\C24\DSP_TBOX\MATH\DOC\MATH_STB.PDF | |===========================================================================|
;************************************************************************************* ;******************** SECTION 2: Software Test Bench (STB) *************************** ;************************************************************************************* To facilitate evaluation and deployment of these modules, they are made available as Software Test Benches (STBs) which run as code composer projects on readily available EVMs or eZdsp hardware platforms.
Each STB focuses on a particular software module and shows the customer how to invoke it, pass variable or data to it, and how to link it into their systems. Where possible, the module under evaluation is made to interact with other modules such as signal generators, which can provide input stimulus and data-logging modules or EVM-DAC drivers to examine a module's response in a real-time environment. This helps customers to get a more realistic feel of the software module's capability and applicability.
Shown below is the STB for QSIN function.
|----------| |----------| |----------| |-----------| | | Q15(int) | | Q15(int) | |Q15(int) | | CH0=sx | RAMPGEN |--------|->| x(SF) |------------>| QSIN |--------->| |---> | (50Hz) |ramp.out| | Scaling | x | | y sy=y | EVMDAC | CH1=sy |----------| | |----------| |----------| (Q15)| DLOG |---> | SF=1 | PWMDAC | |--------------------------------------------->| | sx=x/(SF) | | (Q15) |-----------|
The RAMP_GEN module is configured to generate 50Hz asymmetric ramp output that swings between +1 and ?. The ramp output is directly connected to the SIN function as it is in Q15 format. The Q15 output of the QSIN function and the output of RAMP_GEN module are sent though the PWM-DAC, EVM-DAC and also logged by the DATA_LOG module. The logged information is graphed on the console for observation, by the Real Time Monitor program running in the background. The EVM-DAC output can be viewed with the scope and the PWM_DAC output should be filtered to view the signal.
|