Add DCS7 & AFP
authorFrank Livingston <frank-livingston@ti.com>
Fri, 8 Jul 2016 00:35:05 +0000 (19:35 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Fri, 8 Jul 2016 00:35:05 +0000 (19:35 -0500)
procsdk_audio_x_xx_xx_xx/test_arm/.gitignore [new file with mode: 0644]
procsdk_audio_x_xx_xx_xx/test_dsp/.cproject
procsdk_audio_x_xx_xx_xx/test_dsp/application/app.cfg
procsdk_audio_x_xx_xx_xx/test_dsp/application/app.cmd
procsdk_audio_x_xx_xx_xx/test_dsp/application/itopo/evmk2g/dcs7_params.c [new file with mode: 0644]
procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProc.c
procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProc.h
procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProcParams.c [new file with mode: 0644]
procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProcParams.h [new file with mode: 0644]

diff --git a/procsdk_audio_x_xx_xx_xx/test_arm/.gitignore b/procsdk_audio_x_xx_xx_xx/test_arm/.gitignore
new file mode 100644 (file)
index 0000000..8c0610d
--- /dev/null
@@ -0,0 +1,5 @@
+/Debug/
+.settings/
+.xdchelp
+application/src
+
index 8f6bc4dce5c88abbdb004fd7de2a33d2306024ee..261b9bfc66b66d2461e4e43d8aab5a9c787dc9c6 100644 (file)
@@ -75,6 +75,7 @@
                                                                        <listOptionValue builtIn="false" value="PAF_DEVICE=0xDA000000"/>
                                                                        <listOptionValue builtIn="false" value="INCLUDE_HDMI_CONFIG"/>
                                                                        <listOptionValue builtIn="false" value="TEST_MULTICHANNEL"/>
+                                                                       <listOptionValue builtIn="false" value="UARTCALLBACK"/>
                                                                </option>
                                                                <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION.1342965662" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
                                                                <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.204446227" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/std&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/enc/pce2/alg&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/acp1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dcs7/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dob&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/paf&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/std&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/enc/pce2/alg&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/acp1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dcs7/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dib&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dob&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/paf&quot;"/>
                        </storageModule>
                        <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
                </cconfiguration>
+               <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.66802588.839132779">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.66802588.839132779" moduleId="org.eclipse.cdt.core.settings" name="SimAcDebug">
+                               <macros>
+                                       <stringMacro name="FFTC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SA_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PASS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="GPIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/pdk_k2g_1_0_1/packages"/>
+                                       <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="CPPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="IQN2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="OSAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="NIMU_INSTAL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PCIE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="NIMU_ICSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="TCP3D_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="QMSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="BCP_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PROCSDK_AUDIO_ROOT" type="VALUE_PATH_DIR" value="C:/ti/procsdk_audio_x_xx_xx_xx"/>
+                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                               </macros>
+                               <externalSettings/>
+                               <extensions>
+                                       <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.rtsc.xdctools.parsers.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+                               </extensions>
+                       </storageModule>
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+                               <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="Simulate Rx/Tx audio clock" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.66802588.839132779" name="SimAcDebug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug" postbuildStep="" prebuildStep="">
+                                       <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.66802588.839132779." name="/" resourcePath="">
+                                               <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain.1202231699" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.linkerDebug.610272205">
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1781669020" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+                                                               <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS320C66XX.66AK2G02"/>
+                                                               <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+                                                               <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+                                                               <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+                                                               <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+                                                               <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+                                                               <listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
+                                                               <listOptionValue builtIn="false" value="XDC_VERSION=3.32.0.06_core"/>
+                                                               <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.sdo.edma3:2.12.1;com.ti.rtsc.IPC:3.43.0.00_eng;com.ti.rtsc.SYSBIOS:6.45.1.29;com.ti.uia:2.0.3.43;com.ti.rtsc.XDAIS:7.24.0.04;com.ti.pdk.k2g:1.0.1;"/>
+                                                               <listOptionValue builtIn="false" value="EXPANDED_REPOS="/>
+                                                               <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
+                                                       </option>
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1944964663" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="8.1.0" valueType="string"/>
+                                                       <targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.targetPlatformDebug.1091325655" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.targetPlatformDebug"/>
+                                                       <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.builderDebug.111872147" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.builderDebug"/>
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.38610900" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug">
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEFINE.414968720" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEFINE" valueType="definedSymbols">
+                                                                       <listOptionValue builtIn="false" value="dsp0"/>
+                                                                       <listOptionValue builtIn="false" value="k2g02"/>
+                                                                       <listOptionValue builtIn="false" value="SOC_K2G"/>
+                                                                       <listOptionValue builtIn="false" value="DEVICE_K2G"/>
+                                                                       <listOptionValue builtIn="false" value="PAF_DEVICE=0xDA000001"/>
+                                                                       <listOptionValue builtIn="false" value="SIMULATE_SIO"/>
+                                                                       <listOptionValue builtIn="false" value="UARTCALLBACK"/>
+                                                               </option>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION.1233049897" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.584993937" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WARNING.331794843" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WARNING" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="225"/>
+                                                               </option>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DISPLAY_ERROR_NUMBER.591672471" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WRAP.898855366" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.INCLUDE_PATH.973191496" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.INCLUDE_PATH" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/dec/com&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/dec/dwr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/dec/pcm1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/dec/pcm1/alg&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/dec/pcm1/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/dec/sng1/alg&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/arc1/alpha&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/ae0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/bm2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/com&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/del&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/fil/alg&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/asp/std&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/enc/pce2/alg&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/acp1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dcs7/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dib&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/dob&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/sio/paf&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/f/s2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/f/s3&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/f/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/paf/pa/f/alpha&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/test_dsp/framework&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/test_dsp/application/itopo/evmk2g/alpha&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/test_dsp/sio&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/common&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/shared&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/test_dsp/boards/k2g/drivers&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROCSDK_AUDIO_ROOT}/ddp/Dolby_Digital_Plus_Decoder_Imp/Source_Code/alpha&quot;"/>
+                                                               </option>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.ABI.434954475" name="Application binary interface (coffabi not supported) [See 'General' page to edit] (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.ABI.eabi" valueType="enumerated"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.MEM_MODEL__DATA.1571372033" name="Data access model (--mem_model:data)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.MEM_MODEL__DATA" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.MEM_MODEL__DATA.far_aggregates" valueType="enumerated"/>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS.1209686676" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS"/>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS.1984909851" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS"/>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS.144326172" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS"/>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.2000639233" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
+                                                       </tool>
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.linkerDebug.1813305305" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.linkerDebug">
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DEFINE.415049702" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DEFINE" valueType="definedSymbols">
+                                                                       <listOptionValue builtIn="false" value="DSP_CORE=1"/>
+                                                               </option>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.STACK_SIZE.1731221475" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.STACK_SIZE" value="0x800" valueType="string"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.HEAP_SIZE.1105408786" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.HEAP_SIZE" value="0x800" valueType="string"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.OUTPUT_FILE.606101363" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.MAP_FILE.1134949353" name="Link information (map) listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.XML_LINK_INFO.407605540" name="Detailed link information data-base into &lt;file&gt; (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.XML_LINK_INFO" value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DISPLAY_ERROR_NUMBER.2075410931" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DIAG_WRAP.1861046409" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.SEARCH_PATH.582973904" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.SEARCH_PATH" valueType="libPaths">
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
+                                                               </option>
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.LIBRARY.442212751" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.LIBRARY" valueType="libs">
+                                                                       <listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>
+                                                               </option>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD_SRCS.1473116659" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD_SRCS"/>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD2_SRCS.950556820" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD2_SRCS"/>
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__GEN_CMDS.1136075452" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__GEN_CMDS"/>
+                                                       </tool>
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.hex.1206242989" name="C6000 Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.hex"/>
+                                                       <tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1888203886" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1401070258" name="Compiler tools directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="&quot;${CG_TOOL_ROOT}&quot;" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1802194880" name="Target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.elf.C66" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.1802495589" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.evmTCI66AK2G02:core0" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.325663594" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.evmTCI66AK2G02" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.826380270" name="Build-profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.117063731" name="Package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="&quot;${BIOS_CG_ROOT}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${IPC_CG_ROOT}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${COM_TI_UIA_INSTALL_DIR}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${XDAIS_CG_ROOT}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${XDAIS_CG_ROOT}/examples&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_PDK_INSTALL_DIR}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${EDMA3_LLD_INSTALL_DIR}/packages&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${TARGET_CONTENT_BASE}&quot;"/>
+                                                               </option>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.603357963" name="Additional compiler options (--compileOptions)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value="&quot;-g --optimize_with_debug&quot;" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.JAVA_PROPERTIES.1917396874" name="Java properties (-D)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.JAVA_PROPERTIES" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="xdc.platform.custom.check=false"/>
+                                                                       <listOptionValue builtIn="false" value="ProjName=pa_i13_evmk2g_c66x"/>
+                                                                       <listOptionValue builtIn="false" value="AudioClockSim=1"/>
+                                                               </option>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CFG_ARGS.469058994" name="Configuration script arguments (--cfgArgs)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CFG_ARGS" value="&quot;{ profile: \&quot;debug\&quot; }&quot;" valueType="string"/>
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_CONFIGURATION_FILE.2024892506" name="Build configuration file (-b)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_CONFIGURATION_FILE" value="${PROCSDK_AUDIO_ROOT}/shared/config.bld" valueType="string"/>
+                                                       </tool>
+                                               </toolChain>
+                                       </folderInfo>
+                                       <sourceEntries>
+                                               <entry excluding="mob|mib|sio_dev2|sio/dev2utils.c|sap|src|application/src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+                                       </sourceEntries>
+                               </configuration>
+                       </storageModule>
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+               </cconfiguration>
        </storageModule>
        <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
index f5ec6307598d89e0842bea8869ad627860d7336a..13edf5adf91fc837c4f349d48f8ce0f839214b9e 100644 (file)
@@ -40,7 +40,6 @@ var ECM             = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
 
 xdc.useModule('ti.sdo.utils.MultiProc');
 
-
 /*
  *  ======== IPC Configuration ========
  */
@@ -140,8 +139,7 @@ var loggerBufParams = new LoggerBuf.Params();
 
 System.SupportProxy = SysMin;
 
-
-/* --- FL: started adding below this line --- */
+/* ------ */
 LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
 LoggingSetup.sysbiosTaskLogging = false;
 LoggingSetup.loadLogging = false;
@@ -200,7 +198,25 @@ else
     Program.global.semaphoreTxAudio = Semaphore.create(null, semaphore1Params);
 }
 
-if (rxAlphaSimBuild == true)
+if (rxAlphaSimBuild == false)
+{
+    var devType = "k2g"
+
+    var CpIntc =   xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
+
+    /* Load the OSAL package */ 
+    var osType = "tirtos";
+    var Osal = xdc.useModule('ti.osal.Settings');
+    Osal.osType = osType;
+    Osal.socType = devType;
+
+    /* Load the uart package */
+    var Uart = xdc.loadPackage('ti.drv.uart');
+    Uart.Settings.enableProfiling = false;
+    Uart.Settings.socType = devType; 
+    Uart.Settings.useDma = "false";    
+}
+else
 {
     //
     // Rx alpha commands simulation
@@ -228,6 +244,7 @@ var task0Params = new Task.Params();
 task0Params.instance.name = "TaskAfp";
 task0Params.stackSize   = 0x1000; // initial value from pa.cfg
 task0Params.stackSection = ".far:taskStackSectionAfp";
+task0Params.arg0 = 0;
 task0Params.priority = -1; //1;
 Program.global.TaskAfp = Task.create("&taskAfpFxn", task0Params);
 Program.sectMap[".far:taskStackSectionAfp"] = "CORE0_DDR3"; // SDRAM in pa.cfg
@@ -310,16 +327,19 @@ heapMem2Params.sectionName = ".ddr3Heap";
 Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
 Program.sectMap[".ddr3Heap"] = "CORE0_DDR3";
 
+/* FL: hack for DCS7, dcs7_cfg.c */
+Program.global.SDRAMHeap = Program.global.heapMemDdr3;
+
 Program.sectMap["platform_lib"] = "L2SRAM";
 //Program.sectMap[".stack"]    = "L2SRAM";
 
 if (acSimBuild == false)
 {
     ECM.eventGroupHwiNum[0] = 7;
-    ECM.eventGroupHwiNum[1] = 8;
-    ECM.eventGroupHwiNum[2] = 9;
-    ECM.eventGroupHwiNum[3] = 10;
-    Clock.tickPeriod = 100;
+    //ECM.eventGroupHwiNum[1] = 8;
+    //ECM.eventGroupHwiNum[2] = 9;
+    //ECM.eventGroupHwiNum[3] = 10;
+    Clock.tickPeriod = 1000;
 }
 else
 {
index a9554e07805a40c4100648c2b6b9217482107385..720ec88fdef2e383c22e7ba192a221fa6b0faa87 100644 (file)
@@ -1,4 +1,4 @@
--iC:\ti\procsdk_audio_x_xx_xx_xx\paf\pa\build\c66x\release
+-i"C:\ti\procsdk_audio_x_xx_xx_xx\paf\pa\build\c66x\release"
 
 -l"acp_elf.lib"
 -l"asp_std_elf.lib"
@@ -7,6 +7,7 @@
 -l"pafsio_elf.lib"
 -l"pce2_elf.lib"
 -l"pcm1_elf.lib"
+-l"dcs7_elf.lib"
 
 SECTIONS
 {
diff --git a/procsdk_audio_x_xx_xx_xx/test_dsp/application/itopo/evmk2g/dcs7_params.c b/procsdk_audio_x_xx_xx_xx/test_dsp/application/itopo/evmk2g/dcs7_params.c
new file mode 100644 (file)
index 0000000..07c0455
--- /dev/null
@@ -0,0 +1,146 @@
+
+/*
+* Copyright (C) 2004-2014 Texas Instruments Incorporated - http://www.ti.com/
+* All rights reserved.  
+*
+*  Redistribution and use in source and binary forms, with or without
+*  modification, are permitted provided that the following conditions
+*  are met:
+*
+*    Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+*
+*    Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the
+*    distribution.
+*
+*    Neither the name of Texas Instruments Incorporated nor the names of
+*    its contributors may be used to endorse or promote products derived
+*    from this software without specific prior written permission.
+*
+*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+*  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+
+//
+//
+// DA10x SPI, I2C and UART slave control status (DCS7) implementation
+//
+//
+//
+
+#include <dcs7.h>
+#include <dcs7_params.h>
+
+#include "dcs7_medialayer.h"
+
+#ifdef UARTCALLBACK
+extern void UART_transferCallback(UART_Handle handle,
+                                    void *buffer, size_t count);
+#endif
+
+
+const DCS7_Params_Dev_Spi DCS7_PARAMS_DEV_SPI =
+{
+    sizeof(DCS7_Params_Dev_Spi)
+};
+
+const DCS7_Params_Dev_I2c DCS7_PARAMS_DEV_I2C =
+{
+    sizeof(DCS7_Params_Dev_I2c),
+};
+
+const DCS7_Params_Dev_Uart DCS7_PARAMS_DEV_UART =
+{
+    sizeof(DCS7_Params_Dev_Uart),
+    0,     // xrxSize
+    0,     // xrxHwm
+    0,     // xrxLwm
+    0,     // xtxSize
+    0,     // emask
+    NULL,  // hUart
+#ifdef UARTCALLBACK
+    &UART_transferCallback,  // transferCallbackFxn
+#endif
+    0,     // isEMDAConfigured
+    SRECORD_RES_MAX_S1_CNT * 72 /*ASCII_SRECORD_S1_MAX_SIZE*/, // scratchBufSize
+    NULL   // scratchBuf
+};
+
+const DCS7_Params_Dev DCS7_PARAMS_DEV =
+{
+    /* Select the appropriate device from the following choices:
+           DCS7_PARAMS_DEV_SPI - Select SPI device
+           DCS7_PARAMS_DEV_I2C - Select I2C device
+           DCS7_PARAMS_DEV_UART - Select UART device */
+//    (Uint32)&DCS7_PARAMS_DEV_SPI,
+//    (Uint32)&DCS7_PARAMS_DEV_I2C,
+    (Uint32)&DCS7_PARAMS_DEV_UART,
+};
+
+Uint32 DCS7Trace = Diags_USER2;
+
+const DCS7_Params DCS7_PARAMS =
+{
+    sizeof(DCS7_Params),
+    /* DCS7 supports following values for device (dev):
+       DCS7_PARAMS_DEV_SPI0 - SPI0 device
+       DCS7_PARAMS_DEV_SPI1 - SPI1 device
+       DCS7_PARAMS_DEV_I2C0 - I2C0 device
+       DCS7_PARAMS_DEV_I2C1 - I2C1 device
+       DCS7_PARAMS_DEV_UART0 - UART0 device */
+    DCS7_PARAMS_DEV_UART0,
+    /* DCS7 supports following values for (psfil):
+       DCS7_PARAMS_PSFIL_ENA - enable processing zero fill
+       DCS7_PARAMS_PSFIL_DIS - disable processing zero fill */
+    DCS7_PARAMS_PSFIL_DIS,
+    /* DCS7 supports following values for processing slc (pslc):
+       DCS7_PARAMS_PSLC_DIS - disable processing slc
+       DCS7_PARAMS_PSLC_ENA - enable processing slc */
+    DCS7_PARAMS_PSLC_ENA,
+    /* DCS7 supports following values for error detection and report (edr):
+       DCS7_PARAMS_EDR_DIS - disable error detection and report
+       DCS7_PARAMS_EDR_ENA - enable error detection and report */
+    DCS7_PARAMS_EDR_ENA,
+    /* Reserved fields */
+    0,0,
+    /* The receive buffer size, watermarks values and the transmit buffer size
+       values should be chosen depending upon the data rate, latency 
+       requirements, application memory requirements, etc. */
+    512,
+    256,
+    512,
+    512,
+    /* DCS7 device parameters */
+    (DCS7_Params_Dev*)&DCS7_PARAMS_DEV,
+    /* DCS7 log param */
+    (Void*) &DCS7Trace,
+};
+
+void DCS7_errorInit()
+{
+    /* Initialize the physical interface that will be used for reporting 
+       error occurence to the master */
+}
+
+void DCS7_errorAssert()
+{
+    /* Configure the physical interface to indicate occurence of an error
+       to the master */ 
+}
+void DCS7_errorDeassert()
+{
+    /* Configure the physical interface to indicate error recovery is 
+       completed and the slave is ready to accept new data */
+}
index eb2bc7b23083436932acadbdb93720a2d420f1f4..c646e3462b71bce9ed596d2e24982ec4859b2d16 100644 (file)
 #include <stdlib.h>
 #include "fwkSim.h"
 
+#include "paf_heapMgr.h"
+#include "alphaFuncProc.h"
+
+#define ENABLE_AE_TRACE
+#ifdef ENABLE_AE_TRACE
+    //#define AE_TRACE0(a) LOG_printf a
+    #define AE_TRACE0(a)            Log_info0(a)
+    #define AE_TRACE1(a,b)          Log_info1(a,b)
+    #define AE_TRACE2(a,b,c)        Log_info2(a,b,c)
+    #define AE_TRACE3(a,b,c,d)      Log_info3(a,b,c,d)
+    #define AE_TRACE4(a,b,c,d,e)    Log_info4(a,b,c,d,e)    
+#else
+    #define AE_TRACE0(a)
+    #define AE_TRACE1(a,b)
+    #define AE_TRACE2(a,b,c)
+    #define AE_TRACE3(a,b,c,d)
+    #define AE_TRACE4(a,b,c,d,e)
+#endif
+
 // Global debug counters */
 Uint32 gTaskAfpCnt=0;
 
+AFP_Obj AFP_OBJ;
+
+Void *AFP_memAlloc(
+    AFP_Handle handle,
+    Int32 *pHeapId,
+    UInt32 size,
+    UInt32 align
+)
+{
+    IHeap_Handle hHeap;
+    
+    hHeap = pafHeapMgr_readHeapHandle(*pHeapId);
+    return (void *)Memory_alloc((IHeap_Handle)hHeap, size, align, NULL);
+}
+
+Void AFP_process(
+    AFP_Handle handle
+)
+{
+    Int rxIdx, txIdx;
+    Int encap, len, res_len, error, cnt, txStrip, i, rxOffset, txOffset;
+
+    /* Process Alpha commands */
+    for(;;)
+    {
+        /* Set read and write buffer indices */
+        rxIdx = 2;
+        txIdx = 3;
+        txOffset = 0;
+        encap = 0;
+        
+        /* Read the payload */
+        if (handle->dcs7->fxns->read(handle->dcs7, 
+            handle->rxBuf+rxIdx,
+            handle->params->rxBufSize-(rxIdx<<1)))
+        {
+            //handle->fxns->log(handle,handle->logObj,
+            //    "AFP6: Error in reading message");
+            
+            /* Write the response */
+            handle->txBuf[txIdx++] = 0xdead;
+            AE_TRACE0("AFP_process:  0xDEAD: Error in reading alpha message.");
+            handle->txBuf[3-txOffset-1] = txIdx-3+txOffset;
+            handle->dcs7->fxns->write(handle->dcs7,
+                &handle->txBuf[3-txOffset-1],
+                handle->params->txBufSize-(3-txOffset-1<<1));
+                
+            continue;
+        }
+        
+        /* Get CPM count */
+        cnt = handle->rxBuf[rxIdx++];
+        /* Process the C-record */
+        while (cnt)
+        {
+            /* Get the length of alpha code */
+            len = handle->acp->fxns->length(handle->acp, &handle->rxBuf[rxIdx]);
+            /* Get the response length */
+            res_len = handle->acp->fxns->htgnel(handle->acp, &handle->rxBuf[rxIdx]);
+            if (res_len > (handle->params->txBufSize-2>>1)-txIdx)
+            {
+                handle->txBuf[txIdx++] = 0xdead;
+                //handle->fxns->log(handle,handle->logObj,
+                //    "AFP6: Response too big");
+                AE_TRACE0("AFP_process:  0xDEAD: Response too big.");
+                break;
+            }
+
+            /* Add encapsulation to alpha command -- ACP limitation */
+            if (((handle->rxBuf[rxIdx] & 0xff00) == 0xc900) || 
+                (handle->rxBuf[rxIdx] == 0xcd01))
+            {
+                Int lene, nele;
+                Int lenp, nelp;
+                Int k;
+                if ((handle->rxBuf[rxIdx]&0xff00) == 0xc900)
+                {
+                    k=1;
+                }
+                else
+                {
+                    k=2;
+                }
+                lene = len-k;
+                nele = 0;
+                while (lene)
+                {
+                    lenp = handle->acp->fxns->length(handle->acp, &handle->rxBuf[rxIdx+k]);
+                    nelp = handle->acp->fxns->htgnel(handle->acp, &handle->rxBuf[rxIdx+k]);
+                    k += lenp;
+                    lene -= lenp;
+                    nele += nelp;
+                }
+                if (nele < 256)
+                {
+                    res_len = nele+1;
+                }
+                else
+                {
+                    res_len = nele+2;
+                }
+                rxOffset = 0;
+                if (res_len > (handle->params->txBufSize-4>>1)-txIdx)
+                {
+                    handle->txBuf[txIdx++] = 0xc901;
+                    handle->txBuf[txIdx++] = 0xdead;
+                    AE_TRACE0("AFP_process:  0xDEAD: Response too big.");
+                    //handle->fxns->log(handle,handle->logObj,
+                    //    "AFP6: Response too big");
+                    break;
+                }
+            }
+            else if (len < 256)
+            {
+                handle->rxBuf[--rxIdx] = 0xc900+len;
+                rxOffset = 1;
+            }
+            else
+            {
+                handle->rxBuf[--rxIdx] = len;
+                handle->rxBuf[--rxIdx] = 0xcd01;
+                rxOffset = 2;
+            }
+
+            /* Process alpha command */
+            error = handle->acp->fxns->sequence(handle->acp,
+                &handle->rxBuf[rxIdx],
+                &handle->txBuf[txIdx]);
+            if (error)
+            {
+                //handle->fxns->log(handle,handle->logObj,
+                //    "AFP6: Sequence error");
+                AE_TRACE0("AFP_process:  0xDEAD: Sequence error.");
+                if (res_len || encap)
+                {
+                    handle->txBuf[txIdx++] = 0xdead;
+                }
+                cnt -= len;
+                rxIdx += len+rxOffset;
+                continue;
+            }
+            else if (rxOffset)
+            {
+                /* Delete encapsulation -- ACP limitation */
+                if ((handle->txBuf[txIdx] & 0xff00) == 0xc900)
+                {
+                    txStrip = 1;
+                }
+                else if (handle->txBuf[txIdx] == 0xcd01)
+                {
+                    txStrip=2;
+                }
+                for (i=0; i<res_len; ++i)
+                {
+                    handle->txBuf[txIdx+i] = handle->txBuf[txIdx+i+txStrip];
+                }
+            }
+            
+            /* Update the count, rxIdx and txIdx */
+            cnt -= len;
+            rxIdx += len+rxOffset;
+            txIdx += res_len;
+        }
+        
+        /* Write the response */
+        handle->txBuf[3-txOffset-1] = txIdx-3+txOffset;
+        handle->dcs7->fxns->write(handle->dcs7,
+            &handle->txBuf[3-txOffset-1],
+            handle->params->txBufSize-(3-txOffset-1<<1));
+    }
+}
+
 /*
  *  ======== taskAfpFxn ========
  *  Audio Function Processing task function
  */
-Void taskAfpFxn(UArg a0, UArg a1)
+Void taskAfpFxn(AFP_Handle handle)
 {
-#ifdef SIMULATE_RX_ALPHA
+#ifndef SIMULATE_RX_ALPHA
+    IALG_Status *pStatus;
+    IHeap_Handle hHeap;
+    void *memSeg;
+#else // SIMULATE_RX_ALPHA
     Uint32 randVal;
     Uint32 timeout;
 #endif // SIMULATE_RX_ALPHA
     
+#ifndef SIMULATE_RX_ALPHA
+    Log_info0("TaskAfp: Enter");
+
+    if (handle == NULL)
+    {
+        handle = &AFP_OBJ;
+    }
+
+    /* Create an instance of ACP Algorithm */
+    handle->fxns->acpInit();
+    handle->acp = ACP_create(&ACP_MDS_IACP,handle->acpParams);
+    if (handle->acp == NULL)
+    {
+        //handle->fxns->log(handle,handle->logObj,
+        //    "AFP6: ACP instance creation failed");
+        Log_info0("TaskAfp: ACP instance creation failed");
+    }
+    else
+    {
+        //extern struct {
+        //   int size;
+        //} pafIdentification;
+        
+        // Get pointer to ACP Status structure
+        ((ALG_Handle)handle->acp)->fxns->algControl((IALG_Handle)(handle->acp),
+            ACP_GETSTATUSADDRESS1, 
+            (IALG_Status *)&pStatus);
+        // FL: (*** ?) Why STD BETA UART? Why not STD_BETA_ACP?
+        // Attach ACP Status structure to Beta Unit Id==STD_BETA_UART
+        handle->acp->fxns->attach(handle->acp, 
+            ACP_SERIES_STD, 
+            STD_BETA_UART, 
+            pStatus);
+
+        // Attach ACP Status structure to Beta Unit Id==STD_BETA_UART
+        handle->acp->fxns->attach(handle->acp, 
+            ACP_SERIES_STD, 
+            STD_BETA_BETATABLE, 
+            (IALG_Status *)((ACP_MDS_Obj *)handle->acp)->config.betaTable[ACP_SERIES_STD]);
+        // Attach STD Beta Table to Beta Unit Id==STD_BETA_BETATABLE
+        handle->acp->fxns->attach(handle->acp, 
+            ACP_SERIES_STD, 
+            STD_BETA_PHITABLE, 
+            (IALG_Status *)((ACP_MDS_Obj *)handle->acp)->config.phiTable[ACP_SERIES_STD]);
+        // Attach STD Sigma Table to Beta Unit Id==STD_BETA_SIGMATABLE
+        handle->acp->fxns->attach(handle->acp, 
+            ACP_SERIES_STD, 
+            STD_BETA_SIGMATABLE, 
+            (IALG_Status *)((ACP_MDS_Obj *)handle->acp)->config.sigmaTable[ACP_SERIES_STD]);
+            
+        // FL: (*** ?) STD_BETA_IDENTITY already attached in main()->systemStreamMain(), so remove this
+        // Attach PAF Identification structure to Beta Unit Id==STD_BETA_IDENTITY
+        //handle->acp->fxns->attach(handle->acp, ACP_SERIES_STD, STD_BETA_IDENTITY, 
+        //    (IALG_Status *)&pafIdentification);
+        
+        //handle->fxns->log(handle,handle->logObj,"AFP6: ACP initialized");
+        Log_info0("TaskAfp: ACP initialized");
+        
+        // Initialize DCS
+        handle->dcs7 = handle->dcs7Fxns->open(handle->params->dcs7Params,
+            handle->dcs7Config, 
+            (DCS7_Fxns_Ptr)handle->dcs7Fxns,
+            handle->acp);
+        if (handle == NULL)
+        {
+            //handle->fxns->log(handle,handle->logObj,
+            //    "AFP6: DCS6 creation failed");
+            Log_info0("TaskAfp: DCS7 creation failed");
+        }
+        else
+        {
+            Log_info0("TaskAfp: DCS7 initialized");
+            
+            hHeap = pafHeapMgr_readHeapHandle(*handle->pBufHeapId);
+            memSeg = (void *)&hHeap;
+            handle->rxBuf = (Uint16 *)handle->dcs7Fxns->memAlloc(handle->dcs7,
+                memSeg,
+                handle->params->rxBufSize,
+                4);
+            handle->txBuf = (Uint16 *)handle->dcs7Fxns->memAlloc(handle->dcs7,
+                memSeg,
+                handle->params->txBufSize,
+                4);
+            if ((handle->rxBuf == NULL) || (handle->txBuf == NULL))
+            {
+                //handle->fxns->log(handle,handle->logObj,
+                //    "AFP6: Buffer allocation failed");
+                Log_info0("TaskAfp: Buffer allocation failed");
+            }
+            else
+            {
+                //handle->fxns->log(handle,handle->logObj,"AFP6: AFP6 initialized");
+                Log_info0("TaskAfp: Initialized");
+
+                // Process alpha commands
+                handle->fxns->process(handle);
+            }
+        }
+    }
+
+    /* Terminate AFP */
+    handle->fxns->acpExit();
+    Log_info0("TaskAfp: Exit");
+    Task_setPri(TaskAfp, -1);
+    Task_yield();
+#else // SIMULATE_RX_ALPHA
     //System_printf("Enter taskAfpFxn()\n");
     Log_info0("Enter taskAfpFxn()");
 
-#ifdef SIMULATE_RX_ALPHA
     for (;;)
     {
         /* Compute next time out for one-shot timer */
@@ -46,8 +346,32 @@ Void taskAfpFxn(UArg a0, UArg a1)
 
         gTaskAfpCnt++;
     }
-#endif // SIMULATE_RX_ALPHA
     
     //System_printf("Exit taskAfpFxn()\n");
     Log_info0("Exit taskAfpFxn()");
+#endif // SIMULATE_RX_ALPHA
 }
+
+const AFP_Fxns AFP_DEFAULT_FXNS = {
+//    AFP_log,
+    AFP_memAlloc,
+    AFP_process,
+    ACP_MDS_init,
+    ACP_MDS_exit
+};
+
+AFP_Obj AFP_OBJ = {
+    sizeof(AFP_Obj),
+    &AFP_DEFAULT_FXNS,
+    &AFP_PARAMS,
+    NULL,
+    &DCS7_FXNS,
+    NULL,
+    NULL,
+    (ACP_Params*)&ACP_PARAMS,
+    NULL,
+    NULL,
+    (Int *)&gPafHeapIdExt,
+    (Int *)&gPafHeapIdExt,
+//    NULL,
+};
index f47832e15d9a5af0ac4ac35c93b01113c2fb552a..1f3ef4615e182013195148524a4172abfa2e9b10 100644 (file)
@@ -7,7 +7,42 @@
  
 #include <xdc/std.h>
 
+#include <acp.h>
+//#include <acp_mds.h>
+//#include <acp_mds_priv.h>
+#include "dcs7.h"
+#include "alphaFuncProcParams.h"
+
 // Global debug counters */
 extern Uint32 gTaskAfpCnt; // debug counter for AFP task
 
+/* AFP Handle */
+typedef struct AFP_Obj *AFP_Handle;
+
+/* AFP Function Table */
+typedef struct AFP_Fxns {
+    //void   (*log)(AFP_Handle, void *, char *); // FL: leave dedicated log out for now
+    void * (*memAlloc)(AFP_Handle, Int32 *, UInt32, UInt32);
+    void   (*process)(AFP_Handle);    
+    void   (*acpInit)(void);
+    void   (*acpExit)(void);
+} AFP_Fxns;
+
+/* AFP Object */
+typedef struct AFP_Obj {
+    Uint32 size;
+    const AFP_Fxns *fxns;
+    const AFP_Params *params;
+    DCS7_Handle dcs7;
+    const DCS7_Fxns *dcs7Fxns;
+    const DCS7_Config *dcs7Config;
+    ACP_Handle acp;
+    ACP_Params *acpParams;
+    Uint16 *rxBuf;
+    Uint16 *txBuf;
+    Int *pBufHeapId;
+    Int *pObjHeapId;
+    //void *logObj;
+} AFP_Obj;
+
 #endif /* _AFP_H_ */
diff --git a/procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProcParams.c b/procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProcParams.c
new file mode 100644 (file)
index 0000000..772f3a9
--- /dev/null
@@ -0,0 +1,18 @@
+#include <alphaFuncProcParams.h>
+#include <dcs7_params.h>
+
+const AFP_Params AFP_PARAMS = {
+    sizeof(AFP_Params),
+    /* AFP uses the default DCS7 parameters "DCS7_PARAMS". The user can 
+       customize the DCS7 behaviour by changing the DCS7 parameters. Refer
+       the DCS7 parametrization for more details */
+    &DCS7_PARAMS,
+    /* The AFP receive and transmit buffer sizes should be selected based 
+       on the max payload size supported by the application. The AFP module
+       accepts and processes one payload at a time. Hence the receive buffer
+       should be large enough to hold a incoming payload of max size and the
+       transmit buffer should be large enough to hold the generated response
+       payload */
+    512,
+    512,
+};
diff --git a/procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProcParams.h b/procsdk_audio_x_xx_xx_xx/test_dsp/framework/alphaFuncProcParams.h
new file mode 100644 (file)
index 0000000..7b4a556
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _AFP_PARAMS_H_
+#define _AFP_PARAMS_H_
+
+#include <xdc/std.h>
+
+#include <dcs7_params.h>
+
+typedef struct AFP_Params {
+    Uint32 size;                    /* size of the structure */
+    const DCS7_Params *dcs7Params;  /* Reference to DCS7 module parameters */
+    Uint16 rxBufSize;               /* receive buffer size */
+    Uint16 txBufSize;               /* transmit buffer size */
+} AFP_Params;
+
+extern const AFP_Params AFP_PARAMS;
+
+#endif /* _AFP_PARAMS_H_ */