Update repo
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_empty"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../empty.c" targetDirectory="" />
|
||||
<file action="copy" path="../empty.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex10_timer_two_states"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex10_timer_two_states.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex10_timer_two_states.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex11_interrupt_tag"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex11_interrupt_tag.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex11_interrupt_tag.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex12_output_intersect"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex12_output_intersect.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex12_output_intersect.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex13_push_pull"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex13_push_pull.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex13_push_pull.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex14_multi_tile"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex14_multi_tile.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex14_multi_tile.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex15_tile_to_tile_delay"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex15_tile_to_tile_delay.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex15_tile_to_tile_delay.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex17_one_shot_pwm"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex17_one_shot_pwm.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex17_one_shot_pwm.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex18_aoc"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex18_aoc.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex18_aoc.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex19_aoc_release_control"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex19_aoc_release_control.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex19_aoc_release_control.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex1_combinatorial_logic"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex1_combinatorial_logic.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex1_combinatorial_logic.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex20_clbxbars"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex20_clbxbars.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex20_clbxbars.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex21_clockprescalar_nmi"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex21_clockprescalar_nmi.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex21_clockprescalar_nmi.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex22_serializer"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex22_serializer.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex22_serializer.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex23_lfsr"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex23_lfsr.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex23_lfsr.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex24_lock_output_mask"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex24_lock_output_mask.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex24_lock_output_mask.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex25_input_pipeline"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex25_input_pipeline.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex25_input_pipeline.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex26_clocking_pipeline"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex26_clocking_pipeline.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex26_clocking_pipeline.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex27_spi_data_export"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex27_spi_data_export.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex27_spi_data_export.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex28_spi_data_export_dma"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex28_spi_data_export_dma.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex28_spi_data_export_dma.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex29_timestamp"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex29_timestamp.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex29_timestamp.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex2_gpio_input_filter"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex2_gpio_input_filter.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex2_gpio_input_filter.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex30_cyclic_redundancy_check"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex30_cyclic_redundancy_check.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex30_cyclic_redundancy_check.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex3_auxiliary_pwm"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex3_auxiliary_pwm.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex3_auxiliary_pwm.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex4_pwm_protection"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex4_pwm_protection.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex4_pwm_protection.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex5_event_window"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex5_event_window.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex5_event_window.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex6_siggen"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex6_siggen.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex6_siggen.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex7_state_machine"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex7_state_machine.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex7_state_machine.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex8_external_signal_AND_gate"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex8_external_signal_AND_gate.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex8_external_signal_AND_gate.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="clb_ex9_timer"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../clb_ex9_timer.c" targetDirectory="" />
|
||||
<file action="copy" path="../clb_ex9_timer.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,128 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex10_timer_two_states.c
|
||||
//
|
||||
// TITLE: CLB Timer Two States.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Timer Two States</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, the timer is setup the same as the previous example. The
|
||||
//! difference is the use of the FSM submodule to toggle the output of the CLB
|
||||
//! which is then exported to a GPIO. The FSM module acts as a single bit memory
|
||||
//! block. Interrupts are setup in the same format as the previous example. The
|
||||
//! interrupt delay of the CLB can be seen by comparing the output of the CLB
|
||||
//! and the GPIO toggled in the ISR.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
#define RESET_TIMER 1
|
||||
#define ENABLE_TIMER 2
|
||||
#define COUNTUP_MODE 4
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
CLB_setGPREG(myTILE1_BASE, ENABLE_TIMER | COUNTUP_MODE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
SysCtl_delay(20000000);
|
||||
// Change Timer Value to 2000
|
||||
CLB_configCounterLoadMatch(myTILE1_BASE, CLB_CTR0, 0, 2000, 0);
|
||||
SysCtl_delay(20000000);
|
||||
// Change Timer Value to 1000
|
||||
CLB_configCounterLoadMatch(myTILE1_BASE, CLB_CTR0, 0, 1000, 0);
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
GPIO_togglePin(myGPIO0);
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 50;
|
||||
TILE1.BOUNDARY.in_period0 = 10000;
|
||||
TILE1.BOUNDARY.in_duty0 = 5001;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 3000;
|
||||
TILE1.BOUNDARY.in_duty2 = 1500;
|
||||
TILE1.BOUNDARY.boundaryInput1 = "1";
|
||||
TILE1.BOUNDARY.boundaryInput2 = "1";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_0.eqn_s0 = "e0 ^ s0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.action = "Load";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in1";
|
||||
TILE1.COUNTER_0.mode1 = "BOUNDARY.in2";
|
||||
TILE1.COUNTER_0.match1_val = "1000";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,130 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex11_interrupt_tag.c
|
||||
//
|
||||
// TITLE: CLB Interrupt Tag.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Interrupt Tag</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, a timer is setup with two different match values. These
|
||||
//! two events are used by the HLC submodule to generate interrupts. The interrupt
|
||||
//! TAG is used to differentiate between the interrupt generated due to the match1
|
||||
//! event of the CLB counter and the match2 event of the CLB counter.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
#define COUNTER0_TIMER_ENABLE 0x1
|
||||
|
||||
|
||||
#define COUNTER0_INT_TAG 11
|
||||
#define COUNTER1_INT_TAG 12
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
CLB_setGPREG(myTILE1_BASE, COUNTER0_TIMER_ENABLE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
uint16_t tag = CLB_getInterruptTag(myTILE1_BASE);
|
||||
if (tag == COUNTER0_INT_TAG)
|
||||
{
|
||||
GPIO_togglePin(myGPIO0);
|
||||
}
|
||||
if (tag == COUNTER1_INT_TAG)
|
||||
{
|
||||
GPIO_togglePin(myGPIO1);
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const outputxbar2 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
gpio2.$name = "myGPIO1";
|
||||
gpio2.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio2.gpioPin.$assign = "GPIO1";
|
||||
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
outputxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
outputxbar2.mux3Config = "XBAR_OUT_MUX03_CLB1_OUT5";
|
||||
outputxbar2.$name = "myOUTPUTXBAR7";
|
||||
outputxbar2.outputxbar.$assign = "OUTPUTXBAR7";
|
||||
outputxbar2.outputxbar.outputxbarPin.$assign = "GPIO16";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 50;
|
||||
TILE1.BOUNDARY.in_period0 = 10000;
|
||||
TILE1.BOUNDARY.in_duty0 = 5001;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 3000;
|
||||
TILE1.BOUNDARY.in_duty2 = 1500;
|
||||
TILE1.BOUNDARY.boundaryInput1 = "1";
|
||||
TILE1.BOUNDARY.boundaryInput2 = "1";
|
||||
TILE1.BOUNDARY.in_period3 = 10000;
|
||||
TILE1.BOUNDARY.in_duty3 = 5001;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 50;
|
||||
TILE1.BOUNDARY.boundaryInput3 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput4 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput5 = "0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.match1_val = "700";
|
||||
TILE1.COUNTER_0.event = "COUNTER_0.count_zero";
|
||||
TILE1.COUNTER_0.match2_val = "1600";
|
||||
TILE1.COUNTER_0.event_load_val = "2000";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.action = "Load";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_4.i0 = "COUNTER_0.count_match1";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_5.eqn = "i0";
|
||||
TILE1.OUTLUT_5.i0 = "COUNTER_0.count_match2";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.e1 = "COUNTER_0.count_match2";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 11";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program1.instruct0 = "INTR 12";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,269 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex12_output_intersect.c
|
||||
//
|
||||
// TITLE: CLB Output Intersect.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Output Intersect</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, the CLB module is set up the same as the external_AND_gate
|
||||
//! example. However, instead of the output being exported to the GPIO using Output
|
||||
//! X-BAR, the output is exported to the GPIO by replacing the output of ePWM1.
|
||||
//! This is done by configuring the GPIO for EPWM1A output, followed by enabling
|
||||
//! output intersection.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
|
||||
#define EPWM_TIMER_TBPRD 2000
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
void initEPWM(uint32_t epwm_base);
|
||||
void initOff180EPWM(uint32_t epwm_base);
|
||||
uint16_t dutyValue = 0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Disable sync(Freeze clock to PWM as well)
|
||||
//
|
||||
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
initEPWM(myEPWM2_BASE);
|
||||
initOff180EPWM(myEPWM3_BASE);
|
||||
EPWM_setupEPWMLinks(myEPWM3_BASE, EPWM_LINK_WITH_EPWM_2, EPWM_LINK_COMP_A);
|
||||
EPWM_setSyncInPulseSource(myEPWM3_BASE, EPWM_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM2);
|
||||
EPWM_enableSyncOutPulseSource(myEPWM2_BASE, EPWM_SYNC_OUT_PULSE_ON_CNTR_ZERO);
|
||||
EPWM_enablePhaseShiftLoad(myEPWM3_BASE);
|
||||
//
|
||||
// Enable sync and clock to PWM
|
||||
//
|
||||
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
//EPWM1A is EPWM2A ANDED with EPWM3A
|
||||
|
||||
for(;;)
|
||||
{
|
||||
SysCtl_delay(100000);
|
||||
dutyValue ++;
|
||||
if (dutyValue >= EPWM_TIMER_TBPRD)
|
||||
dutyValue = 0;
|
||||
EPWM_setCounterCompareValue(myEPWM2_BASE, EPWM_COUNTER_COMPARE_A, dutyValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
void initEPWM(uint32_t epwm_base)
|
||||
{
|
||||
//
|
||||
// Set-up TBCLK
|
||||
//
|
||||
EPWM_setTimeBasePeriod(epwm_base, EPWM_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(epwm_base, 0U);
|
||||
EPWM_setTimeBaseCounter(epwm_base, 0U);
|
||||
|
||||
//
|
||||
// Set Compare values
|
||||
//
|
||||
EPWM_setCounterCompareValue(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_A,
|
||||
2*EPWM_TIMER_TBPRD/3);
|
||||
EPWM_setCounterCompareValue(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_B,
|
||||
2*EPWM_TIMER_TBPRD/3);
|
||||
|
||||
//
|
||||
// Set up counter mode
|
||||
//
|
||||
EPWM_setTimeBaseCounterMode(epwm_base, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_disablePhaseShiftLoad(epwm_base);
|
||||
EPWM_setClockPrescaler(epwm_base,
|
||||
EPWM_CLOCK_DIVIDER_8,
|
||||
EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
//
|
||||
// Set up shadowing
|
||||
//
|
||||
EPWM_setCounterCompareShadowLoadMode(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_A,
|
||||
EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_B,
|
||||
EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
//
|
||||
// Set actions
|
||||
//
|
||||
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_HIGH,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
|
||||
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_B,
|
||||
EPWM_AQ_OUTPUT_HIGH,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_LOW,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_B,
|
||||
EPWM_AQ_OUTPUT_LOW,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void initOff180EPWM(uint32_t epwm_base)
|
||||
{
|
||||
//
|
||||
// Set-up TBCLK
|
||||
//
|
||||
EPWM_selectPeriodLoadEvent(epwm_base, EPWM_SHADOW_LOAD_MODE_SYNC);
|
||||
EPWM_setTimeBasePeriod(epwm_base, EPWM_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(epwm_base, EPWM_TIMER_TBPRD/2);
|
||||
EPWM_setTimeBaseCounter(epwm_base, EPWM_TIMER_TBPRD/2);
|
||||
|
||||
//
|
||||
// Set Compare values
|
||||
//
|
||||
EPWM_setCounterCompareValue(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_A,
|
||||
2*EPWM_TIMER_TBPRD/3);
|
||||
EPWM_setCounterCompareValue(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_B,
|
||||
2*EPWM_TIMER_TBPRD/3);
|
||||
|
||||
//
|
||||
// Set up counter mode
|
||||
//
|
||||
EPWM_setTimeBaseCounterMode(epwm_base, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_disablePhaseShiftLoad(epwm_base);
|
||||
EPWM_setClockPrescaler(epwm_base,
|
||||
EPWM_CLOCK_DIVIDER_8,
|
||||
EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
//
|
||||
// Set up shadowing
|
||||
//
|
||||
EPWM_setCounterCompareShadowLoadMode(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_A,
|
||||
EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(epwm_base,
|
||||
EPWM_COUNTER_COMPARE_B,
|
||||
EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
//
|
||||
// Set actions
|
||||
//
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_HIGH,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_B,
|
||||
EPWM_AQ_OUTPUT_HIGH,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_LOW,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
EPWM_setActionQualifierAction(epwm_base,
|
||||
EPWM_AQ_OUTPUT_B,
|
||||
EPWM_AQ_OUTPUT_LOW,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const epwm2 = epwm.addInstance();
|
||||
const epwm3 = epwm.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM2A";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM3A";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.outputsToOverridePeripheral = ["CLB_OUT0"];
|
||||
|
||||
epwm1.useCase = "CUSTOM";
|
||||
epwm1.useInterfacePins = ["EPWM#A"];
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
|
||||
epwm2.$name = "myEPWM2";
|
||||
epwm2.useCase = "CUSTOM";
|
||||
epwm2.useInterfacePins = ["EPWM#A"];
|
||||
epwm2.epwm.$assign = "EPWM2";
|
||||
epwm2.epwm.epwmaPin.$assign = "GPIO2";
|
||||
|
||||
epwm3.$name = "myEPWM3";
|
||||
epwm3.useCase = "CUSTOM";
|
||||
epwm3.useInterfacePins = ["EPWM#A"];
|
||||
epwm3.epwm.$assign = "EPWM3";
|
||||
epwm3.epwm.epwmaPin.$assign = "GPIO4";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 50;
|
||||
TILE1.BOUNDARY.in_period2 = 3000;
|
||||
TILE1.BOUNDARY.in_duty2 = 1500;
|
||||
TILE1.BOUNDARY.in_period3 = 10000;
|
||||
TILE1.BOUNDARY.in_duty3 = 5001;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 50;
|
||||
TILE1.BOUNDARY.boundaryInput3 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput4 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput5 = "0";
|
||||
TILE1.BOUNDARY.in_period0 = 500;
|
||||
TILE1.BOUNDARY.in_duty0 = 250;
|
||||
TILE1.BOUNDARY.boundaryInput1 = "squareWave";
|
||||
TILE1.BOUNDARY.in_period1 = 750;
|
||||
TILE1.BOUNDARY.in_duty1 = 250;
|
||||
TILE1.BOUNDARY.boundaryInput2 = "0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE1.LUT_0.eqn = "i0 & i1";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.eqn = "i0";
|
||||
TILE1.OUTLUT_0.i0 = "LUT_0.OUT";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 11";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program1.instruct0 = "INTR 12";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,129 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex13_push_pull.c
|
||||
//
|
||||
// TITLE: CLB PUSH PULL.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB PUSH PULL</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, the use of the PUSH-PULL interface is shown. Multiple
|
||||
//! COUNTER submodules, HLC submodule, FSM submodules, and OUTLUT submodules
|
||||
//! are used. The PUSH-PULL interface is used alongside the GP register to
|
||||
//! update the COUNTER submodulesâ event frequencies.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
#define FRC_LOAD 0x1
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
while(1)
|
||||
{
|
||||
SysCtl_delay(20000000);
|
||||
HWREG(myTILE1_BASE + CLB_LOGICCTL + CLB_O_BUF_PTR) = 0U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(0)) = 500U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(1)) = 1000U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(2)) = 2000U;
|
||||
CLB_setGPREG(myTILE1_BASE, FRC_LOAD);
|
||||
CLB_setGPREG(myTILE1_BASE, 0);
|
||||
SysCtl_delay(20000000);
|
||||
HWREG(myTILE1_BASE + CLB_LOGICCTL + CLB_O_BUF_PTR) = 0U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(0)) = 1000U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(1)) = 2000U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(2)) = 4000U;
|
||||
CLB_setGPREG(myTILE1_BASE, FRC_LOAD);
|
||||
CLB_setGPREG(myTILE1_BASE, 0);
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.outputsToOverridePeripheral = ["CLB_OUT0","CLB_OUT2"];
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 50;
|
||||
TILE1.BOUNDARY.in_period0 = 10000;
|
||||
TILE1.BOUNDARY.in_duty0 = 5001;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 3000;
|
||||
TILE1.BOUNDARY.in_duty2 = 1500;
|
||||
TILE1.BOUNDARY.in_period3 = 10000;
|
||||
TILE1.BOUNDARY.in_duty3 = 5001;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 50;
|
||||
TILE1.BOUNDARY.boundaryInput3 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput4 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput5 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput1 = "0";
|
||||
TILE1.BOUNDARY.boundaryInput2 = "0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_0.eqn_s0 = "e0 ^ s0";
|
||||
TILE1.FSM_0.eqn_s1 = "e1 ^ s1";
|
||||
TILE1.FSM_0.e1 = "COUNTER_1.count_match1";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_1.e0 = "COUNTER_2.count_match1";
|
||||
TILE1.FSM_1.eqn_s0 = "e0 ^ s0";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.action = "Load";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.match1_val = "2000";
|
||||
TILE1.COUNTER_0.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.reset = "COUNTER_1.count_match1";
|
||||
TILE1.COUNTER_1.mode0 = "1";
|
||||
TILE1.COUNTER_1.mode1 = "1";
|
||||
TILE1.COUNTER_1.match1_val = "4000";
|
||||
TILE1.COUNTER_1.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_1.action = "Load";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.COUNTER_2.reset = "COUNTER_2.count_match1";
|
||||
TILE1.COUNTER_2.mode0 = "1";
|
||||
TILE1.COUNTER_2.mode1 = "1";
|
||||
TILE1.COUNTER_2.match1_val = "8000";
|
||||
TILE1.COUNTER_2.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_2.action = "Load";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_0.eqn = "i0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_2.eqn = "i0";
|
||||
TILE1.OUTLUT_2.i0 = "FSM_0.S1";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_1.S0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "BOUNDARY.in0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "PULL R0";
|
||||
TILE1.HLC.program0.instruct1 = "MOV_T1 R0,C0";
|
||||
TILE1.HLC.program0.instruct2 = "PULL R0";
|
||||
TILE1.HLC.program0.instruct3 = "MOV_T1 R0,C1";
|
||||
TILE1.HLC.program0.instruct4 = "PULL R0";
|
||||
TILE1.HLC.program0.instruct5 = "MOV_T1 R0,C2";
|
||||
TILE1.HLC.program0.instruct6 = "PULL R0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,99 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex14_multi_tile.c
|
||||
//
|
||||
// TITLE: CLB Multi Tile.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Multi Tile</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the output of a CLB TILE is passed to the input of another
|
||||
//! CLB TILE. The output of the second CLB TILE is then exported to a GPIO,
|
||||
//! showcasing how two CLB TILEs can be used in series.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enabling CLB1/2
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
initTILE2(myTILE2_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
|
||||
clb2.$name = "myTILE2";
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.enableCLB = true;
|
||||
clb2.outputsToOverridePeripheral = ["CLB_OUT0"];
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR1";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
|
||||
epwm1.useCase = "CUSTOM";
|
||||
epwm1.useInterfacePins = ["EPWM#A"];
|
||||
epwm1.$name = "myEPWM2";
|
||||
epwm1.epwm.$assign = "EPWM2";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO2";
|
||||
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio"];
|
||||
inputxbar1.inputxbar1Gpio = "GPIO2";
|
||||
inputxbar1.$name = "myINPUTXBAR1";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE2";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 50;
|
||||
TILE1.BOUNDARY.in_period0 = 10000;
|
||||
TILE1.BOUNDARY.in_duty0 = 5001;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 3000;
|
||||
TILE1.BOUNDARY.in_duty2 = 1500;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.match1_val = "1000";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.i0 = "COUNTER_0.count_match1";
|
||||
TILE1.OUTLUT_0.eqn = "i0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
TILE2.$name = "TILE1";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.BOUNDARY.boundaryInput0 = "tileOutput";
|
||||
TILE2.BOUNDARY.tileSelect0 = "TILE2";
|
||||
TILE2.BOUNDARY.tileOutputSelect0 = 0;
|
||||
TILE2.BOUNDARY.input_pipeline0 = true;
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE2.FSM_0.eqn_s0 = "e0 ^ s0";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_4.i0 = "FSM_0.S0";
|
||||
TILE2.OUTLUT_4.eqn = "i0";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE2.AOC_0.$name = "AOC_8";
|
||||
TILE2.AOC_1.$name = "AOC_9";
|
||||
TILE2.AOC_2.$name = "AOC_10";
|
||||
TILE2.AOC_3.$name = "AOC_11";
|
||||
TILE2.AOC_4.$name = "AOC_12";
|
||||
TILE2.AOC_5.$name = "AOC_13";
|
||||
TILE2.AOC_6.$name = "AOC_14";
|
||||
TILE2.AOC_7.$name = "AOC_15";
|
||||
@@ -0,0 +1,215 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex15_tile_to_tile_delay.c
|
||||
//
|
||||
// TITLE: CLB Tile to Tile Delay.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Tile to Tile Delay</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the output of a GPIO is taken into the CLB TILE through
|
||||
//! INPUT XBAR and the CLB XBAR. The signal is forwarded by the TILE to the
|
||||
//! next TILE. This time the signal only goes through the CLB XBAR and NOT
|
||||
//! the Input XBAR. This is done to show that delays are added when the signals
|
||||
//! are passed from TILE to TILE and the delay is NOT characterized. The user
|
||||
//! should always avoid passing signals with timing requirements between tiles.
|
||||
//! The COUNTER modules inside the CLBs will count the amount of delay in cycles.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
uint32_t clb1delay = 0;
|
||||
uint32_t clb2delay = 0;
|
||||
uint32_t clb3delay = 0;
|
||||
uint32_t clb4delay = 0;
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
__interrupt void clb2ISR(void);
|
||||
__interrupt void clb3ISR(void);
|
||||
__interrupt void clb4ISR(void);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
GPIO_writePin(0, 0);
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
Interrupt_register(INT_CLB2, &clb2ISR);
|
||||
Interrupt_enable(INT_CLB2);
|
||||
|
||||
Interrupt_register(INT_CLB3, &clb3ISR);
|
||||
Interrupt_enable(INT_CLB3);
|
||||
|
||||
Interrupt_register(INT_CLB4, &clb4ISR);
|
||||
Interrupt_enable(INT_CLB4);
|
||||
|
||||
//
|
||||
// Enabling EPWM1/2/3/4 to enable CLB1/2/3/4
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM1);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM2);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM3);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM4);
|
||||
|
||||
//
|
||||
// Enabling CLB1/2/3/4
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB3);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB4);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
initTILE2(myTILE2_BASE);
|
||||
initTILE3(myTILE3_BASE);
|
||||
initTILE4(myTILE4_BASE);
|
||||
|
||||
//
|
||||
// Uncomment to enable asynchronous GPIO inputs
|
||||
//
|
||||
//GPIO_setQualificationMode(0, GPIO_QUAL_ASYNC);
|
||||
//GPIO_setQualificationMode(24, GPIO_QUAL_ASYNC);
|
||||
//GPIO_setQualificationMode(16, GPIO_QUAL_ASYNC);
|
||||
//GPIO_setQualificationMode(14, GPIO_QUAL_ASYNC);
|
||||
//GPIO_setQualificationMode(15, GPIO_QUAL_ASYNC);
|
||||
//GPIO_setQualificationMode(1, GPIO_QUAL_ASYNC);
|
||||
//GPIO_setQualificationMode(5, GPIO_QUAL_ASYNC);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
CLB_clearInterruptTag(myTILE2_BASE);
|
||||
CLB_clearInterruptTag(myTILE3_BASE);
|
||||
CLB_clearInterruptTag(myTILE4_BASE);
|
||||
|
||||
SysCtl_delay(1000);
|
||||
GPIO_writePin(0, 1);
|
||||
|
||||
SysCtl_delay(10000);
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Read the clbxdelay values to see how many cycles of delay
|
||||
// was detected.
|
||||
//
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
uint16_t tag = CLB_getInterruptTag(myTILE1_BASE);
|
||||
if (tag == 1)
|
||||
{
|
||||
clb1delay = CLB_getRegister(myTILE1_BASE, CLB_REG_CTR_C0);
|
||||
//ESTOP0;
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb2ISR(void)
|
||||
{
|
||||
uint16_t tag = CLB_getInterruptTag(myTILE2_BASE);
|
||||
if (tag == 1)
|
||||
{
|
||||
clb2delay = CLB_getRegister(myTILE2_BASE, CLB_REG_CTR_C0);
|
||||
//ESTOP0;
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(myTILE2_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb3ISR(void)
|
||||
{
|
||||
uint16_t tag = CLB_getInterruptTag(myTILE3_BASE);
|
||||
if (tag == 1)
|
||||
{
|
||||
clb3delay = CLB_getRegister(myTILE3_BASE, CLB_REG_CTR_C0);
|
||||
//ESTOP0;
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(myTILE3_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb4ISR(void)
|
||||
{
|
||||
uint16_t tag = CLB_getInterruptTag(myTILE4_BASE);
|
||||
if (tag == 1)
|
||||
{
|
||||
clb4delay = CLB_getRegister(myTILE4_BASE, CLB_REG_CTR_C0);
|
||||
//ESTOP0;
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(myTILE4_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clb3 = clb.addInstance();
|
||||
const clb4 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const clbxbar2 = clbxbar.addInstance();
|
||||
const clbxbar3 = clbxbar.addInstance();
|
||||
const clbxbar4 = clbxbar.addInstance();
|
||||
const clbxbar5 = clbxbar.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const epwm2 = epwm.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const outputxbar2 = outputxbar.addInstance();
|
||||
const outputxbar3 = outputxbar.addInstance();
|
||||
const outputxbar4 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
const TILE3 = TILE.addInstance();
|
||||
const TILE4 = TILE.addInstance();
|
||||
const clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
const clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
const clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
const clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.outputsToOverridePeripheral = ["CLB_OUT2"];
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.$name = "myTILE2";
|
||||
clb2.enableCLB = true;
|
||||
clb2.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb2.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb2.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb2.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb2.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG2";
|
||||
clb2.synchronizeCLB_IN0 = true;
|
||||
clb2.synchronizeCLB_IN1 = true;
|
||||
|
||||
clb3.clbBase = "CLB3_BASE";
|
||||
clb3.$name = "myTILE3";
|
||||
clb3.enableCLB = true;
|
||||
clb3.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb3.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb3.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb3.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb3.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG3";
|
||||
clb3.outputsToOverridePeripheral = ["CLB_OUT2"];
|
||||
clb3.synchronizeCLB_IN0 = true;
|
||||
clb3.synchronizeCLB_IN1 = true;
|
||||
|
||||
clb4.clbBase = "CLB4_BASE";
|
||||
clb4.$name = "myTILE4";
|
||||
clb4.enableCLB = true;
|
||||
clb4.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb4.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb4.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb4.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb4.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG4";
|
||||
clb4.synchronizeCLB_IN0 = true;
|
||||
clb4.synchronizeCLB_IN1 = true;
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
clbxbar2.$name = "myCLBXBAR1";
|
||||
clbxbar2.auxInput = "XBAR_AUXSIG1";
|
||||
clbxbar2.muxesUsed = ["XBAR_MUX05"];
|
||||
clbxbar2.mux5Config = "XBAR_CLB_MUX05_CLB2_OUT4";
|
||||
|
||||
clbxbar3.$name = "myCLBXBAR2";
|
||||
clbxbar3.auxInput = "XBAR_AUXSIG2";
|
||||
clbxbar3.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar3.mux1Config = "XBAR_CLB_MUX01_CLB1_OUT4";
|
||||
|
||||
clbxbar4.$name = "myCLBXBAR3";
|
||||
clbxbar4.auxInput = "XBAR_AUXSIG3";
|
||||
clbxbar4.muxesUsed = ["XBAR_MUX03"];
|
||||
clbxbar4.mux3Config = "XBAR_CLB_MUX03_INPUTXBAR2";
|
||||
|
||||
clbxbar5.$name = "myCLBXBAR4";
|
||||
clbxbar5.auxInput = "XBAR_AUXSIG4";
|
||||
clbxbar5.muxesUsed = ["XBAR_MUX05"];
|
||||
clbxbar5.mux5Config = "XBAR_CLB_MUX05_INPUTXBAR3";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.useCase = "CUSTOM";
|
||||
epwm1.useInterfacePins = ["EPWM#B"];
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
epwm2.$name = "myEPWM3";
|
||||
epwm2.useCase = "CUSTOM";
|
||||
epwm2.useInterfacePins = ["EPWM#B"];
|
||||
epwm2.epwm.$assign = "EPWM3";
|
||||
epwm2.epwm.epwmbPin.$assign = "GPIO5";
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
inputxbar1.$name = "myINPUTXBAR0";
|
||||
inputxbar1.inputxbar3Gpio = "GPIO14";
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio","inputxbar2Gpio","inputxbar3Gpio"];
|
||||
inputxbar1.inputxbar2Gpio = "GPIO15";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
outputxbar2.$name = "myOUTPUTXBAR7";
|
||||
outputxbar2.muxesUsed = ["XBAR_MUX05"];
|
||||
outputxbar2.mux5Config = "XBAR_OUT_MUX05_CLB2_OUT4";
|
||||
outputxbar2.outputxbar.$assign = "OUTPUTXBAR7";
|
||||
outputxbar2.outputxbar.outputxbarPin.$assign = "GPIO16";
|
||||
|
||||
outputxbar3.$name = "myOUTPUTXBAR3";
|
||||
outputxbar3.muxesUsed = ["XBAR_MUX09"];
|
||||
outputxbar3.mux9Config = "XBAR_OUT_MUX09_CLB3_OUT4";
|
||||
outputxbar3.outputxbar.$assign = "OUTPUTXBAR3";
|
||||
outputxbar3.outputxbar.outputxbarPin.$assign = "GPIO14";
|
||||
|
||||
outputxbar4.$name = "myOUTPUTXBAR4";
|
||||
outputxbar4.muxesUsed = ["XBAR_MUX13"];
|
||||
outputxbar4.mux13Config = "XBAR_OUT_MUX13_CLB4_OUT4";
|
||||
outputxbar4.outputxbar.$assign = "OUTPUTXBAR4";
|
||||
outputxbar4.outputxbar.outputxbarPin.$assign = "GPIO15";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput1 = "tileOutput";
|
||||
TILE1.BOUNDARY.tileSelect1 = "TILE2";
|
||||
TILE1.BOUNDARY.tileOutputSelect1 = 4;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_edge0 = "rising edge";
|
||||
TILE1.BOUNDARY.in_period0 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 500;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 1;
|
||||
TILE1.BOUNDARY.input_pipeline1 = true;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE1.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE1.FSM_0.eqn_s0 = "e0&!e1";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_2.i0 = "BOUNDARY.in1";
|
||||
TILE1.OUTLUT_2.eqn = "i0";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "BOUNDARY.in0";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "BOUNDARY.in1";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
|
||||
TILE2.$name = "TILE2";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.BOUNDARY.boundaryInput1 = "tileOutput";
|
||||
TILE2.BOUNDARY.tileSelect1 = "TILE1";
|
||||
TILE2.BOUNDARY.tileOutputSelect1 = 4;
|
||||
TILE2.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE2.BOUNDARY.in_edge0 = "rising edge";
|
||||
TILE2.BOUNDARY.in_period0 = 1000;
|
||||
TILE2.BOUNDARY.in_duty0 = 500;
|
||||
TILE2.BOUNDARY.in_repeat_count0 = 1;
|
||||
TILE2.BOUNDARY.input_pipeline1 = true;
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE2.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE2.FSM_0.eqn_s0 = "e0&!e1";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE2.COUNTER_0.mode1 = "1";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_4.i0 = "BOUNDARY.in0";
|
||||
TILE2.OUTLUT_4.eqn = "i0";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.e0 = "BOUNDARY.in1";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE3.$name = "TILE3";
|
||||
TILE3.BOUNDARY.$name = "BOUNDARY2";
|
||||
TILE3.BOUNDARY.boundaryInput1 = "tileOutput";
|
||||
TILE3.BOUNDARY.tileSelect1 = "TILE4";
|
||||
TILE3.BOUNDARY.tileOutputSelect1 = 4;
|
||||
TILE3.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE3.BOUNDARY.in_edge0 = "rising edge";
|
||||
TILE3.BOUNDARY.in_period0 = 1000;
|
||||
TILE3.BOUNDARY.in_duty0 = 500;
|
||||
TILE3.BOUNDARY.in_repeat_count0 = 1;
|
||||
TILE3.BOUNDARY.input_pipeline1 = true;
|
||||
TILE3.LUT_0.$name = "LUT_6";
|
||||
TILE3.LUT_1.$name = "LUT_7";
|
||||
TILE3.LUT_2.$name = "LUT_8";
|
||||
TILE3.FSM_0.$name = "FSM_6";
|
||||
TILE3.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE3.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE3.FSM_0.eqn_s0 = "e0&!e1";
|
||||
TILE3.FSM_1.$name = "FSM_7";
|
||||
TILE3.FSM_2.$name = "FSM_8";
|
||||
TILE3.COUNTER_0.$name = "COUNTER_6";
|
||||
TILE3.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE3.COUNTER_0.mode1 = "1";
|
||||
TILE3.COUNTER_1.$name = "COUNTER_7";
|
||||
TILE3.COUNTER_2.$name = "COUNTER_8";
|
||||
TILE3.OUTLUT_0.$name = "OUTLUT_16";
|
||||
TILE3.OUTLUT_1.$name = "OUTLUT_17";
|
||||
TILE3.OUTLUT_2.$name = "OUTLUT_18";
|
||||
TILE3.OUTLUT_2.i0 = "BOUNDARY.in1";
|
||||
TILE3.OUTLUT_2.eqn = "i0";
|
||||
TILE3.OUTLUT_3.$name = "OUTLUT_19";
|
||||
TILE3.OUTLUT_4.$name = "OUTLUT_20";
|
||||
TILE3.OUTLUT_4.i0 = "BOUNDARY.in0";
|
||||
TILE3.OUTLUT_4.eqn = "i0";
|
||||
TILE3.OUTLUT_5.$name = "OUTLUT_21";
|
||||
TILE3.OUTLUT_6.$name = "OUTLUT_22";
|
||||
TILE3.OUTLUT_7.$name = "OUTLUT_23";
|
||||
TILE3.HLC.$name = "HLC_2";
|
||||
TILE3.HLC.e0 = "BOUNDARY.in1";
|
||||
TILE3.HLC.program0.$name = "HLCP_8";
|
||||
TILE3.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE3.HLC.program1.$name = "HLCP_9";
|
||||
TILE3.HLC.program2.$name = "HLCP_10";
|
||||
TILE3.HLC.program3.$name = "HLCP_11";
|
||||
|
||||
TILE4.$name = "TILE4";
|
||||
TILE4.BOUNDARY.$name = "BOUNDARY3";
|
||||
TILE4.BOUNDARY.boundaryInput1 = "tileOutput";
|
||||
TILE4.BOUNDARY.tileSelect1 = "TILE3";
|
||||
TILE4.BOUNDARY.tileOutputSelect1 = 4;
|
||||
TILE4.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE4.BOUNDARY.in_edge0 = "rising edge";
|
||||
TILE4.BOUNDARY.in_period0 = 1000;
|
||||
TILE4.BOUNDARY.in_duty0 = 500;
|
||||
TILE4.BOUNDARY.in_repeat_count0 = 1;
|
||||
TILE4.BOUNDARY.input_pipeline1 = true;
|
||||
TILE4.LUT_0.$name = "LUT_9";
|
||||
TILE4.LUT_1.$name = "LUT_10";
|
||||
TILE4.LUT_2.$name = "LUT_11";
|
||||
TILE4.FSM_0.$name = "FSM_9";
|
||||
TILE4.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE4.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE4.FSM_0.eqn_s0 = "e0&!e1";
|
||||
TILE4.FSM_1.$name = "FSM_10";
|
||||
TILE4.FSM_2.$name = "FSM_11";
|
||||
TILE4.COUNTER_0.$name = "COUNTER_9";
|
||||
TILE4.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE4.COUNTER_0.mode1 = "1";
|
||||
TILE4.COUNTER_1.$name = "COUNTER_10";
|
||||
TILE4.COUNTER_2.$name = "COUNTER_11";
|
||||
TILE4.OUTLUT_0.$name = "OUTLUT_24";
|
||||
TILE4.OUTLUT_1.$name = "OUTLUT_25";
|
||||
TILE4.OUTLUT_2.$name = "OUTLUT_26";
|
||||
TILE4.OUTLUT_3.$name = "OUTLUT_27";
|
||||
TILE4.OUTLUT_4.$name = "OUTLUT_28";
|
||||
TILE4.OUTLUT_4.i0 = "BOUNDARY.in0";
|
||||
TILE4.OUTLUT_4.eqn = "i0";
|
||||
TILE4.OUTLUT_5.$name = "OUTLUT_29";
|
||||
TILE4.OUTLUT_6.$name = "OUTLUT_30";
|
||||
TILE4.OUTLUT_7.$name = "OUTLUT_31";
|
||||
TILE4.HLC.$name = "HLC_3";
|
||||
TILE4.HLC.e0 = "BOUNDARY.in1";
|
||||
TILE4.HLC.program0.$name = "HLCP_12";
|
||||
TILE4.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE4.HLC.program1.$name = "HLCP_13";
|
||||
TILE4.HLC.program2.$name = "HLCP_14";
|
||||
TILE4.HLC.program3.$name = "HLCP_15";
|
||||
@@ -0,0 +1,255 @@
|
||||
//############################################################################
|
||||
//
|
||||
// FILE: clb_ex17_one_shot_pwm.c
|
||||
//
|
||||
// TITLE: CLB based One-shot PWM
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB based One-shot PWM</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to :
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define EXAMPLE_MODE 0U // '0' for software trigger mode and
|
||||
// '1' for external trigger mode
|
||||
#define TB_CLK DEVICE_SYSCLK_FREQ / 2 // Time base clock is SYSCLK/2
|
||||
#define PWM_CLK 1000000U // PWM frequency as 1 Mhz
|
||||
#define PRD_VAL (TB_CLK / (PWM_CLK)) // Calculate value period value
|
||||
// for up count mode
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
void initEPWM(void);
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint16_t SOFT_TRIGGER = 0; // Set this from '0' to '1' (rising edge)
|
||||
// to provide software trigger for one-shot
|
||||
// PWM when "EXAMPLE_MODE = 0"
|
||||
volatile uint16_t dutyValue= 20; // Variable output pulse width
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
//
|
||||
// Select Global input instead of local input for all CLB IN
|
||||
//
|
||||
CLB_configLocalInputMux(myTILE1_BASE, CLB_IN0, CLB_LOCAL_IN_MUX_GLOBAL_IN);
|
||||
|
||||
#if EXAMPLE_MODE == 1
|
||||
//
|
||||
// Select AUXSIG0 for CLB1, IN0
|
||||
//
|
||||
CLB_configGlobalInputMux(myTILE1_BASE, CLB_IN0, CLB_GLOBAL_IN_MUX_CLB_AUXSIG0);
|
||||
#else
|
||||
CLB_configGlobalInputMux(myTILE1_BASE, CLB_IN0, CLB_GLOBAL_IN_MUX_EPWM1A);
|
||||
#endif
|
||||
|
||||
#if EXAMPLE_MODE == 1
|
||||
//
|
||||
// Inputs set for external trigger
|
||||
//
|
||||
CLB_configGPInputMux(myTILE1_BASE, CLB_IN0, CLB_GP_IN_MUX_EXTERNAL);
|
||||
#else
|
||||
//
|
||||
// Inputs set to GP register for software based trigger
|
||||
//
|
||||
CLB_configGPInputMux(myTILE1_BASE, CLB_IN0, CLB_GP_IN_MUX_GP_REG);
|
||||
#endif
|
||||
|
||||
|
||||
#if EXAMPLE_MODE == 1
|
||||
//
|
||||
// Enable external trigger simulating signal using EPWM module
|
||||
//
|
||||
initEPWM();
|
||||
#endif
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
#if EXAMPLE_MODE == 0
|
||||
//
|
||||
// In case of software trigger mode, make sure to set
|
||||
// SOFT_TRIGGER first as '0' and then to '1' to simulate
|
||||
// the rising edge software trigger
|
||||
//
|
||||
CLB_setGPREG(myTILE1_BASE, SOFT_TRIGGER);
|
||||
#else
|
||||
asm(" NOP");
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// initEPWM - Function to configure ePWM1 to generate a 1 MHz Trigger signal
|
||||
//
|
||||
void
|
||||
initEPWM(void)
|
||||
{
|
||||
|
||||
//
|
||||
// Disable the ePWM time base clock before configuring the module
|
||||
//
|
||||
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
|
||||
//
|
||||
// Set phase shift to 0 and clear the time base counter
|
||||
//
|
||||
EPWM_setPhaseShift(EPWM1_BASE, 0);
|
||||
EPWM_setTimeBaseCounter(EPWM1_BASE, 0);
|
||||
|
||||
//
|
||||
// Disable the shadow load; the load will be immediate instead
|
||||
//
|
||||
EPWM_disableCounterCompareShadowLoadMode(EPWM1_BASE,
|
||||
EPWM_COUNTER_COMPARE_A);
|
||||
|
||||
//
|
||||
// Set the compare A value for 10% duty to generate a short trigger pulse
|
||||
// as the CLB based system is designed such as to respond to a rising edge
|
||||
//
|
||||
EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_A, PRD_VAL / 10);
|
||||
|
||||
//
|
||||
// Set action qualifier behavior on compare A events
|
||||
// - EPWM1A --> 1 when CTR = ZERO
|
||||
// - EPWM1A --> 0 when CTR = CMPA and increasing
|
||||
//
|
||||
EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_LOW,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_HIGH,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
|
||||
//
|
||||
// Set the time base clock prescaler to /1
|
||||
//
|
||||
EPWM_setClockPrescaler(EPWM1_BASE, EPWM_CLOCK_DIVIDER_1,
|
||||
EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
//
|
||||
// Set the period value; don't shadow the register
|
||||
//
|
||||
EPWM_setPeriodLoadMode(EPWM1_BASE, EPWM_PERIOD_DIRECT_LOAD);
|
||||
EPWM_setTimeBasePeriod(EPWM1_BASE, PRD_VAL - 1);
|
||||
|
||||
//
|
||||
// Put the time base counter into up count mode
|
||||
//
|
||||
EPWM_setTimeBaseCounterMode(EPWM1_BASE, EPWM_COUNTER_MODE_UP);
|
||||
|
||||
//
|
||||
// Sync the ePWM time base clock
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
}
|
||||
|
||||
//
|
||||
// CLB ISR generated after every 3rd input trigger event
|
||||
//
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
//
|
||||
// Increase pulse width by 50 ns till it reaches max
|
||||
// Range of pulse output : 0.2us - 0.8us
|
||||
//
|
||||
dutyValue += 5;
|
||||
if(dutyValue > 80)
|
||||
{
|
||||
dutyValue = 20;
|
||||
}
|
||||
|
||||
//
|
||||
// Load new duty cycle value in HLC Registers
|
||||
//
|
||||
CLB_writeInterface(myTILE1_BASE, CLB_ADDR_HLC_R0, dutyValue);
|
||||
|
||||
//
|
||||
// Clear the interrupt flag and acknowledge
|
||||
//
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
const clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
const clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
const clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.useCase = "CUSTOM";
|
||||
epwm1.useInterfacePins = ["EPWM#A"];
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
|
||||
inputxbar1.$name = "myINPUTXBAR0";
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio"];
|
||||
inputxbar1.inputxbar1Gpio = "GPIO0";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO2";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_duty1 = 50;
|
||||
TILE1.BOUNDARY.in_period1 = 100;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 1000;
|
||||
TILE1.BOUNDARY.in_period0 = 100;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 1000;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "FSM_0.S0";
|
||||
TILE1.LUT_0.eqn = "~i0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e1 = "COUNTER_0.count_match2";
|
||||
TILE1.FSM_0.eqn_s0 = "(~e0 & (~e1) & s0) | e0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_2.count_match1";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.match1_val = "";
|
||||
TILE1.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match2";
|
||||
TILE1.COUNTER_0.match2_val = "20";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.mode1 = "1";
|
||||
TILE1.COUNTER_1.action = "Add";
|
||||
TILE1.COUNTER_1.event_load_val = "1";
|
||||
TILE1.COUNTER_1.reset = "COUNTER_1.count_match1";
|
||||
TILE1.COUNTER_1.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_1.match1_val = "3";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.COUNTER_2.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_2.action = "Load";
|
||||
TILE1.COUNTER_2.event_load_val = "1";
|
||||
TILE1.COUNTER_2.match1_val = "1";
|
||||
TILE1.COUNTER_2.reset = "COUNTER_2.count_match1";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_4.i1 = "COUNTER_0.count_match2";
|
||||
TILE1.OUTLUT_4.eqn = "i0 & (~i1)";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "BOUNDARY.in0";
|
||||
TILE1.HLC.e1 = "COUNTER_1.count_match1";
|
||||
TILE1.HLC.R0_init = "20";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "MOV_T2 R0, C0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program1.instruct0 = "INTR 1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,104 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex18_aoc.c
|
||||
//
|
||||
// TITLE: CLB AOC Example
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB AOC Control</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the Asynchronous Output Conditioning block is used to
|
||||
//! asynchronously AND gate the input signals to the CLB. This module is only
|
||||
//! available for CLB types 2 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Implement AND Gate between GPIO0 and GPIO1
|
||||
// Implement AOC Invert functionality turning the GATE to a NAND
|
||||
// Implement AOC Gate Control as an AND GATE on top of the logic
|
||||
// AOC Gate Control will use SW GATE register
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Gate the NAND implemented
|
||||
// Switch the value of the GATE control to 'false' and the logic will
|
||||
// be gated.
|
||||
//
|
||||
CLB_writeSWGateControl(myCLBForTILE1_BASE, CLB_SW_GATE_CTRL4, true);
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,111 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const clbxbar2 = clbxbar.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
|
||||
clbxbar2.$name = "myCLBXBAR1";
|
||||
clbxbar2.auxInput = "XBAR_AUXSIG1";
|
||||
clbxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
clbxbar2.mux3Config = "XBAR_CLB_MUX03_INPUTXBAR2";
|
||||
|
||||
gpio1.$name = "myGPIO1Input";
|
||||
gpio1.padConfig = "PULLUP";
|
||||
gpio1.gpioPin.$assign = "GPIO1";
|
||||
|
||||
gpio2.$name = "myGPIO0Input";
|
||||
gpio2.padConfig = "PULLUP";
|
||||
gpio2.gpioPin.$assign = "GPIO0";
|
||||
|
||||
inputxbar1.$name = "myINPUTXBAR0";
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio","inputxbar2Gpio"];
|
||||
inputxbar1.inputxbar1Gpio = "GPIO0";
|
||||
inputxbar1.inputxbar2Gpio = "GPIO1";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR0";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$name = "MyOUTPUTXBAR1";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_duty1 = 50;
|
||||
TILE1.BOUNDARY.in_period1 = 100;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 20;
|
||||
TILE1.BOUNDARY.in_period0 = 40;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.boundaryInput1 = "squareWave";
|
||||
TILE1.BOUNDARY.in_sync1 = true;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE1.LUT_0.eqn = "i0 & i1";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "LUT_0.OUT";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_4.bypass_mux = false;
|
||||
TILE1.AOC_4.stage1_mux = true;
|
||||
TILE1.AOC_4.stage2_mux = "AND";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,119 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex19_aoc_release_control.c
|
||||
//
|
||||
// TITLE: CLB AOC Release Control Example
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB AOC Release Control</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the Asynchronous Output Conditioning block is used to
|
||||
//! asynchronously set/release the input signals to the CLB. This module is
|
||||
//! only available for CLB types 2 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Implement Pass through GPIO0
|
||||
// Implement AOC does not invert
|
||||
// Implement AOC Gate Control is in bypass
|
||||
// AOC Release Control will be in CLEAR mode with SW RLS control
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
DEVICE_DELAY_US(5000000);
|
||||
|
||||
//
|
||||
// After this function executes, the state of the FLOP in the AOC
|
||||
// is set to HIGH.
|
||||
//
|
||||
CLB_writeSWReleaseControl(myCLBForTILE1_BASE, CLB_SW_RLS_CTRL4, true);
|
||||
|
||||
//
|
||||
// Now that the output is set to HIGH, a rising edge in the CLB_OUT4
|
||||
// signal will cause a CLEAR of the output.
|
||||
//
|
||||
|
||||
GPIO_writePin(myGPIO1Output, 1);
|
||||
|
||||
DEVICE_DELAY_US(5000000);
|
||||
|
||||
//
|
||||
// Clear the release signal, making it ready for the next write to SW
|
||||
// RLS register to cause a RISING EDGE.
|
||||
//
|
||||
CLB_writeSWReleaseControl(myCLBForTILE1_BASE, CLB_SW_RLS_CTRL4, false);
|
||||
GPIO_writePin(myGPIO1Output, 0);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,100 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
|
||||
gpio1.$name = "myGPIO0Input";
|
||||
gpio1.padConfig = "PULLUP";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
gpio2.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio2.$name = "myGPIO1Output";
|
||||
gpio2.gpioPin.$assign = "GPIO1";
|
||||
|
||||
inputxbar1.$name = "myINPUTXBAR0";
|
||||
inputxbar1.inputxbar1Gpio = "GPIO0";
|
||||
inputxbar1.inputxbar2Gpio = "GPIO1";
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio"];
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR0";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$name = "MyOUTPUTXBAR1";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_duty1 = 50;
|
||||
TILE1.BOUNDARY.in_period1 = 100;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 20;
|
||||
TILE1.BOUNDARY.in_period0 = 40;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_sync1 = true;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_4.i0 = "BOUNDARY.in0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_4.bypass_mux = false;
|
||||
TILE1.AOC_4.stage3_mux = "CLEAR";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,106 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex1_combinatorial_logic.c
|
||||
//
|
||||
// TITLE: CLB Combinational Logic.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Combinational Logic</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! The objective of this example is to prevent simultaneous high or low outputs
|
||||
//! on a PWM pair. PWM modules 1 and 2 are configured to generate identical
|
||||
//! waveforms based on a fixed frequency up-count mode.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
void initCLB1(void);
|
||||
|
||||
|
||||
uint32_t mode = 0;
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
CLB_setGPREG(myTILE1_BASE, mode);
|
||||
|
||||
CLB_setOutputMask(myTILE1_BASE, 0x5, true);
|
||||
|
||||
Interrupt_enable(INT_EPWM1);
|
||||
EINT;
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void INT_myEPWM1_ISR(void)
|
||||
{
|
||||
EPWM_clearEventTriggerInterruptFlag(myEPWM1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP3);
|
||||
CLB_setGPREG(myTILE1_BASE, mode & 3UL);
|
||||
asm(" NOP");
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const epwm2 = epwm.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM1_CTRDIR";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM1_CTRDIR";
|
||||
clb1.inputTypeCLB_IN4 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN4 = "CLB_GLOBAL_IN_MUX_EPWM1_CTRDIR";
|
||||
clb1.inputTypeCLB_IN5 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN5 = "CLB_GLOBAL_IN_MUX_EPWM1_CTRDIR";
|
||||
clb1.inputTypeCLB_IN6 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN6 = "CLB_GLOBAL_IN_MUX_EPWM1_CTRDIR";
|
||||
clb1.inputTypeCLB_IN7 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN7 = "CLB_GLOBAL_IN_MUX_EPWM1_CTRDIR";
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2","CLB_IN3"];
|
||||
clb1.inputTypeCLB_IN3 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN2 = "GLOBAL";
|
||||
clb1.synchronizeCLB_IN2 = true;
|
||||
clb1.synchronizeCLB_IN3 = true;
|
||||
clb1.globalConfigCLB_IN3 = "CLB_GLOBAL_IN_MUX_EPWM1B";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
epwm2.useInterfacePins = ["EPWM#A","EPWM#B"];
|
||||
epwm2.$name = "myEPWM2";
|
||||
epwm2.epwm.$assign = "EPWM2";
|
||||
epwm2.epwm.epwmaPin.$assign = "GPIO2";
|
||||
epwm2.epwm.epwmbPin.$assign = "GPIO3";
|
||||
|
||||
epwm1.epwmTimebase_period = 2000;
|
||||
epwm1.epwmTimebase_syncOutPulseMode = ["EPWM_SYNC_OUT_PULSE_ON_CNTR_ZERO"];
|
||||
epwm1.epwmCounterCompare_cmpA = 1333;
|
||||
epwm1.epwmCounterCompare_cmpB = 667;
|
||||
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO = "EPWM_AQ_OUTPUT_HIGH";
|
||||
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_LOW";
|
||||
epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB = "EPWM_AQ_OUTPUT_TOGGLE";
|
||||
epwm1.epwmTimebase_hsClockDiv = "EPWM_HSCLOCK_DIVIDER_1";
|
||||
epwm1.epwmTimebase_counterMode = "EPWM_COUNTER_MODE_UP";
|
||||
epwm1.epwmEventTrigger_enableInterrupt = true;
|
||||
epwm1.epwmEventTrigger_interruptEventCount = "3";
|
||||
epwm1.epwmEventTrigger_interruptSource = "EPWM_INT_TBCTR_ZERO";
|
||||
epwm1.epwmEventTrigger_registerInterrupts = true;
|
||||
|
||||
epwm2.copyFrom = "myEPWM1";
|
||||
epwm2.epwmTimebase_period = 2000;
|
||||
epwm2.epwmTimebase_phaseEnable = true;
|
||||
epwm2.epwmCounterCompare_cmpA = 1333;
|
||||
epwm2.epwmCounterCompare_cmpB = 667;
|
||||
epwm2.epwmTimebase_hsClockDiv = "EPWM_HSCLOCK_DIVIDER_1";
|
||||
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO = "EPWM_AQ_OUTPUT_HIGH";
|
||||
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_LOW";
|
||||
epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB = "EPWM_AQ_OUTPUT_TOGGLE";
|
||||
epwm2.epwmTimebase_counterMode = "EPWM_COUNTER_MODE_UP";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_period0 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 500;
|
||||
TILE1.BOUNDARY.boundaryInput1 = "squareWave";
|
||||
TILE1.BOUNDARY.in_initial_value1 = 1;
|
||||
TILE1.BOUNDARY.in_delay1 = 250;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 2000;
|
||||
TILE1.BOUNDARY.boundaryInput2 = "squareWave";
|
||||
TILE1.BOUNDARY.in_initial_value2 = 1;
|
||||
TILE1.BOUNDARY.in_duty2 = 1333;
|
||||
TILE1.BOUNDARY.boundaryInput3 = "squareWave";
|
||||
TILE1.BOUNDARY.in_delay3 = 667;
|
||||
TILE1.BOUNDARY.in_period3 = 4000;
|
||||
TILE1.BOUNDARY.in_duty3 = 2000;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE1.LUT_0.i2 = "BOUNDARY.in2";
|
||||
TILE1.LUT_0.i3 = "BOUNDARY.in3";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_0.eqn = "(!i0 & !i1 & i2) | (i0 & !i1 & !(i3 & !(i2 & i3))) | (!i0 & i1 & i2 & !(i2 & i3))";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_1.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_1.i1 = "BOUNDARY.in1";
|
||||
TILE1.LUT_1.i2 = "BOUNDARY.in2";
|
||||
TILE1.LUT_1.i3 = "BOUNDARY.in3";
|
||||
TILE1.LUT_1.eqn = "(!i0 & !i1 & i3) | (i0 & !i1 & !(i2 & !(i2 & i3))) | (!i0 & i1 & i3 & !(i2 & i3))";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.eqn = "i0";
|
||||
TILE1.OUTLUT_0.i0 = "LUT_0.OUT";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_1.eqn = "0";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_2.eqn = "i0";
|
||||
TILE1.OUTLUT_2.i0 = "LUT_1.OUT";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_3.eqn = "0";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program2.instruct0 = "mov r0,c0";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
scripting.suppress("Clearing the phase shift value will cause the EPWM module to ignore the synchronization input pulse, if any.", epwm2, "epwmTimebase_phaseShift");
|
||||
@@ -0,0 +1,100 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex20_clbxbars.c
|
||||
//
|
||||
// TITLE: CLB XBARs.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB XBARs</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the CLB INPUTXBAR and CLB OUTPUTXBAR are used to take input
|
||||
//! signals from GPIOs into the CLB TILEs and take output signal from the TILE
|
||||
//! to GPIOs. The availability of these XBARs are device dependent.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Initialize pinmux, and sysconfig peripherals
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
initTILE2(myCLBForTILE2_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
CLB_enableCLB(myCLBForTILE2_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clb_inputxbar = scripting.addModule("/driverlib/clb_inputxbar.js", {}, false);
|
||||
const clb_inputxbar1 = clb_inputxbar.addInstance();
|
||||
const clb_outputxbar = scripting.addModule("/driverlib/clb_outputxbar.js", {}, false);
|
||||
const clb_outputxbar1 = clb_outputxbar.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
clb1.inputTypeCLB_IN0 = "LOCAL";
|
||||
clb1.localConfigCLB_IN0 = "CLB_LOCAL_IN_MUX_INPUT1";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.inputsUsed = ["CLB_IN0"];
|
||||
clb2.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb2.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB1_OUT16";
|
||||
clb2.inputPipelineConfigCLB_IN0 = true;
|
||||
clb2.$name = "myCLBForTILE2";
|
||||
|
||||
clb_inputxbar1.$name = "myCLBINPUTXBAR0";
|
||||
clb_inputxbar1.inputsUsed = ["CLB_INPUTXBAR1Gpio"];
|
||||
|
||||
clb_outputxbar1.muxesUsed = ["XBAR_MUX08"];
|
||||
clb_outputxbar1.$name = "myCLB_OUTPUTXBAR1";
|
||||
clb_outputxbar1.clb_outputxbar.$name = "MyCLB_OUTPUTXBAR1";
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.padConfig = "PULLUP";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.OUTLUT_0.eqn = "i0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
TILE2.$name = "TILE2";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE2.OUTLUT_0.eqn = "i0";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE2.AOC_0.$name = "AOC_8";
|
||||
TILE2.AOC_1.$name = "AOC_9";
|
||||
TILE2.AOC_2.$name = "AOC_10";
|
||||
TILE2.AOC_3.$name = "AOC_11";
|
||||
TILE2.AOC_4.$name = "AOC_12";
|
||||
TILE2.AOC_5.$name = "AOC_13";
|
||||
TILE2.AOC_6.$name = "AOC_14";
|
||||
TILE2.AOC_7.$name = "AOC_15";
|
||||
@@ -0,0 +1,134 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex21_clockprescalar_nmi.c
|
||||
//
|
||||
// TITLE: CLB Clock Prescalar and NMI
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB AOC Control</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the clock prescalar of the CLB module is used to divide down
|
||||
//! the CLB clock and use it as an input to the TILE logic. Also the HLC module
|
||||
//! is used to generate NMI interrupts. This module is only available for CLB
|
||||
//! types 2 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
__interrupt void clb1NMIISR(void);
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_register(INT_NMI, &clb1NMIISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
Interrupt_enable(INT_NMI);
|
||||
|
||||
SysCtl_enableNMIGlobalInterrupt();
|
||||
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Clock prescalar as IN0
|
||||
// HLC will generate interrupt on IN0 rising edge
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
CLB_clearInterruptTag(CLB1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb1NMIISR(void)
|
||||
{
|
||||
|
||||
if (SYSCTL_NMI_CLBNMI & SysCtl_getNMIFlagStatus())
|
||||
{
|
||||
//
|
||||
// CLB NMI
|
||||
//
|
||||
GPIO_togglePin(myGPIOOutput0);
|
||||
|
||||
}
|
||||
SysCtl_clearAllNMIFlags();
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
clb1.inputTypeCLB_IN0 = "LOCAL";
|
||||
clb1.localConfigCLB_IN0 = "CLB_LOCAL_IN_MUX_CLB_PSCLK";
|
||||
clb1.clken = true;
|
||||
clb1.hlcNMI = true;
|
||||
clb1.prescale = 10000;
|
||||
clb1.tap = 5;
|
||||
|
||||
gpio1.$name = "myGPIOOutput0";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "BOUNDARY.in0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,267 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex22_serializer.c
|
||||
//
|
||||
// TITLE: CLB Serializer Example
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Serializer</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the CLB COUNTER is used in serializer mode to act as a shift
|
||||
//! register. This module is only available for CLB types 2 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
//
|
||||
// Shift register GP REG bits
|
||||
//
|
||||
#define GPREG_0_EVENT_DATA_SHIFT 0U
|
||||
#define GPREG_1_MODE0_EN_SHIFT 1U
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint32_t counterValue = 0;
|
||||
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Serializer mode
|
||||
// Match1 EQUAL will generate interrupt at 0b110101
|
||||
// Match2 TAP Select bit enable
|
||||
// Match 2 Generate interrupt on the rising edge of BIT6
|
||||
// MODE0 and EVENT controlled through GPREG
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
counterValue = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
if (counterValue != 0)
|
||||
{
|
||||
//
|
||||
// Error
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// Now we will shift in new values
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
//
|
||||
// The value is now 0b1
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
//
|
||||
// The value is now 0b11
|
||||
//
|
||||
|
||||
//
|
||||
// Write 0 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (0U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (0U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
//
|
||||
// The value is now 0b110
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
//
|
||||
// The value is now 0b1101
|
||||
//
|
||||
|
||||
//
|
||||
// Write 0 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (0U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (0U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
//
|
||||
// The value is now 0b11010
|
||||
//
|
||||
|
||||
counterValue = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
if (counterValue != 0b11010)
|
||||
{
|
||||
//
|
||||
// Error
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// Shift successful!
|
||||
// The value is
|
||||
//
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Match 1 is set to 0b110101, should get an interrupt
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
DEVICE_DELAY_US(1000);
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Match 2 TAP SELECT for bit 6, 0b"1"101011 should get an interrupt
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
DEVICE_DELAY_US(1000);
|
||||
ESTOP0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
uint32_t intTag = CLB_getInterruptTag(myCLBForTILE1_BASE);
|
||||
|
||||
if (intTag == 1)
|
||||
{
|
||||
//
|
||||
// Match 1 value EQUAL
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
else if (intTag == 2)
|
||||
{
|
||||
//
|
||||
// Match 2 TAP Select Bit Set
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(CLB1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
clb1.localConfigCLB_IN0 = "CLB_LOCAL_IN_MUX_CLB_PSCLK";
|
||||
clb1.prescale = 10000;
|
||||
clb1.tap = 5;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb1.filterConfigCLB_IN1 = "CLB_FILTER_RISING_EDGE";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in1";
|
||||
TILE1.COUNTER_0.serializer_en = true;
|
||||
TILE1.COUNTER_0.action = "Shift Right";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.match2_tap_en = true;
|
||||
TILE1.COUNTER_0.match2_tap_sel = 6;
|
||||
TILE1.COUNTER_0.match1_val = "0b110101";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.e1 = "COUNTER_0.count_match2";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program1.instruct0 = "INTR 2";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,191 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex23_lfsr.c
|
||||
//
|
||||
// TITLE: CLB LFSR
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB LFSR</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the CLB COUNTER module is used in Linear Feedback Shift
|
||||
//! Register (LFSR) mode. This module is only available for CLB types 2 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Shift register GP REG bits
|
||||
//
|
||||
#define GPREG_0_EVENT_DATA_SHIFT 0U
|
||||
#define GPREG_1_MODE0_EN_SHIFT 1U
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint32_t counterValue = 0;
|
||||
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// LFSR Mode
|
||||
// Poly = MATCH2 = 0x0000FFFF
|
||||
// MODE1 = 0
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
counterValue = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
if (counterValue != 0)
|
||||
{
|
||||
//
|
||||
// Error
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// Match2 (Polynomial will toggle the first 16 bits. Value should be 0x0000FFFF
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
|
||||
counterValue = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
if (counterValue != 0x0000FFFF)
|
||||
{
|
||||
//
|
||||
// Error
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// The next value should be 0x10001 if DATA is 0
|
||||
//
|
||||
|
||||
//
|
||||
// Write 0 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (0U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (0U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
counterValue = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
if (counterValue != 0x00010001)
|
||||
{
|
||||
//
|
||||
// Error
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// The next value should be 0x20002 if DATA is 1
|
||||
//
|
||||
|
||||
//
|
||||
// Write 1 to DATA
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (0U << GPREG_1_MODE0_EN_SHIFT));
|
||||
//
|
||||
// Write 1 to EN
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE, (1U << GPREG_0_EVENT_DATA_SHIFT) | (1U << GPREG_1_MODE0_EN_SHIFT));
|
||||
|
||||
counterValue = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
if (counterValue != 0x00020002)
|
||||
{
|
||||
//
|
||||
// Error
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Shift successful!
|
||||
//
|
||||
ESTOP0;
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
clb1.localConfigCLB_IN0 = "CLB_LOCAL_IN_MUX_CLB_PSCLK";
|
||||
clb1.prescale = 10000;
|
||||
clb1.tap = 5;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb1.filterConfigCLB_IN1 = "CLB_FILTER_RISING_EDGE";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in1";
|
||||
TILE1.COUNTER_0.serializer_en = true;
|
||||
TILE1.COUNTER_0.action = "Shift Right";
|
||||
TILE1.COUNTER_0.lfsr_en = true;
|
||||
TILE1.COUNTER_0.match2_val = "0x0000FFFF";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,154 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex24_lock_output_mask.c
|
||||
//
|
||||
// TITLE: CLB Lock Output Mask
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Lock Output Mask</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the lock outpt mask feature of the CLB is used to lock the
|
||||
//! selected output signal override settings. This module is only available for
|
||||
//! CLB types 3 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint32_t outputMask = 0;
|
||||
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// The tile configuration is not important for this example
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
DEVICE_DELAY_US(1000);
|
||||
ESTOP0;
|
||||
|
||||
outputMask = HWREG(myCLBForTILE1_BASE + CLB_LOGICCTL + CLB_O_OUT_EN);
|
||||
if (outputMask != 1U << 4U){
|
||||
//
|
||||
// Output Mask was not set for OUT4
|
||||
//
|
||||
ESTOP0;
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Output Mask was set for OUT4
|
||||
// let's try to change it while it's locked
|
||||
//
|
||||
CLB_setOutputMask(myCLBForTILE1_BASE, CLB_OUTPUT_04, false);
|
||||
|
||||
outputMask = HWREG(myCLBForTILE1_BASE + CLB_LOGICCTL + CLB_O_OUT_EN);
|
||||
if (outputMask != 1U << 4U){
|
||||
//
|
||||
// Output Mask was change even though it was locked
|
||||
//
|
||||
ESTOP0;
|
||||
while(1);
|
||||
}
|
||||
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Output Mask was set for OUT4
|
||||
// Enable the writes to OUT_EN then change the mask
|
||||
//
|
||||
CLB_enableOutputMaskUpdates(myCLBForTILE1_BASE);
|
||||
CLB_setOutputMask(myCLBForTILE1_BASE, CLB_OUTPUT_04, false);
|
||||
|
||||
outputMask = HWREG(myCLBForTILE1_BASE + CLB_LOGICCTL + CLB_O_OUT_EN);
|
||||
if (outputMask == 1U << 4U){
|
||||
//
|
||||
// Output Mask was change even though it was locked
|
||||
//
|
||||
ESTOP0;
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Success, the lock was diabled and the update took place on the
|
||||
// OUT_EN register
|
||||
//
|
||||
ESTOP0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,51 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
clb1.outputsToOverridePeripheral = ["CLB_OUT4"];
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
clb1.lockOutputsToOverridePeripheral = true;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "BOUNDARY.in0";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,138 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex25_input_pipeline.c
|
||||
//
|
||||
// TITLE: CLB INPUT Pipeline Mode
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB INPUT Pipeline Mode</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the CLB Input Pipeline mode is enable to delay the input
|
||||
//! signal by a clock cycle. This module is only available for CLB types 3 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
#define INPUT_WITHOUT_PIPELINE_MODE CLB_IN1
|
||||
#define INPUT_WITH_PIPELINE_MODE CLB_IN2
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint32_t delayBetweenInputs = 0;
|
||||
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// The tile configuration is:
|
||||
// LUT0 is only high when -> IN1 is high and IN0 is LOW
|
||||
// LUT0 output (when high) enables the COUNTER0 to count up
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Set both inputs to capture the delay between them in the counter value
|
||||
//
|
||||
CLB_setGPREG(myCLBForTILE1_BASE,
|
||||
(1 << INPUT_WITH_PIPELINE_MODE) |
|
||||
(1 << INPUT_WITHOUT_PIPELINE_MODE));
|
||||
|
||||
//
|
||||
// Read C0 to get the counter value reflecting the delay between the INPUTs
|
||||
//
|
||||
delayBetweenInputs = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C0);
|
||||
|
||||
//
|
||||
// The input WITH pipeline mode enabled with capture the counter
|
||||
// one cycle later than the input WITHOUT pipeline mode enabled
|
||||
//
|
||||
if (delayBetweenInputs != 1)
|
||||
{
|
||||
//
|
||||
// Error, the captured counter value is not 1 cycle
|
||||
//
|
||||
ESTOP0;
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Success the counter value captured delay between pipeline mode enabled input
|
||||
// and without pipeline mode enabled input
|
||||
//
|
||||
ESTOP0;
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,55 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
clb1.inputPipelineConfigCLB_IN2 = true;
|
||||
clb1.inputsUsed = ["CLB_IN1","CLB_IN2"];
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in1";
|
||||
TILE1.LUT_0.i1 = "BOUNDARY.in2";
|
||||
TILE1.LUT_0.eqn = "i0&!i1";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.mode0 = "LUT_0.OUT";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "MOV C0, R0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program1.instruct0 = "MOV C1, R1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,163 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex26_clocking_pipeline.c
|
||||
//
|
||||
// TITLE: CLB Clocking and PIPELINE Mode
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Clocking and PIPELINE Mode</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the CLB pipeline mode is enable and affects the behavior
|
||||
//! of the CLB COUNTERs and HLC. This module is only available for CLB types
|
||||
//! 3 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// The counter value for a CLB without PIPELINE Mode Enabled
|
||||
//
|
||||
uint32_t counterValueWithoutPipelineMode = 0;
|
||||
|
||||
//
|
||||
// The counter value for a CLB with PIPELINE Mode Enabled
|
||||
//
|
||||
uint32_t counterValueWitPipelineMode = 0;
|
||||
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// AUXPLL at 125MHz
|
||||
// CLB Clock ASYNC mode
|
||||
// CLB Register clock 125MHz
|
||||
// CLB Tile Clock 125MHz/2
|
||||
//
|
||||
SysCtl_setCLBClk (SYSCTL_CLBCLKOUT_DIV_1, SYSCTL_CLBTCLKOUT_DIV_2,
|
||||
SYSCTL_CLB1, SYSCTL_CLBCLK_ASYNC);
|
||||
|
||||
SysCtl_setCLBClk (SYSCTL_CLBCLKOUT_DIV_1, SYSCTL_CLBTCLKOUT_DIV_2,
|
||||
SYSCTL_CLB2, SYSCTL_CLBCLK_ASYNC);
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// The tile configuration is:
|
||||
// TILE1:
|
||||
// PIPELINE MODE
|
||||
// COUNTER 0 configured to match at 62,500,000 counts
|
||||
// FSM to toggle at COUNTER0 match
|
||||
// CLB OUTPUT XBAR will show the output on GPIO
|
||||
//
|
||||
// COUNTER 2 will count to 64 then trigger an ADD-5
|
||||
// With PIPELINE enabled, counter will use previous counter value
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// The tile configuration is:
|
||||
// TILE2:
|
||||
// NO PIPELINE
|
||||
// COUNTER 2 will count to 64 then trigger an ADD-5
|
||||
// With PIPELINE enabled, counter will use current counter value
|
||||
//
|
||||
initTILE2(myCLBForTILE2_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
CLB_enableCLB(myCLBForTILE2_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
DEVICE_DELAY_US(1000000);
|
||||
|
||||
counterValueWithoutPipelineMode = CLB_getRegister(myCLBForTILE2_BASE, CLB_REG_CTR_C2);
|
||||
counterValueWitPipelineMode = CLB_getRegister(myCLBForTILE1_BASE, CLB_REG_CTR_C2);
|
||||
|
||||
if (counterValueWithoutPipelineMode != counterValueWitPipelineMode + 1)
|
||||
{
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Error with pipeline, the value should be 1 less
|
||||
//
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Success
|
||||
//
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Keep running and view CLB OUTPUT XBAR GPIO
|
||||
//
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clb_outputxbar = scripting.addModule("/driverlib/clb_outputxbar.js", {}, false);
|
||||
const clb_outputxbar1 = clb_outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.$name = "myCLBForTILE2";
|
||||
|
||||
clb_outputxbar1.$name = "myCLB_OUTPUTXBAR0";
|
||||
clb_outputxbar1.muxesUsed = ["XBAR_MUX04"];
|
||||
clb_outputxbar1.clb_outputxbar.$name = "MyCLB_OUTPUTXBAR1";
|
||||
|
||||
TILE1.pipeline_mode = true;
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_0.eqn_s0 = "s0^e0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_1.eqn_out = "!s0";
|
||||
TILE1.FSM_1.eqn_s0 = "s0^e0";
|
||||
TILE1.FSM_1.e0 = "COUNTER_2.count_match1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.match1_val = "62500000 - 1";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.COUNTER_2.event = "COUNTER_2.count_match1";
|
||||
TILE1.COUNTER_2.match1_val = "64";
|
||||
TILE1.COUNTER_2.action = "Add";
|
||||
TILE1.COUNTER_2.event_load_val = "5";
|
||||
TILE1.COUNTER_2.mode0 = "FSM_1.OUT";
|
||||
TILE1.COUNTER_2.mode1 = "1";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
TILE2.$name = "TILE2";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_1.e0 = "COUNTER_2.count_match1";
|
||||
TILE2.FSM_1.eqn_s0 = "s0^e0";
|
||||
TILE2.FSM_1.eqn_out = "!s0";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.COUNTER_2.mode0 = "FSM_1.OUT";
|
||||
TILE2.COUNTER_2.mode1 = "1";
|
||||
TILE2.COUNTER_2.match1_val = "64";
|
||||
TILE2.COUNTER_2.event = "COUNTER_2.count_match1";
|
||||
TILE2.COUNTER_2.event_load_val = "5";
|
||||
TILE2.COUNTER_2.action = "Add";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE2.AOC_0.$name = "AOC_8";
|
||||
TILE2.AOC_1.$name = "AOC_9";
|
||||
TILE2.AOC_2.$name = "AOC_10";
|
||||
TILE2.AOC_3.$name = "AOC_11";
|
||||
TILE2.AOC_4.$name = "AOC_12";
|
||||
TILE2.AOC_5.$name = "AOC_13";
|
||||
TILE2.AOC_6.$name = "AOC_14";
|
||||
TILE2.AOC_7.$name = "AOC_15";
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex27_spi_data_export.c
|
||||
//
|
||||
// TITLE: CLB SPI Data Export
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB SPI Data Export</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the high speed data export feature of the CLB is used and
|
||||
//! one of the HLC registers is exported out of the CLB module using the SPI
|
||||
//! RX buffer. This module is only available for CLB types 3 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// Count for SPI RX FIFO INT
|
||||
//
|
||||
uint16_t spiFifoRxIntCount = 0;
|
||||
|
||||
//
|
||||
// Destination buffer for exported CLB data
|
||||
//
|
||||
uint16_t clbExportedData[16] = {0};
|
||||
|
||||
__interrupt void mySPIForTILE1_RxFIFOISR(void)
|
||||
{
|
||||
uint16_t dataIndex = 0;
|
||||
uint16_t rxFIFOLevel = 0;
|
||||
uint16_t txFIFOLevel = 0;
|
||||
|
||||
//
|
||||
// Read the interrupt status
|
||||
//
|
||||
uint32_t spiIntStatus = SPI_getInterruptStatus(mySPIForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Read the current FIFO level to know how much data to read
|
||||
// from the buffer
|
||||
//
|
||||
SPI_getFIFOInterruptLevel(mySPIForTILE1_BASE, &txFIFOLevel, &rxFIFOLevel);
|
||||
|
||||
if (spiIntStatus & SPI_INT_RXFF)
|
||||
{
|
||||
for (dataIndex = 0; dataIndex < rxFIFOLevel; dataIndex++)
|
||||
{
|
||||
clbExportedData [dataIndex] = SPI_readDataNonBlocking(mySPIForTILE1_BASE);
|
||||
}
|
||||
}
|
||||
if (spiIntStatus & SPI_INT_RXFF_OVERFLOW)
|
||||
{
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Error! Data was not read in time
|
||||
//
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Increment number of interrupt counts.
|
||||
//
|
||||
spiFifoRxIntCount++;
|
||||
|
||||
//
|
||||
// Clear interrupt flag and issue ACK
|
||||
//
|
||||
SPI_clearInterruptStatus(mySPIForTILE1_BASE, SPI_INT_RXFF | SPI_INT_RXFF_OVERFLOW);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP6);
|
||||
}
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// AUXPLL at 125MHz
|
||||
// CLB Clock ASYNC mode
|
||||
// CLB Register clock 125MHz
|
||||
// CLB Tile Clock 125MHz/2
|
||||
//
|
||||
SysCtl_setCLBClk (SYSCTL_CLBCLKOUT_DIV_1, SYSCTL_CLBTCLKOUT_DIV_2,
|
||||
SYSCTL_CLB1, SYSCTL_CLBCLK_ASYNC);
|
||||
|
||||
Interrupt_register(INT_SPIA_RX, &mySPIForTILE1_RxFIFOISR);
|
||||
Interrupt_enable(INT_SPIA_RX);
|
||||
|
||||
//
|
||||
// Configures SPI to enable RX FIFO and RX FIFO interrupts
|
||||
// for CLB data export
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// The tile configuration is:
|
||||
// TILE1:
|
||||
// Non PIPELINE MODE
|
||||
// COUNTER0 set to generate a match event every 125000 clocks then reset
|
||||
// COUNTER0 match1 event will:
|
||||
// 1. Trigger HLC to increment R0 by 5
|
||||
// 2. Trigger SPI Export event to push R0 to the SPIRX buffer
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,65 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const spi = scripting.addModule("/driverlib/spi.js", {}, false);
|
||||
const spi1 = spi.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.spiBufferAccess = true;
|
||||
clb1.spiBufferLoadTriggerSignal = 3;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
|
||||
spi1.$name = "mySPIForTILE1";
|
||||
spi1.emulationMode = "SPI_EMULATION_STOP_AFTER_TRANSMIT";
|
||||
spi1.enabledFIFOInterrupts = ["SPI_INT_RXFF","SPI_INT_RXFF_OVERFLOW"];
|
||||
spi1.rxFifo = "SPI_FIFO_RX8";
|
||||
spi1.bitRate = 1000000;
|
||||
spi1.spi.$name = "MySPI1";
|
||||
spi1.spi.$assign = "SPIA";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.match1_val = "125000";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.R1_init = "5";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "ADD R1, R0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,233 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex28_spi_data_export_dma.c
|
||||
//
|
||||
// TITLE: CLB SPI Data Export DMA
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB SPI Data Export DMA</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example the high speed data export feature of the CLB is used and
|
||||
//! one of the HLC registers is exported out of the CLB module using the SPI RX
|
||||
//! buffer. The data received in the SPI RX buffer is transferred to memory
|
||||
//! using DMA. This module is only available for CLB types 3 and up.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
#include "clb_config.h"
|
||||
|
||||
//
|
||||
// RX FIFO interrupt level
|
||||
//
|
||||
uint16_t rxFIFOLevel = 0;
|
||||
|
||||
//
|
||||
// Count for the number of DMA completion interrupts
|
||||
//
|
||||
uint16_t dmaIntCount = 0;
|
||||
|
||||
//
|
||||
// The destination array for the CLB exported data
|
||||
//
|
||||
uint16_t clbExportedData[16] = {0};
|
||||
|
||||
//
|
||||
// The variable used to validate the exported data
|
||||
//
|
||||
uint16_t validationData = 0;
|
||||
|
||||
//
|
||||
// Place buffers in GSRAM
|
||||
//
|
||||
#pragma DATA_SECTION(clbExportedData, "ramgs0");
|
||||
|
||||
__interrupt void dmaCh6ISR(void)
|
||||
{
|
||||
uint16_t dataIndex = 0;
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP7);
|
||||
|
||||
//
|
||||
// Validate the received/transfered data
|
||||
//
|
||||
for (dataIndex = 0; dataIndex < rxFIFOLevel; dataIndex++)
|
||||
{
|
||||
if (clbExportedData[dataIndex] != validationData)
|
||||
{
|
||||
//
|
||||
// Error the data does not match the expected pattern
|
||||
//
|
||||
ESTOP0;
|
||||
}
|
||||
validationData += 5;
|
||||
}
|
||||
|
||||
//
|
||||
// Increment number of interrupt counts.
|
||||
//
|
||||
dmaIntCount++;
|
||||
}
|
||||
|
||||
void initDMA()
|
||||
{
|
||||
uint16_t txFIFOLevelNotUsed = 0;
|
||||
|
||||
//
|
||||
// Read the current FIFO level to know how much data to read
|
||||
// from the buffer
|
||||
//
|
||||
SPI_getFIFOInterruptLevel(mySPIForTILE1_BASE, &txFIFOLevelNotUsed, &rxFIFOLevel);
|
||||
|
||||
//
|
||||
// Initialize DMA
|
||||
//
|
||||
DMA_initController();
|
||||
|
||||
//
|
||||
// Configure DMA Ch6 for RX. When the FIFO contains at least rxFIFOLevel words to
|
||||
// read, data will be transferred from the SPI module's receive buffer
|
||||
// register to the clbExportedData buffer.
|
||||
//
|
||||
DMA_configAddresses(DMA_CH6_BASE, clbExportedData,
|
||||
(uint16_t *)(mySPIForTILE1_BASE + SPI_O_RXBUF));
|
||||
|
||||
//
|
||||
// Each burst is rxFIFOLevel elements of size 16-bit, and the destination address
|
||||
// is incremented by one while the source address is kept the same (SPI_O_RXBUF).
|
||||
//
|
||||
DMA_configBurst(DMA_CH6_BASE, rxFIFOLevel, 0, 1);
|
||||
|
||||
//
|
||||
// Do 1 Transfer, keeping the source address unchanged, and rewinding the destination
|
||||
// address back to the beginning of the clbExportedData buffer.
|
||||
// Continuous mode enabled to redo the configuration when the transfer is done.
|
||||
//
|
||||
DMA_configTransfer(DMA_CH6_BASE, 1, 0, 1-rxFIFOLevel);
|
||||
DMA_configMode(DMA_CH6_BASE, DMA_TRIGGER_SPIARX, DMA_CFG_ONESHOT_DISABLE |
|
||||
DMA_CFG_CONTINUOUS_ENABLE | DMA_CFG_SIZE_16BIT);
|
||||
|
||||
//
|
||||
// Configure DMA Ch6 interrupts
|
||||
//
|
||||
DMA_setInterruptMode(DMA_CH6_BASE, DMA_INT_AT_END);
|
||||
DMA_enableInterrupt(DMA_CH6_BASE);
|
||||
DMA_enableTrigger(DMA_CH6_BASE);
|
||||
}
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// AUXPLL at 125MHz
|
||||
// CLB Clock ASYNC mode
|
||||
// CLB Register clock 125MHz
|
||||
// CLB Tile Clock 125MHz/2
|
||||
//
|
||||
SysCtl_setCLBClk (SYSCTL_CLBCLKOUT_DIV_1, SYSCTL_CLBTCLKOUT_DIV_2,
|
||||
SYSCTL_CLB1, SYSCTL_CLBCLK_ASYNC);
|
||||
|
||||
Interrupt_register(INT_DMA_CH6, &dmaCh6ISR);
|
||||
Interrupt_enable(INT_DMA_CH6);
|
||||
|
||||
//
|
||||
// Configures SPI to enable RX FIFO and RX FIFO interrupts
|
||||
// for CLB data export
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// The tile configuration is:
|
||||
// TILE1:
|
||||
// Non PIPELINE MODE
|
||||
// COUNTER0 set to generate a match event every 125000 clocks then reset
|
||||
// COUNTER0 match1 event will:
|
||||
// 1. Trigger HLC to increment R0 by 5
|
||||
// 2. Trigger SPI Export event to push R0 to the SPIRX buffer
|
||||
//
|
||||
initTILE1(myCLBForTILE1_BASE);
|
||||
|
||||
//
|
||||
// Set up DMA for SPI use, initialize the SPI for FIFO mode
|
||||
//
|
||||
initDMA();
|
||||
|
||||
//
|
||||
// Start the DMA channels
|
||||
//
|
||||
DMA_startChannel(DMA_CH6_BASE);
|
||||
|
||||
CLB_enableCLB(myCLBForTILE1_BASE);
|
||||
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const spi = scripting.addModule("/driverlib/spi.js", {}, false);
|
||||
const spi1 = spi.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.spiBufferAccess = true;
|
||||
clb1.spiBufferLoadTriggerSignal = 3;
|
||||
clb1.$name = "myCLBForTILE1";
|
||||
|
||||
spi1.$name = "mySPIForTILE1";
|
||||
spi1.emulationMode = "SPI_EMULATION_STOP_AFTER_TRANSMIT";
|
||||
spi1.rxFifo = "SPI_FIFO_RX8";
|
||||
spi1.bitRate = 1000000;
|
||||
spi1.spi.$name = "MySPI1";
|
||||
spi1.spi.$assign = "SPIA";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.match1_val = "125000";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.R1_init = "5";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "ADD R1, R0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,292 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex29_timestamp.c
|
||||
//
|
||||
// TITLE: CLB Trip Zone Timestamp
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Trip Zone Timestamp</h1>
|
||||
//!
|
||||
//! This example displays how to timestamp interrupts generated by the CLB. An
|
||||
//! interrupt is generated when ePWM1 is tripped.
|
||||
//!
|
||||
//! ePWM1 is configured to be interrupted by TZ1 and TZ2, both one shot trip sources.
|
||||
//!
|
||||
//! The CLB is configured as follows:
|
||||
//! - COUNTER0 and COUNTER1 continually count when the program begins.
|
||||
//! - COUNTER0 timestamps TZ1 and COUNTER1 timestamps TZ2.
|
||||
//! - COUNTER2 increments once when COUNTER0/COUNTER1 overflows using LUT2.
|
||||
//! - FSM0/1 are configured to sync counters and stop COUNTER0/1 when an interrupt
|
||||
//! is received.
|
||||
//! - TZ1 (GPIO12) and TZ2 (GPIO13) are routed as inputs through CLBXBAR.
|
||||
//! - BOUNDARY.boundaryInput0 denotes TZ1. On rising edge, HLC issues an interrupt with tag 12.
|
||||
//! - BOUDNARY.in1 denotes TZ2. On rising edge, HLC issues an interrupt with tag 13.
|
||||
//! - BOUNDARY.boundaryInput7 serves as a simultaneous enable for COUNTER0/1 to begin counting.
|
||||
//!
|
||||
//! TZ1 is tripped when GPIO12 is connected to GND. TZ2 is tripped when GPIO13 is
|
||||
//! connected to GND. When an interrupt occurs, the interrupt handler determines
|
||||
//! the initial trip source and stores this value in a variable 'initialTripZone'.
|
||||
//!
|
||||
//! View these variables in Debug Expressions tab:
|
||||
//!
|
||||
//! initialTripZone: stores the first TZ to have been tripped
|
||||
//! tz1Counter64bit: stores the counter value at the instant that TZ1 is tripped.
|
||||
//! tz2Counter64bit: stores the counter value at the instant that TZ2 is tripped.
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint32_t epwm1TZIntCount;
|
||||
#define EPWM_TZ1_INT_TAG 12U
|
||||
#define EPWM_TZ2_INT_TAG 13U
|
||||
|
||||
uint32_t initialTripZone;
|
||||
uint64_t tz1Counter64bit;
|
||||
uint64_t tz2Counter64bit;
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
void initEPWM1(void);
|
||||
__interrupt void epwm1TZISR(void);
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Disable pin locks and enable internal pull ups.
|
||||
//
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Interrupts that are used in this example are re-mapped to ISR functions
|
||||
// found within this file.
|
||||
//
|
||||
Interrupt_register(INT_EPWM1_TZ, &epwm1TZISR);
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
|
||||
//
|
||||
// Disable sync(Freeze clock to PWM as well)
|
||||
//
|
||||
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
|
||||
//
|
||||
// Initialize ePWM1
|
||||
//
|
||||
initEPWM1();
|
||||
|
||||
//
|
||||
// Enable sync and clock to PWM
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
// Board Initialization
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable interrupts required for this example
|
||||
//
|
||||
Interrupt_enable(INT_EPWM1_TZ);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and real time interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
// Enable synchronized CLB counters
|
||||
HWREG(myTILE1_BASE + CLB_LOGICCTL + CLB_O_GP_REG) = 1 << 7;
|
||||
|
||||
//
|
||||
// IDLE loop. Just sit and loop forever (optional):
|
||||
//
|
||||
for(;;)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
}
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
// Get counter value for TZ1
|
||||
uint32_t baseTZ1 = CLB_getRegister(myTILE1_BASE, CLB_REG_HLC_R0);
|
||||
uint32_t overflowTZ1 = CLB_getRegister(myTILE1_BASE, CLB_REG_HLC_R2);
|
||||
tz1Counter64bit = (uint64_t) overflowTZ1 << 32 | baseTZ1;
|
||||
|
||||
// Get counter value for TZ2
|
||||
uint32_t baseTZ2 = CLB_getRegister(myTILE1_BASE, CLB_REG_HLC_R1);
|
||||
uint32_t overflowTZ2 = CLB_getRegister(myTILE1_BASE, CLB_REG_HLC_R3);
|
||||
tz2Counter64bit = (uint64_t) overflowTZ2 << 32 | baseTZ2;
|
||||
|
||||
// Determine initial source of interrupt, TZ1 or TZ2
|
||||
if ( (tz1Counter64bit != 0) && ((tz1Counter64bit < tz2Counter64bit) || (tz2Counter64bit == 0)) )
|
||||
initialTripZone = 1;
|
||||
else if ( (tz2Counter64bit != 0) && ((tz2Counter64bit < tz1Counter64bit) || (tz1Counter64bit == 0)) )
|
||||
initialTripZone = 2;
|
||||
else
|
||||
initialTripZone = 0;
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
//
|
||||
// epwm1TZISR - ePWM1 TZ ISR
|
||||
//
|
||||
__interrupt void epwm1TZISR(void)
|
||||
{
|
||||
epwm1TZIntCount++;
|
||||
|
||||
//
|
||||
// To re-enable the OST Interrupt, uncomment the below code:
|
||||
//
|
||||
// EPWM_clearTripZoneFlag(myEPWM1_BASE,
|
||||
// (EPWM_TZ_INTERRUPT | EPWM_TZ_FLAG_CBC));
|
||||
|
||||
//
|
||||
// Acknowledge this interrupt to receive more interrupts from group 2
|
||||
//
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP2);
|
||||
}
|
||||
|
||||
//
|
||||
// initEPWM1 - Configure ePWM1
|
||||
//
|
||||
void initEPWM1()
|
||||
{
|
||||
//
|
||||
// Enable TZ1 and TZ2 as one shot trip sources
|
||||
//
|
||||
EPWM_enableTripZoneSignals(myEPWM1_BASE, EPWM_TZ_SIGNAL_OSHT1);
|
||||
EPWM_enableTripZoneSignals(myEPWM1_BASE, EPWM_TZ_SIGNAL_OSHT2);
|
||||
|
||||
//
|
||||
// Action on TZ1
|
||||
//
|
||||
EPWM_setTripZoneAction(myEPWM1_BASE,
|
||||
EPWM_TZ_ACTION_EVENT_TZA,
|
||||
EPWM_TZ_ACTION_HIGH);
|
||||
|
||||
//
|
||||
// Enable TZ interrupt
|
||||
//
|
||||
EPWM_enableTripZoneInterrupt(myEPWM1_BASE, EPWM_TZ_INTERRUPT_OST);
|
||||
|
||||
//
|
||||
// Set-up TBCLK
|
||||
//
|
||||
EPWM_setTimeBasePeriod(myEPWM1_BASE, 12000U);
|
||||
EPWM_setPhaseShift(myEPWM1_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM1_BASE, 0U);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM1_BASE, EPWM_COUNTER_MODE_UP_DOWN);
|
||||
EPWM_disablePhaseShiftLoad(myEPWM1_BASE);
|
||||
|
||||
//
|
||||
// Set ePWM clock pre-scaler
|
||||
//
|
||||
EPWM_setClockPrescaler(myEPWM1_BASE,
|
||||
EPWM_CLOCK_DIVIDER_4,
|
||||
EPWM_HSCLOCK_DIVIDER_4);
|
||||
|
||||
//
|
||||
// Set up shadowing
|
||||
//
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE,
|
||||
EPWM_COUNTER_COMPARE_A,
|
||||
EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
//
|
||||
// Set-up compare
|
||||
//
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, 6000U);
|
||||
|
||||
//
|
||||
// Set actions
|
||||
//
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE,
|
||||
EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_HIGH,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE,
|
||||
EPWM_AQ_OUTPUT_A,
|
||||
EPWM_AQ_OUTPUT_LOW,
|
||||
EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const clbxbar2 = clbxbar.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const gpio3 = gpio.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE", {}, false);
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.localConfigCLB_IN0 = "CLB_LOCAL_IN_MUX_EPWM_OST";
|
||||
clb1.localConfigCLB_IN1 = "CLB_LOCAL_IN_MUX_EPWM_OST";
|
||||
clb1.filterConfigCLB_IN0 = "CLB_FILTER_RISING_EDGE";
|
||||
clb1.filterConfigCLB_IN1 = "CLB_FILTER_RISING_EDGE";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN7"];
|
||||
clb1.filterConfigCLB_IN7 = "CLB_FILTER_RISING_EDGE";
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
|
||||
clbxbar2.$name = "myCLBXBAR1";
|
||||
clbxbar2.auxInput = "XBAR_AUXSIG1";
|
||||
clbxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
clbxbar2.mux3Config = "XBAR_CLB_MUX03_INPUTXBAR2";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.useCase = "CUSTOM";
|
||||
epwm1.useInterfacePins = ["EPWM#A"];
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
|
||||
gpio1.$name = "myGPIO11";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.padConfig = "PULLUP";
|
||||
gpio1.qualMode = "GPIO_QUAL_ASYNC";
|
||||
gpio1.gpioPin.$assign = "GPIO11";
|
||||
|
||||
gpio2.$name = "myGPIO12";
|
||||
gpio2.padConfig = "PULLUP";
|
||||
gpio2.qualMode = "GPIO_QUAL_ASYNC";
|
||||
gpio2.gpioPin.$assign = "GPIO12";
|
||||
|
||||
gpio3.$name = "myGPIO13";
|
||||
gpio3.qualMode = "GPIO_QUAL_ASYNC";
|
||||
gpio3.padConfig = "PULLUP";
|
||||
gpio3.gpioPin.$assign = "GPIO13";
|
||||
|
||||
inputxbar1.$name = "myINPUTXBAR1";
|
||||
inputxbar1.inputxbar1Gpio = "GPIO12";
|
||||
inputxbar1.inputxbar2Gpio = "GPIO13";
|
||||
inputxbar1.inputxbar3Gpio = "GPIO14";
|
||||
inputxbar1.inputxbar1Lock = true;
|
||||
inputxbar1.inputxbar2Lock = true;
|
||||
inputxbar1.inputxbar3Lock = true;
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio","inputxbar2Gpio"];
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.LUT_2.i0 = "COUNTER_0.count_match1";
|
||||
TILE1.LUT_2.i1 = "COUNTER_1.count_match1";
|
||||
TILE1.LUT_2.eqn = "i0 | i1";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE1.FSM_0.eqn_out = "(!s0 & !s1 & e1) | (s0 & !s1 & !e0)";
|
||||
TILE1.FSM_0.eqn_s0 = "(s0 & !e0) | (s0 & s1) | (!s0 & !s1 & e1)";
|
||||
TILE1.FSM_0.eqn_s1 = "s1 | (s0 & e0)";
|
||||
TILE1.FSM_0.e1 = "BOUNDARY.in7";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_1.e0 = "BOUNDARY.in1";
|
||||
TILE1.FSM_1.e1 = "BOUNDARY.in7";
|
||||
TILE1.FSM_1.eqn_out = "(!s0 & !s1 & e1) | (s0 & !s1 & !e0)";
|
||||
TILE1.FSM_1.eqn_s0 = "(s0 & !e0) | (s0 & s1) | (!s0 & !s1 & e1)";
|
||||
TILE1.FSM_1.eqn_s1 = "s1 | (s0 & e0)";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.match1_val = "2147483647";
|
||||
TILE1.COUNTER_0.action = "Load";
|
||||
TILE1.COUNTER_0.mode0 = "FSM_0.OUT";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.mode1 = "1";
|
||||
TILE1.COUNTER_1.match1_val = "2147483647";
|
||||
TILE1.COUNTER_1.reset = "COUNTER_1.count_match1";
|
||||
TILE1.COUNTER_1.action = "Load";
|
||||
TILE1.COUNTER_1.mode0 = "FSM_1.OUT";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.COUNTER_2.reset = "COUNTER_2.count_match1";
|
||||
TILE1.COUNTER_2.event = "1";
|
||||
TILE1.COUNTER_2.mode1 = "1";
|
||||
TILE1.COUNTER_2.action = "Add";
|
||||
TILE1.COUNTER_2.match1_val = "2147483647";
|
||||
TILE1.COUNTER_2.mode0 = "LUT_2.OUT";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "BOUNDARY.in0";
|
||||
TILE1.HLC.e1 = "BOUNDARY.in1";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "MOV C0, R0";
|
||||
TILE1.HLC.program0.instruct2 = "INTR 12";
|
||||
TILE1.HLC.program0.instruct1 = "MOV C2, R2";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program1.instruct0 = "MOV C1, R1";
|
||||
TILE1.HLC.program1.instruct2 = "INTR 13";
|
||||
TILE1.HLC.program1.instruct1 = "MOV C2, R3";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,132 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex2_gpio_input_filter.c
|
||||
//
|
||||
// TITLE: CLB GPIO Input Filter.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB GPIO Input Filter</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! This example demonstrates use of finite state machines (FSMs) and counters
|
||||
//! to implement a simple âglitchâ filter which might, for example, be applied
|
||||
//! to an incoming GPIO signal to remove unwanted short duration pulses.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
#define EPWM1_TIMER_TBPRD 0xFFFF
|
||||
#define EPWM1_CMPA 0x0003
|
||||
#define EPWM1_CMPB 0xFFFC
|
||||
#define MODE_CHG_COUNT 10000U
|
||||
|
||||
void initEPWM1(void);
|
||||
void initCLB1(void);
|
||||
|
||||
uint32_t ccount = 0UL;
|
||||
uint16_t cglitch = 3U;
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
initEPWM1();
|
||||
CLB_setOutputMask(myTILE1_BASE, 0x1, true);
|
||||
|
||||
EPWM_setTimeBaseCounterMode(myEPWM1_BASE, EPWM_COUNTER_MODE_UP);
|
||||
|
||||
while(1)
|
||||
{
|
||||
if (ccount++ > MODE_CHG_COUNT)
|
||||
{
|
||||
EPWM_setCounterCompareValue (myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, cglitch);
|
||||
EPWM_setCounterCompareValue (myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, cglitch);
|
||||
ccount = 0;
|
||||
}
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void initEPWM1()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM1_BASE, EPWM1_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM1_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM1_BASE, 0U);
|
||||
|
||||
EPWM_enableSyncOutPulseSource(myEPWM1_BASE, EPWM_SYNC_OUT_PULSE_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, EPWM1_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, EPWM1_CMPB);
|
||||
|
||||
EPWM_disablePhaseShiftLoad(myEPWM1_BASE);
|
||||
EPWM_setClockPrescaler(myEPWM1_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_duty0 = 20;
|
||||
TILE1.BOUNDARY.in_period0 = 40;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.eqn = "~i0";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_0.e1 = "COUNTER_1.count_match1";
|
||||
TILE1.FSM_0.eqn_s0 = "(~s0 & e1) | (s0 & (~e0))";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.match1_val = "8";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.mode0 = "LUT_0.OUT";
|
||||
TILE1.COUNTER_0.reset = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.match1_val = "8";
|
||||
TILE1.COUNTER_1.mode1 = "1";
|
||||
TILE1.COUNTER_1.mode0 = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_1.reset = "LUT_0.OUT";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.eqn = "i0";
|
||||
TILE1.OUTLUT_0.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,304 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex30_Cylic_Redundancy_Check.c
|
||||
//
|
||||
// TITLE: CLB Cyclic Redundancy Check(C.R.C./CRC)
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB CRC</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, the CLB module is used to perform the cyclic redundancy check (C.R.C.)
|
||||
//! with twelve messages in bits checked with ten different CRC polynomials.
|
||||
//!
|
||||
//! First element passed in is message length, second is the message stored in input_data
|
||||
//!
|
||||
//! This example is only available for CLB types 2 and up.
|
||||
//!
|
||||
//! The known values in the output_data are compared with expected values from the CLB-based
|
||||
//! CRC calculation. A total of 120 messages are verified, and the number of matching messages
|
||||
//! are displayed in passCount
|
||||
//!
|
||||
//! Variables to add to Watch Expressions in debug view:
|
||||
//! passCount - number of messages that match between generated and known CRC values
|
||||
//! failCount - number of messages that fail the CRC value verification
|
||||
//!
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
#define NUM_MESSAGES 12 // Number of input messages
|
||||
#define NUM_CRC_POLY 10 // Number of CRC Polynomials in the test
|
||||
#define BIT_LIMIT (5ul)
|
||||
//
|
||||
// Bit count is limited to 32 bits which denoted as << BIT_LIMIT
|
||||
//
|
||||
#define CLB_GPREG_RESET (1ul<<1)
|
||||
#define CLB_GPREG_ASSERT (1ul<<2)
|
||||
//
|
||||
typedef struct CRC_DATA
|
||||
{
|
||||
uint16_t crcSize;
|
||||
uint32_t crcMask;
|
||||
uint32_t crcPoly;
|
||||
} CRC_DATA;
|
||||
//
|
||||
uint16_t passCount = 0 ;
|
||||
uint16_t failCount = 0 ;
|
||||
//
|
||||
// The CRC_data includes ten different CRC polynomials for test
|
||||
//
|
||||
struct CRC_DATA myCRC[NUM_CRC_POLY] =
|
||||
{
|
||||
// 0 Parity x^1 + x^0
|
||||
{1u, 0x01ul, 0b11ul},
|
||||
// 1 CRC3_GSM x^3 + x^1 + x^0
|
||||
{3u, 0x07ul, 0b1011ul},
|
||||
// 2 CRC4_ITU x^4 + X^1 + X^0 = BiSS-C 0x13
|
||||
{4u, 0x0Ful, 0b10011ul},
|
||||
// 3 CRC5_ITU x^5 + x^4 + x^2 + x^0
|
||||
{5u, 0x1Ful, 0b110101ul},
|
||||
// 4 CRC5_USB x^5 + x^2 + 1 = BiSS-C 0x25
|
||||
{5u, 0x1Ful, 0b100101ul},
|
||||
// 5 CRC6_GSM x^6 + x^5 + x^3 + x^2 + x^1 + x^0
|
||||
{6u, 0x3Ful, 0b1101111ul},
|
||||
// 6 CRC6_ITU x^6 + x^1 + x^0 = BiSS-C 0x43
|
||||
{6u, 0x3Ful, 0b1000011ul},
|
||||
// 7 CRC7 x^7 + x^3 + x^0
|
||||
{7u, 0x7Ful, 0b10001001ul},
|
||||
// 8 CRC8_AUTOSAR x^8 + x^5 + x^3 + x^2 + x + 1
|
||||
{8u, 0xFFul, 0b100101111ul},
|
||||
// 9 CRC30 CDMA x^30 + x^29 + x^21 + x^20 + x^15 +
|
||||
// x^13 + x^12 + x^11 + x^8 + x^7 + x^6 + x^2 + x^1 + x0
|
||||
{30u, 0x3FFFFFFFul, 0b1100000001100001011100111000111ul}
|
||||
};
|
||||
|
||||
//
|
||||
// First element in each input_data is the message length in bits
|
||||
// Second element is the message.
|
||||
//
|
||||
// Note: bit count > 31 is not supported by this
|
||||
// implementation
|
||||
//
|
||||
uint32_t input_data[NUM_MESSAGES][2] =
|
||||
{
|
||||
{1, 0x00000000}, // 0
|
||||
{1, 0x00000001}, // 1
|
||||
{2, 0x00000002}, // 2
|
||||
{8, 0x00000025}, // 3
|
||||
{16, 0x00002516}, // 4
|
||||
{24, 0x00106612}, // 5
|
||||
{18, 0x0002ADCB}, // 6
|
||||
{31, 0x251478AD}, // 7
|
||||
{23, 0x0003F737}, // 8
|
||||
{23, 0x0003FB43}, // 9
|
||||
{23, 0x0003FE13}, // 10
|
||||
{23, 0x0003FFA3} // 11
|
||||
};
|
||||
//
|
||||
// Expected CRC results for each polynomial
|
||||
// Here output will be in rows that is Row_1 indicates first polynomial with all 12 messages
|
||||
//
|
||||
uint32_t output_data[NUM_CRC_POLY][NUM_MESSAGES] = {
|
||||
{0x0ul, 0x1ul, 0x1ul, 0x1ul, 0x0ul, 0x1ul, 0x1ul, 0x0ul, 0x0ul, 0x0ul, 0x0ul, 0x0ul}, // 0
|
||||
{0x0ul, 0x3ul, 0x6ul, 0x6ul, 0x7ul, 0x6ul, 0x2ul, 0x0ul, 0x4ul, 0x0ul, 0x6ul, 0x0ul}, // 1
|
||||
{0x0ul, 0x3ul, 0x6ul, 0x5ul, 0xDul, 0x1ul, 0xBul, 0xAul, 0xAul, 0x6ul, 0x2ul, 0xCul}, // 2
|
||||
{0x00ul, 0x15ul, 0x1Ful, 0x19ul, 0x09ul, 0x02ul, 0x16ul, 0x14ul, 0x14ul, 0x0Cul, 0x17ul, 0x18ul}, // 3
|
||||
{0x00ul, 0x05ul, 0x0aul, 0x00ul, 0x04ul, 0x0Eul, 0x09ul, 0x18ul, 0x19ul, 0x05ul, 0x1Bul, 0x02ul}, // 4
|
||||
{0x00ul, 0x2Ful, 0x31ul, 0x25ul, 0x2Dul, 0x1Cul, 0x37ul, 0x30ul, 0x17ul, 0x0aul, 0x36ul, 0x21ul}, // 5
|
||||
{0x00ul, 0x03ul, 0x06ul, 0x2Cul, 0x23ul, 0x28ul, 0x3ful, 0x12ul, 0x3Ful, 0x10ul, 0x22ul, 0x2Ful}, // 6
|
||||
{0x00ul, 0x09ul, 0x12ul, 0x1Ful, 0x7Aul, 0x73ul, 0x76ul, 0x6Ful, 0x21ul, 0x3Eul, 0x64ul, 0x05ul}, // 7
|
||||
{0x00ul, 0x2Ful, 0x5Eul, 0xe0ul, 0x3Aul, 0xE6ul, 0xCBul, 0x21ul, 0x3Ful, 0xE8ul, 0x9Cul, 0x4Bul}, // 8
|
||||
{0x00ul, 0x2030b9c7ul, 0x2051ca49ul, 0x24a9d36ful, 0x393897e8ul, 0x3f90cada, 0x269a9339, 0x356b051c,
|
||||
0x03f87CEDul, 0x08548079ul, 0x01a89110ul, 0x37066ef0ul } // 9
|
||||
};
|
||||
|
||||
uint32_t calculate_crc(uint32_t *data, uint16_t bitCount, uint16_t crcSize, uint32_t crcPoly);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Disable pin locks and enable internal pull ups.
|
||||
//
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Board Initialization
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Initialize CLB1 Tile
|
||||
//
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
CLB_enableCLB(myTILE1_BASE);
|
||||
|
||||
uint16_t myPoly;
|
||||
|
||||
|
||||
for(myPoly = 0; myPoly < NUM_CRC_POLY; myPoly++)
|
||||
{
|
||||
uint16_t myMessage;
|
||||
|
||||
for(myMessage = 0; myMessage < NUM_MESSAGES; myMessage++ )
|
||||
{
|
||||
uint16_t bitCount;
|
||||
uint32_t crc;
|
||||
|
||||
//
|
||||
// CRC verification is done based on bit specified in bitCount
|
||||
//
|
||||
bitCount = input_data[myMessage][0];
|
||||
|
||||
crc = 0x00;
|
||||
crc = calculate_crc(&input_data[myMessage][1], bitCount,
|
||||
myCRC[myPoly].crcSize, myCRC[myPoly].crcPoly);
|
||||
|
||||
crc &= myCRC[myPoly].crcMask;
|
||||
if (crc == output_data[myPoly][myMessage])
|
||||
{
|
||||
passCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// Passcount displays - number which satisfies the CRC
|
||||
// Failcount displays - number which fails the CRC
|
||||
//
|
||||
if( passCount == (NUM_MESSAGES * NUM_CRC_POLY) && failCount == 0)
|
||||
{
|
||||
// all passed
|
||||
asm(" ESTOP0");
|
||||
}
|
||||
else
|
||||
{
|
||||
// failures
|
||||
asm(" ESTOP0");
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t calculate_crc(uint32_t * data, uint16_t bitCount,
|
||||
uint16_t crcSize, uint32_t crcPoly)
|
||||
{
|
||||
uint32_t crc;
|
||||
uint32_t msg;
|
||||
//
|
||||
// RESET and STOP (reset = 1, mode0 = 0)
|
||||
//
|
||||
CLB_setGPREG(myTILE1_BASE, (0 << 2 ) | (1 << 0));
|
||||
msg = *data;
|
||||
//
|
||||
// Using COUNTER_0 as Linear Feedback Shift Register (LFSR)
|
||||
// to calculate the CRC of the input
|
||||
//
|
||||
// Initialize the CRC polynomial and polynomial power.
|
||||
// match2 -> polynomial
|
||||
// match1 -> crc size - 1
|
||||
// mode_1 -> 1
|
||||
//
|
||||
|
||||
// CRC generator
|
||||
//
|
||||
CLB_writeInterface(myTILE1_BASE, CLB_ADDR_COUNTER_0_MATCH1, crcSize - 1);
|
||||
CLB_writeInterface(myTILE1_BASE, CLB_ADDR_COUNTER_0_MATCH2, crcPoly);
|
||||
|
||||
//
|
||||
// Serialize Data - feeds the data to the CRC generator input
|
||||
//
|
||||
CLB_configCounterTapSelects(myTILE1_BASE, (bitCount) << BIT_LIMIT);
|
||||
CLB_writeInterface(myTILE1_BASE, CLB_ADDR_COUNTER_1_LOAD, msg);
|
||||
|
||||
//
|
||||
// Bit count is limited to 32 bits which denoted as << BIT_LIMIT
|
||||
// Counts the number of shifts required to serialize the data
|
||||
// to the CRC generator.
|
||||
// When the count is matched, the CRC and serializer are halted
|
||||
//
|
||||
CLB_writeInterface(myTILE1_BASE, CLB_ADDR_COUNTER_2_MATCH1, (bitCount + crcSize + 1) );
|
||||
|
||||
//
|
||||
// Release RESET and assert RUN
|
||||
// Wait for the CRC to complete, then read the CRC Result on the passcount and failcount
|
||||
//
|
||||
CLB_setGPREG(myTILE1_BASE, CLB_GPREG_ASSERT);
|
||||
while(CLB_getInterruptTag(myTILE1_BASE) != 1)
|
||||
{
|
||||
}
|
||||
crc = CLB_getRegister(myTILE1_BASE, CLB_REG_CTR_C0);
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
return(crc);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
@@ -0,0 +1,92 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
const clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
const clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
const clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN2"];
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 3000000;
|
||||
TILE.reset_duration = 10000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count5 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 1;
|
||||
TILE1.BOUNDARY.in_period2 = 80;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 1;
|
||||
TILE1.BOUNDARY.in_duty2 = 60;
|
||||
TILE1.BOUNDARY.in_duty5 = 8;
|
||||
TILE1.BOUNDARY.in_period0 = 15;
|
||||
TILE1.BOUNDARY.in_duty0 = 12;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_1.i0 = "COUNTER_2.count_match1";
|
||||
TILE1.LUT_1.i1 = "BOUNDARY.in2";
|
||||
TILE1.LUT_1.eqn = "~i0 & i1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.action = "Add";
|
||||
TILE1.COUNTER_0.serializer_en = true;
|
||||
TILE1.COUNTER_0.lfsr_en = true;
|
||||
TILE1.COUNTER_0.mode0 = "LUT_1.OUT";
|
||||
TILE1.COUNTER_0.event = "COUNTER_1.count_match1";
|
||||
TILE1.COUNTER_0.reset = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.match2_val = "0b1000011";
|
||||
TILE1.COUNTER_0.match1_val = "5";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.match2_val = "";
|
||||
TILE1.COUNTER_1.match1_val = "";
|
||||
TILE1.COUNTER_1.serializer_en = true;
|
||||
TILE1.COUNTER_1.match1_tap_en = true;
|
||||
TILE1.COUNTER_1.mode0 = "LUT_1.OUT";
|
||||
TILE1.COUNTER_1.mode1 = "1";
|
||||
TILE1.COUNTER_1.event_load_val = "";
|
||||
TILE1.COUNTER_1.match1_tap_sel = 6;
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.COUNTER_2.match2_val = "";
|
||||
TILE1.COUNTER_2.event_load_val = "";
|
||||
TILE1.COUNTER_2.mode0 = "LUT_1.OUT";
|
||||
TILE1.COUNTER_2.mode1 = "1";
|
||||
TILE1.COUNTER_2.reset = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_2.match1_val = "13";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_2.count_match1";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex3_auxiliary_pwm.c
|
||||
//
|
||||
// TITLE: CLB Auxilary PWM.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Auxilary PWM</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! This example configures a CLB tile as an auxiliary PWM generator. The
|
||||
//! example uses combinatorial logic (LUTs), state machines (FSMs), counters,
|
||||
//! and the high level controller (HLC) to demonstrate the PWM output generation
|
||||
//! capabilities using CLB.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
#define ENABLE_AUX_PWM 1
|
||||
volatile uint16_t dutyValue=200;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
CLB_setGPREG(myTILE1_BASE, ENABLE_AUX_PWM);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
GPIO_togglePin(myGPIO0); // Debug: Used to determine if interrupt is being set
|
||||
|
||||
//
|
||||
// Change duty cycle of PWM signal at the end of a period
|
||||
//
|
||||
if (dutyValue == 150)
|
||||
{
|
||||
dutyValue = 100U;
|
||||
}
|
||||
else
|
||||
{
|
||||
dutyValue = 150U;
|
||||
}
|
||||
|
||||
//
|
||||
// Load new duty cycle value in HLC Registers
|
||||
//
|
||||
CLB_setHLCRegisters(myTILE1_BASE, dutyValue, 0, 0, 0);
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO2";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_duty1 = 50;
|
||||
TILE1.BOUNDARY.in_period1 = 100;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 1000;
|
||||
TILE1.BOUNDARY.in_period0 = 50000;
|
||||
TILE1.BOUNDARY.in_duty0 = 49000;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_0.i1 = "COUNTER_0.count_match1";
|
||||
TILE1.LUT_0.eqn = "~i0 | i1";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1))";
|
||||
TILE1.FSM_0.e0 = "COUNTER_0.count_match2";
|
||||
TILE1.FSM_0.e1 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "LUT_0.OUT";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.match1_val = "300";
|
||||
TILE1.COUNTER_0.match2_val = "100";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.R0_init = "200";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "MOV_T2 R0, C0";
|
||||
TILE1.HLC.program0.instruct1 = "INTR 1";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,264 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex4_pwm_protection.c
|
||||
//
|
||||
// TITLE: CLB PWM Protection.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB PWM Protection</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! This example extends the features of example 1 to ensure an active high
|
||||
//! complementary pair PWM configuration always operates with a minimum value
|
||||
//! of dead-band irrespective of how the generating PWM module is configured.
|
||||
//! The example illustrates the configuration of four separate PWM tiles to
|
||||
//! implement PWM protection on four PWM modules. The outputs of PWM modules
|
||||
//! 1 to 4 are operated on by CLB tiles 1 to 4, respectively.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
#define EPWM1_TIMER_TBPRD 2000U
|
||||
#define EPWM1_CMPA 933U
|
||||
#define EPWM1_CMPB 933U
|
||||
|
||||
#define EPWM2_TIMER_TBPRD 2000U
|
||||
#define EPWM2_CMPA 933U
|
||||
#define EPWM2_CMPB 933U
|
||||
|
||||
#define EPWM3_TIMER_TBPRD 2000U
|
||||
#define EPWM3_CMPA 933U
|
||||
#define EPWM3_CMPB 933U
|
||||
|
||||
#define EPWM4_TIMER_TBPRD 2000U
|
||||
#define EPWM4_CMPA 933U
|
||||
#define EPWM4_CMPB 933U
|
||||
|
||||
|
||||
void initEPWM1(void);
|
||||
void initEPWM2(void);
|
||||
void initEPWM3(void);
|
||||
void initEPWM4(void);
|
||||
__interrupt void epwm1ISR(void);
|
||||
|
||||
uint32_t mode = 0;
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
Interrupt_register(INT_EPWM1, &epwm1ISR);
|
||||
|
||||
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB3);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB4);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
initTILE2(myTILE2_BASE);
|
||||
initTILE3(myTILE3_BASE);
|
||||
initTILE4(myTILE4_BASE);
|
||||
|
||||
initEPWM1();
|
||||
initEPWM2();
|
||||
initEPWM3();
|
||||
initEPWM4();
|
||||
|
||||
// start PWMs
|
||||
EPWM_setTimeBaseCounterMode(myEPWM1_BASE, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM2_BASE, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM3_BASE, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM4_BASE, EPWM_COUNTER_MODE_UP);
|
||||
|
||||
Interrupt_enable(INT_EPWM1);
|
||||
EINT;
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void initEPWM1()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM1_BASE, EPWM1_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM1_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM1_BASE, 0U);
|
||||
|
||||
EPWM_enableSyncOutPulseSource(myEPWM1_BASE, EPWM_SYNC_OUT_PULSE_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, EPWM1_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, EPWM1_CMPB);
|
||||
|
||||
EPWM_disablePhaseShiftLoad(myEPWM1_BASE);
|
||||
EPWM_setClockPrescaler(myEPWM1_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
EPWM_setInterruptSource(myEPWM1_BASE, EPWM_INT_TBCTR_ZERO);
|
||||
EPWM_enableInterrupt(myEPWM1_BASE);
|
||||
EPWM_setInterruptEventCount(myEPWM1_BASE, 3U);
|
||||
}
|
||||
|
||||
|
||||
void initEPWM2()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM2_BASE, EPWM2_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM2_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM2_BASE, 0U);
|
||||
|
||||
EPWM_enablePhaseShiftLoad(myEPWM2_BASE);
|
||||
EPWM_setPhaseShift(myEPWM2_BASE, 0U);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM2_BASE, EPWM_COUNTER_COMPARE_A, EPWM2_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM2_BASE, EPWM_COUNTER_COMPARE_B, EPWM2_CMPB);
|
||||
|
||||
EPWM_setClockPrescaler(myEPWM2_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM2_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM2_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
}
|
||||
|
||||
|
||||
void initEPWM3()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM3_BASE, EPWM3_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM3_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM3_BASE, 0U);
|
||||
|
||||
EPWM_enablePhaseShiftLoad(myEPWM3_BASE);
|
||||
EPWM_setPhaseShift(myEPWM3_BASE, 0U);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM3_BASE, EPWM_COUNTER_COMPARE_A, EPWM3_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM3_BASE, EPWM_COUNTER_COMPARE_B, EPWM3_CMPB);
|
||||
|
||||
EPWM_setClockPrescaler(myEPWM3_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM3_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM3_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
}
|
||||
|
||||
|
||||
void initEPWM4()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM4_BASE, EPWM4_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM4_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM4_BASE, 0U);
|
||||
|
||||
EPWM_enablePhaseShiftLoad(myEPWM4_BASE);
|
||||
EPWM_setPhaseShift(myEPWM4_BASE, 0U);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM4_BASE, EPWM_COUNTER_COMPARE_A, EPWM4_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM4_BASE, EPWM_COUNTER_COMPARE_B, EPWM4_CMPB);
|
||||
|
||||
EPWM_setClockPrescaler(myEPWM4_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM4_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM4_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
}
|
||||
|
||||
|
||||
__interrupt void epwm1ISR(void)
|
||||
{
|
||||
EPWM_clearEventTriggerInterruptFlag(myEPWM1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP3);
|
||||
|
||||
if (mode == 0)
|
||||
{
|
||||
CLB_setOutputMask(myTILE1_BASE, 0x5, false);
|
||||
CLB_setOutputMask(myTILE2_BASE, 0x5, false);
|
||||
CLB_setOutputMask(myTILE3_BASE, 0x5, false);
|
||||
CLB_setOutputMask(myTILE4_BASE, 0x5, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLB_setOutputMask(myTILE1_BASE, 0x5, true);
|
||||
CLB_setOutputMask(myTILE2_BASE, 0x5, true);
|
||||
CLB_setOutputMask(myTILE3_BASE, 0x5, true);
|
||||
CLB_setOutputMask(myTILE4_BASE, 0x5, true);
|
||||
}
|
||||
asm(" NOP");
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
@@ -0,0 +1,388 @@
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clb3 = clb.addInstance();
|
||||
const clb4 = clb.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const epwm2 = epwm.addInstance();
|
||||
const epwm3 = epwm.addInstance();
|
||||
const epwm4 = epwm.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
const TILE3 = TILE.addInstance();
|
||||
const TILE4 = TILE.addInstance();
|
||||
const clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
const clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
const clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
const clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2","CLB_IN3"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN2 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN3 = "GLOBAL";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.synchronizeCLB_IN2 = true;
|
||||
clb1.synchronizeCLB_IN3 = true;
|
||||
clb1.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM1B";
|
||||
clb1.globalConfigCLB_IN3 = "CLB_GLOBAL_IN_MUX_EPWM1B";
|
||||
clb1.filterConfigCLB_IN0 = "CLB_FILTER_FALLING_EDGE";
|
||||
clb1.filterConfigCLB_IN2 = "CLB_FILTER_FALLING_EDGE";
|
||||
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.$name = "myTILE2";
|
||||
clb2.enableCLB = true;
|
||||
clb2.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2","CLB_IN3"];
|
||||
clb2.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb2.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb2.inputTypeCLB_IN2 = "GLOBAL";
|
||||
clb2.inputTypeCLB_IN3 = "GLOBAL";
|
||||
clb2.synchronizeCLB_IN0 = true;
|
||||
clb2.synchronizeCLB_IN1 = true;
|
||||
clb2.synchronizeCLB_IN2 = true;
|
||||
clb2.synchronizeCLB_IN3 = true;
|
||||
clb2.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM2A";
|
||||
clb2.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM2A";
|
||||
clb2.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM2B";
|
||||
clb2.globalConfigCLB_IN3 = "CLB_GLOBAL_IN_MUX_EPWM2B";
|
||||
clb2.filterConfigCLB_IN0 = "CLB_FILTER_FALLING_EDGE";
|
||||
clb2.filterConfigCLB_IN2 = "CLB_FILTER_FALLING_EDGE";
|
||||
|
||||
clb3.clbBase = "CLB3_BASE";
|
||||
clb3.$name = "myTILE3";
|
||||
clb3.enableCLB = true;
|
||||
clb3.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2","CLB_IN3"];
|
||||
clb3.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb3.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM3A";
|
||||
clb3.filterConfigCLB_IN0 = "CLB_FILTER_FALLING_EDGE";
|
||||
clb3.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb3.inputTypeCLB_IN2 = "GLOBAL";
|
||||
clb3.inputTypeCLB_IN3 = "GLOBAL";
|
||||
clb3.synchronizeCLB_IN0 = true;
|
||||
clb3.synchronizeCLB_IN1 = true;
|
||||
clb3.synchronizeCLB_IN2 = true;
|
||||
clb3.synchronizeCLB_IN3 = true;
|
||||
clb3.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM3A";
|
||||
clb3.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM3B";
|
||||
clb3.globalConfigCLB_IN3 = "CLB_GLOBAL_IN_MUX_EPWM3B";
|
||||
clb3.filterConfigCLB_IN2 = "CLB_FILTER_FALLING_EDGE";
|
||||
|
||||
clb4.clbBase = "CLB4_BASE";
|
||||
clb4.$name = "myTILE4";
|
||||
clb4.enableCLB = true;
|
||||
clb4.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2","CLB_IN3"];
|
||||
clb4.inputTypeCLB_IN3 = "GLOBAL";
|
||||
clb4.inputTypeCLB_IN2 = "GLOBAL";
|
||||
clb4.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb4.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb4.synchronizeCLB_IN0 = true;
|
||||
clb4.synchronizeCLB_IN1 = true;
|
||||
clb4.synchronizeCLB_IN2 = true;
|
||||
clb4.synchronizeCLB_IN3 = true;
|
||||
clb4.filterConfigCLB_IN0 = "CLB_FILTER_FALLING_EDGE";
|
||||
clb4.filterConfigCLB_IN2 = "CLB_FILTER_FALLING_EDGE";
|
||||
clb4.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM4A";
|
||||
clb4.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM4A";
|
||||
clb4.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM4B";
|
||||
clb4.globalConfigCLB_IN3 = "CLB_GLOBAL_IN_MUX_EPWM4B";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
epwm2.$name = "myEPWM2";
|
||||
epwm2.epwm.$assign = "EPWM2";
|
||||
epwm2.epwm.epwmaPin.$assign = "GPIO2";
|
||||
epwm2.epwm.epwmbPin.$assign = "GPIO3";
|
||||
|
||||
epwm3.$name = "myEPWM3";
|
||||
epwm3.epwm.$assign = "EPWM3";
|
||||
epwm3.epwm.epwmaPin.$assign = "GPIO4";
|
||||
epwm3.epwm.epwmbPin.$assign = "GPIO5";
|
||||
|
||||
epwm4.$name = "myEPWM4";
|
||||
epwm4.epwm.$assign = "EPWM4";
|
||||
epwm4.epwm.epwmaPin.$assign = "GPIO6";
|
||||
epwm4.epwm.epwmbPin.$assign = "GPIO7";
|
||||
|
||||
TILE.sim_duration = 500000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.boundaryInput1 = "squareWave";
|
||||
TILE1.BOUNDARY.boundaryInput2 = "squareWave";
|
||||
TILE1.BOUNDARY.boundaryInput3 = "squareWave";
|
||||
TILE1.BOUNDARY.in_edge2 = "falling edge";
|
||||
TILE1.BOUNDARY.in_edge0 = "falling edge";
|
||||
TILE1.BOUNDARY.in_period0 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 500;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 500;
|
||||
TILE1.BOUNDARY.in_duty2 = 250;
|
||||
TILE1.BOUNDARY.in_period3 = 500;
|
||||
TILE1.BOUNDARY.in_duty3 = 250;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_1.i0 = "FSM_0.S0";
|
||||
TILE1.LUT_1.eqn = "~(i0 | i1)";
|
||||
TILE1.LUT_1.i1 = "BOUNDARY.in0";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.LUT_2.i0 = "FSM_1.S0";
|
||||
TILE1.LUT_2.eqn = "~(i0 | i1)";
|
||||
TILE1.LUT_2.i1 = "BOUNDARY.in2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e1 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_0.eqn_out = "~s0";
|
||||
TILE1.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE1.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_1.e1 = "COUNTER_1.count_match1";
|
||||
TILE1.FSM_1.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE1.FSM_1.eqn_out = "~s0";
|
||||
TILE1.FSM_1.e0 = "BOUNDARY.in2";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.match1_val = "10";
|
||||
TILE1.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.reset = "FSM_1.OUT";
|
||||
TILE1.COUNTER_1.mode0 = "FSM_1.S0";
|
||||
TILE1.COUNTER_1.match1_val = "10";
|
||||
TILE1.COUNTER_1.mode1 = "1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE1.OUTLUT_0.i0 = "LUT_2.OUT";
|
||||
TILE1.OUTLUT_0.i2 = "BOUNDARY.in3";
|
||||
TILE1.OUTLUT_0.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_2.i1 = "BOUNDARY.in3";
|
||||
TILE1.OUTLUT_2.i0 = "LUT_1.OUT";
|
||||
TILE1.OUTLUT_2.i2 = "BOUNDARY.in1";
|
||||
TILE1.OUTLUT_2.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_3.eqn = "0";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program2.instruct0 = "mov r0,c0";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
TILE2.$name = "TILE2";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_1.eqn = "~(i0 | i1)";
|
||||
TILE2.LUT_1.i0 = "FSM_0.S0";
|
||||
TILE2.LUT_1.i1 = "BOUNDARY.in0";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.LUT_2.eqn = "~(i0 | i1)";
|
||||
TILE2.LUT_2.i1 = "BOUNDARY.in2";
|
||||
TILE2.LUT_2.i0 = "FSM_1.S0";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_0.eqn_out = "~s0";
|
||||
TILE2.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE2.FSM_0.e1 = "COUNTER_0.count_match1";
|
||||
TILE2.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_1.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE2.FSM_1.eqn_out = "~s0";
|
||||
TILE2.FSM_1.e0 = "BOUNDARY.in2";
|
||||
TILE2.FSM_1.e1 = "COUNTER_1.count_match1";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE2.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE2.COUNTER_0.mode1 = "1";
|
||||
TILE2.COUNTER_0.match1_val = "10";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_1.reset = "FSM_1.OUT";
|
||||
TILE2.COUNTER_1.mode0 = "FSM_1.S0";
|
||||
TILE2.COUNTER_1.mode1 = "1";
|
||||
TILE2.COUNTER_1.match1_val = "10";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_0.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE2.OUTLUT_0.i0 = "LUT_2.OUT";
|
||||
TILE2.OUTLUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE2.OUTLUT_0.i2 = "BOUNDARY.in3";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_2.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE2.OUTLUT_2.i0 = "LUT_1.OUT";
|
||||
TILE2.OUTLUT_2.i1 = "BOUNDARY.in3";
|
||||
TILE2.OUTLUT_2.i2 = "BOUNDARY.in1";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE2.AOC_0.$name = "AOC_8";
|
||||
TILE2.AOC_1.$name = "AOC_9";
|
||||
TILE2.AOC_2.$name = "AOC_10";
|
||||
TILE2.AOC_3.$name = "AOC_11";
|
||||
TILE2.AOC_4.$name = "AOC_12";
|
||||
TILE2.AOC_5.$name = "AOC_13";
|
||||
TILE2.AOC_6.$name = "AOC_14";
|
||||
TILE2.AOC_7.$name = "AOC_15";
|
||||
|
||||
TILE3.$name = "TILE3";
|
||||
TILE3.BOUNDARY.$name = "BOUNDARY2";
|
||||
TILE3.LUT_0.$name = "LUT_6";
|
||||
TILE3.LUT_1.$name = "LUT_7";
|
||||
TILE3.LUT_1.eqn = "~(i0 | i1)";
|
||||
TILE3.LUT_1.i0 = "FSM_0.S0";
|
||||
TILE3.LUT_1.i1 = "BOUNDARY.in0";
|
||||
TILE3.LUT_2.$name = "LUT_8";
|
||||
TILE3.LUT_2.eqn = "~(i0 | i1)";
|
||||
TILE3.LUT_2.i0 = "FSM_1.S0";
|
||||
TILE3.LUT_2.i1 = "BOUNDARY.in2";
|
||||
TILE3.FSM_0.$name = "FSM_6";
|
||||
TILE3.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE3.FSM_0.eqn_out = "~s0";
|
||||
TILE3.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE3.FSM_0.e1 = "COUNTER_0.count_match1";
|
||||
TILE3.FSM_1.$name = "FSM_7";
|
||||
TILE3.FSM_1.eqn_out = "~s0";
|
||||
TILE3.FSM_1.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE3.FSM_1.e0 = "BOUNDARY.in2";
|
||||
TILE3.FSM_1.e1 = "COUNTER_1.count_match1";
|
||||
TILE3.FSM_2.$name = "FSM_8";
|
||||
TILE3.COUNTER_0.$name = "COUNTER_6";
|
||||
TILE3.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE3.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE3.COUNTER_0.mode1 = "1";
|
||||
TILE3.COUNTER_0.match1_val = "10";
|
||||
TILE3.COUNTER_1.$name = "COUNTER_7";
|
||||
TILE3.COUNTER_1.reset = "FSM_1.OUT";
|
||||
TILE3.COUNTER_1.mode1 = "1";
|
||||
TILE3.COUNTER_1.match1_val = "10";
|
||||
TILE3.COUNTER_1.mode0 = "FSM_1.S0";
|
||||
TILE3.COUNTER_2.$name = "COUNTER_8";
|
||||
TILE3.OUTLUT_0.$name = "OUTLUT_16";
|
||||
TILE3.OUTLUT_0.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE3.OUTLUT_0.i0 = "LUT_2.OUT";
|
||||
TILE3.OUTLUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE3.OUTLUT_0.i2 = "BOUNDARY.in3";
|
||||
TILE3.OUTLUT_1.$name = "OUTLUT_17";
|
||||
TILE3.OUTLUT_2.$name = "OUTLUT_18";
|
||||
TILE3.OUTLUT_2.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE3.OUTLUT_2.i0 = "LUT_1.OUT";
|
||||
TILE3.OUTLUT_2.i1 = "BOUNDARY.in3";
|
||||
TILE3.OUTLUT_2.i2 = "BOUNDARY.in1";
|
||||
TILE3.OUTLUT_3.$name = "OUTLUT_19";
|
||||
TILE3.OUTLUT_4.$name = "OUTLUT_20";
|
||||
TILE3.OUTLUT_5.$name = "OUTLUT_21";
|
||||
TILE3.OUTLUT_6.$name = "OUTLUT_22";
|
||||
TILE3.OUTLUT_7.$name = "OUTLUT_23";
|
||||
TILE3.HLC.$name = "HLC_2";
|
||||
TILE3.HLC.program0.$name = "HLCP_8";
|
||||
TILE3.HLC.program1.$name = "HLCP_9";
|
||||
TILE3.HLC.program2.$name = "HLCP_10";
|
||||
TILE3.HLC.program3.$name = "HLCP_11";
|
||||
TILE3.AOC_0.$name = "AOC_16";
|
||||
TILE3.AOC_1.$name = "AOC_17";
|
||||
TILE3.AOC_2.$name = "AOC_18";
|
||||
TILE3.AOC_3.$name = "AOC_19";
|
||||
TILE3.AOC_4.$name = "AOC_20";
|
||||
TILE3.AOC_5.$name = "AOC_21";
|
||||
TILE3.AOC_6.$name = "AOC_22";
|
||||
TILE3.AOC_7.$name = "AOC_23";
|
||||
|
||||
TILE4.$name = "TILE4";
|
||||
TILE4.BOUNDARY.$name = "BOUNDARY3";
|
||||
TILE4.LUT_0.$name = "LUT_9";
|
||||
TILE4.LUT_1.$name = "LUT_10";
|
||||
TILE4.LUT_1.eqn = "~(i0 | i1)";
|
||||
TILE4.LUT_1.i0 = "FSM_0.S0";
|
||||
TILE4.LUT_1.i1 = "BOUNDARY.in0";
|
||||
TILE4.LUT_2.$name = "LUT_11";
|
||||
TILE4.LUT_2.eqn = "~(i0 | i1)";
|
||||
TILE4.LUT_2.i0 = "FSM_1.S0";
|
||||
TILE4.LUT_2.i1 = "BOUNDARY.in2";
|
||||
TILE4.FSM_0.$name = "FSM_9";
|
||||
TILE4.FSM_0.eqn_out = "~s0";
|
||||
TILE4.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE4.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE4.FSM_0.e1 = "COUNTER_0.count_match1";
|
||||
TILE4.FSM_1.$name = "FSM_10";
|
||||
TILE4.FSM_1.eqn_out = "~s0";
|
||||
TILE4.FSM_1.eqn_s0 = "(~s0 & e0) | (s0 & (~e1)) ";
|
||||
TILE4.FSM_1.e0 = "BOUNDARY.in2";
|
||||
TILE4.FSM_1.e1 = "COUNTER_1.count_match1";
|
||||
TILE4.FSM_2.$name = "FSM_11";
|
||||
TILE4.COUNTER_0.$name = "COUNTER_9";
|
||||
TILE4.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE4.COUNTER_0.mode0 = "FSM_0.S0";
|
||||
TILE4.COUNTER_0.mode1 = "1";
|
||||
TILE4.COUNTER_0.match1_val = "10";
|
||||
TILE4.COUNTER_1.$name = "COUNTER_10";
|
||||
TILE4.COUNTER_1.reset = "FSM_1.OUT";
|
||||
TILE4.COUNTER_1.mode0 = "FSM_1.S0";
|
||||
TILE4.COUNTER_1.mode1 = "1";
|
||||
TILE4.COUNTER_1.match1_val = "10";
|
||||
TILE4.COUNTER_2.$name = "COUNTER_11";
|
||||
TILE4.OUTLUT_0.$name = "OUTLUT_24";
|
||||
TILE4.OUTLUT_0.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE4.OUTLUT_0.i0 = "LUT_2.OUT";
|
||||
TILE4.OUTLUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE4.OUTLUT_0.i2 = "BOUNDARY.in3";
|
||||
TILE4.OUTLUT_1.$name = "OUTLUT_25";
|
||||
TILE4.OUTLUT_2.$name = "OUTLUT_26";
|
||||
TILE4.OUTLUT_2.eqn = "i0 & (~(i1 & i2)) & i1";
|
||||
TILE4.OUTLUT_2.i0 = "LUT_1.OUT";
|
||||
TILE4.OUTLUT_2.i1 = "BOUNDARY.in3";
|
||||
TILE4.OUTLUT_2.i2 = "BOUNDARY.in1";
|
||||
TILE4.OUTLUT_3.$name = "OUTLUT_27";
|
||||
TILE4.OUTLUT_4.$name = "OUTLUT_28";
|
||||
TILE4.OUTLUT_5.$name = "OUTLUT_29";
|
||||
TILE4.OUTLUT_6.$name = "OUTLUT_30";
|
||||
TILE4.OUTLUT_7.$name = "OUTLUT_31";
|
||||
TILE4.HLC.$name = "HLC_3";
|
||||
TILE4.HLC.program0.$name = "HLCP_12";
|
||||
TILE4.HLC.program1.$name = "HLCP_13";
|
||||
TILE4.HLC.program2.$name = "HLCP_14";
|
||||
TILE4.HLC.program3.$name = "HLCP_15";
|
||||
TILE4.AOC_0.$name = "AOC_24";
|
||||
TILE4.AOC_1.$name = "AOC_25";
|
||||
TILE4.AOC_2.$name = "AOC_26";
|
||||
TILE4.AOC_3.$name = "AOC_27";
|
||||
TILE4.AOC_4.$name = "AOC_28";
|
||||
TILE4.AOC_5.$name = "AOC_29";
|
||||
TILE4.AOC_6.$name = "AOC_30";
|
||||
TILE4.AOC_7.$name = "AOC_31";
|
||||
@@ -0,0 +1,443 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex5_event_window.c
|
||||
//
|
||||
// TITLE: CLB Event Window.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Event Window</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! This example uses the counter, FSM, and HLC sub-modules of the CLB to implement
|
||||
//! an event timing feature which detects whether an interrupt service routine
|
||||
//! takes too long to respond to an interrupt. The example configures four PWM
|
||||
//! modules to operate in up-count mode and generate a low-to-high edge on a timer
|
||||
//! zero match event. The zero match event also triggers a PWM ISR which, for the
|
||||
//! purposes of this example, contains a dummy payload of variable length. At the
|
||||
//! end of the ISR, a write operation takes place to a CLB GP register to indicate
|
||||
//! the ISR has ended.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
#define EPWM1_TIMER_TBPRD 20000U
|
||||
#define EPWM1_CMPA 1933U
|
||||
#define EPWM1_CMPB 1933U
|
||||
|
||||
#define EPWM2_TIMER_TBPRD 25000U
|
||||
#define EPWM2_CMPA 1933U
|
||||
#define EPWM2_CMPB 1933U
|
||||
|
||||
#define EPWM3_TIMER_TBPRD 30000U
|
||||
#define EPWM3_CMPA 1933U
|
||||
#define EPWM3_CMPB 1933U
|
||||
|
||||
#define EPWM4_TIMER_TBPRD 35000U
|
||||
#define EPWM4_CMPA 1933U
|
||||
#define EPWM4_CMPB 1933U
|
||||
|
||||
// default interrupt payloads
|
||||
#define ISR1_PAYLOAD 60U
|
||||
#define ISR2_PAYLOAD 60U
|
||||
#define ISR3_PAYLOAD 60U
|
||||
#define ISR4_PAYLOAD 60U
|
||||
|
||||
void initEPWM1(void);
|
||||
void initEPWM2(void);
|
||||
void initEPWM3(void);
|
||||
void initEPWM4(void);
|
||||
|
||||
__interrupt void epwm1ISR(void);
|
||||
__interrupt void epwm2ISR(void);
|
||||
__interrupt void epwm3ISR(void);
|
||||
__interrupt void epwm4ISR(void);
|
||||
__interrupt void clb1ISR(void);
|
||||
__interrupt void clb2ISR(void);
|
||||
__interrupt void clb3ISR(void);
|
||||
__interrupt void clb4ISR(void);
|
||||
|
||||
// GPREG settings:
|
||||
// bit 2 = enable
|
||||
// bit 1 = ISR end flag
|
||||
// bit 0 not used
|
||||
uint32_t gpreg1 = 4;
|
||||
uint32_t gpreg2 = 4;
|
||||
uint32_t gpreg3 = 4;
|
||||
uint32_t gpreg4 = 4;
|
||||
|
||||
uint32_t payload_1 = ISR1_PAYLOAD;
|
||||
uint32_t payload_2 = ISR2_PAYLOAD;
|
||||
uint32_t payload_3 = ISR3_PAYLOAD;
|
||||
uint32_t payload_4 = ISR4_PAYLOAD;
|
||||
|
||||
volatile uint16_t i = 0;
|
||||
bool first_trip_1 = false;
|
||||
bool first_trip_2 = false;
|
||||
bool first_trip_3 = false;
|
||||
bool first_trip_4 = false;
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
// map interrupts
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
Interrupt_register(INT_EPWM1, &epwm1ISR);
|
||||
Interrupt_register(INT_EPWM2, &epwm2ISR);
|
||||
Interrupt_register(INT_EPWM3, &epwm3ISR);
|
||||
Interrupt_register(INT_EPWM4, &epwm4ISR);
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_register(INT_CLB2, &clb2ISR);
|
||||
Interrupt_register(INT_CLB3, &clb3ISR);
|
||||
Interrupt_register(INT_CLB4, &clb4ISR);
|
||||
|
||||
Board_init();
|
||||
// initialize PWMs
|
||||
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
initEPWM1();
|
||||
initEPWM2();
|
||||
initEPWM3();
|
||||
initEPWM4();
|
||||
|
||||
// initialize CLB tiles
|
||||
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB3);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB4);
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
initTILE2(myTILE2_BASE);
|
||||
initTILE3(myTILE3_BASE);
|
||||
initTILE4(myTILE4_BASE);
|
||||
|
||||
// enable interrupts
|
||||
Interrupt_enable(INT_EPWM1);
|
||||
Interrupt_enable(INT_EPWM2);
|
||||
Interrupt_enable(INT_EPWM3);
|
||||
Interrupt_enable(INT_EPWM4);
|
||||
|
||||
Interrupt_enable(INT_CLB1);
|
||||
Interrupt_enable(INT_CLB2);
|
||||
Interrupt_enable(INT_CLB3);
|
||||
Interrupt_enable(INT_CLB4);
|
||||
|
||||
EINT;
|
||||
|
||||
// enable CLB counters
|
||||
HWREG(0x3100) = 0x6;
|
||||
HWREG(0x3500) = 0x6;
|
||||
HWREG(0x3900) = 0x6;
|
||||
HWREG(0x3D00) = 0x6;
|
||||
|
||||
CLB_setGPREG(myTILE1_BASE, gpreg1);
|
||||
CLB_setGPREG(myTILE2_BASE, gpreg2);
|
||||
CLB_setGPREG(myTILE3_BASE, gpreg3);
|
||||
CLB_setGPREG(myTILE4_BASE, gpreg4);
|
||||
|
||||
// start PWMs
|
||||
EPWM_setTimeBaseCounterMode(myEPWM1_BASE, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM2_BASE, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM3_BASE, EPWM_COUNTER_MODE_UP);
|
||||
EPWM_setTimeBaseCounterMode(myEPWM4_BASE, EPWM_COUNTER_MODE_UP);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--- PWM initialization ---
|
||||
|
||||
void initEPWM1()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM1_BASE, EPWM1_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM1_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM1_BASE, 0U);
|
||||
|
||||
EPWM_enableSyncOutPulseSource(myEPWM1_BASE, EPWM_SYNC_OUT_PULSE_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, EPWM1_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, EPWM1_CMPB);
|
||||
|
||||
EPWM_disablePhaseShiftLoad(myEPWM1_BASE);
|
||||
EPWM_setClockPrescaler(myEPWM1_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM1_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM1_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
EPWM_setInterruptSource(myEPWM1_BASE, EPWM_INT_TBCTR_ZERO);
|
||||
EPWM_enableInterrupt(myEPWM1_BASE);
|
||||
EPWM_setInterruptEventCount(myEPWM1_BASE, 1U);
|
||||
}
|
||||
|
||||
|
||||
void initEPWM2()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM2_BASE, EPWM2_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM2_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM2_BASE, 0U);
|
||||
|
||||
EPWM_disablePhaseShiftLoad(myEPWM2_BASE);
|
||||
EPWM_setPhaseShift(myEPWM2_BASE, 0U);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM2_BASE, EPWM_COUNTER_COMPARE_A, EPWM2_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM2_BASE, EPWM_COUNTER_COMPARE_B, EPWM2_CMPB);
|
||||
|
||||
EPWM_setClockPrescaler(myEPWM2_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM2_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM2_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM2_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
EPWM_setInterruptSource(myEPWM2_BASE, EPWM_INT_TBCTR_ZERO);
|
||||
EPWM_enableInterrupt(myEPWM2_BASE);
|
||||
EPWM_setInterruptEventCount(myEPWM2_BASE, 1U);
|
||||
}
|
||||
|
||||
void initEPWM3()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM3_BASE, EPWM3_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM3_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM3_BASE, 0U);
|
||||
|
||||
EPWM_disablePhaseShiftLoad(myEPWM3_BASE);
|
||||
EPWM_setPhaseShift(myEPWM3_BASE, 0U);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM3_BASE, EPWM_COUNTER_COMPARE_A, EPWM3_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM3_BASE, EPWM_COUNTER_COMPARE_B, EPWM3_CMPB);
|
||||
|
||||
EPWM_setClockPrescaler(myEPWM3_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM3_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM3_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM3_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
EPWM_setInterruptSource(myEPWM3_BASE, EPWM_INT_TBCTR_ZERO);
|
||||
EPWM_enableInterrupt(myEPWM3_BASE);
|
||||
EPWM_setInterruptEventCount(myEPWM3_BASE, 1U);
|
||||
}
|
||||
|
||||
void initEPWM4()
|
||||
{
|
||||
EPWM_setTimeBasePeriod(myEPWM4_BASE, EPWM4_TIMER_TBPRD);
|
||||
EPWM_setPhaseShift(myEPWM4_BASE, 0U);
|
||||
EPWM_setTimeBaseCounter(myEPWM4_BASE, 0U);
|
||||
|
||||
EPWM_disablePhaseShiftLoad(myEPWM4_BASE);
|
||||
EPWM_setPhaseShift(myEPWM4_BASE, 0U);
|
||||
|
||||
EPWM_setCounterCompareValue(myEPWM4_BASE, EPWM_COUNTER_COMPARE_A, EPWM4_CMPA);
|
||||
EPWM_setCounterCompareValue(myEPWM4_BASE, EPWM_COUNTER_COMPARE_B, EPWM4_CMPB);
|
||||
|
||||
EPWM_setClockPrescaler(myEPWM4_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1);
|
||||
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM4_BASE, EPWM_COUNTER_COMPARE_A, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
EPWM_setCounterCompareShadowLoadMode(myEPWM4_BASE, EPWM_COUNTER_COMPARE_B, EPWM_COMP_LOAD_ON_CNTR_ZERO);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
|
||||
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
|
||||
EPWM_setActionQualifierAction(myEPWM4_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);
|
||||
|
||||
EPWM_setInterruptSource(myEPWM4_BASE, EPWM_INT_TBCTR_ZERO);
|
||||
EPWM_enableInterrupt(myEPWM4_BASE);
|
||||
EPWM_setInterruptEventCount(myEPWM4_BASE, 1U);
|
||||
}
|
||||
|
||||
//--- interrupt service routines ---
|
||||
|
||||
__interrupt void epwm1ISR(void)
|
||||
{
|
||||
EPWM_clearEventTriggerInterruptFlag(myEPWM1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP3);
|
||||
|
||||
// ISR payload
|
||||
for (i=0; i<payload_1; i++)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
|
||||
// pulse GPREG bit 2 to indicate ISR finished
|
||||
CLB_setGPREG(myTILE1_BASE, gpreg1 | 0x00000002);
|
||||
asm(" NOP");
|
||||
CLB_setGPREG(myTILE1_BASE, gpreg1);
|
||||
}
|
||||
|
||||
__interrupt void epwm2ISR(void)
|
||||
{
|
||||
EPWM_clearEventTriggerInterruptFlag(myEPWM2_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP3);
|
||||
|
||||
// ISR payload
|
||||
for (i=0; i<payload_2; i++)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
|
||||
// pulse GPREG bit 2 to indicate ISR finished
|
||||
CLB_setGPREG(myTILE2_BASE, gpreg2 | 0x00000002);
|
||||
asm(" NOP");
|
||||
CLB_setGPREG(myTILE2_BASE, gpreg2);
|
||||
}
|
||||
|
||||
__interrupt void epwm3ISR(void)
|
||||
{
|
||||
EPWM_clearEventTriggerInterruptFlag(myEPWM3_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP3);
|
||||
|
||||
// ISR payload
|
||||
for (i=0; i<payload_3; i++)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
|
||||
// pulse GPREG bit 2 to indicate ISR finished
|
||||
CLB_setGPREG(myTILE3_BASE, gpreg3 | 0x00000002);
|
||||
asm(" NOP");
|
||||
CLB_setGPREG(myTILE3_BASE, gpreg3);
|
||||
}
|
||||
|
||||
__interrupt void epwm4ISR(void)
|
||||
{
|
||||
EPWM_clearEventTriggerInterruptFlag(myEPWM4_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP3);
|
||||
|
||||
// ISR payload
|
||||
for (i=0; i<payload_4; i++)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
|
||||
// pulse GPREG bit 2 to indicate ISR finished
|
||||
CLB_setGPREG(myTILE4_BASE, gpreg4 | 0x00000002);
|
||||
asm(" NOP");
|
||||
CLB_setGPREG(myTILE4_BASE, gpreg4);
|
||||
}
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
if (!first_trip_1)
|
||||
{
|
||||
first_trip_1 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
asm(" ESTOP0");
|
||||
}
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb2ISR(void)
|
||||
{
|
||||
if (!first_trip_2)
|
||||
{
|
||||
first_trip_2 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
asm(" ESTOP0");
|
||||
}
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb3ISR(void)
|
||||
{
|
||||
if (!first_trip_3)
|
||||
{
|
||||
first_trip_3 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
asm(" ESTOP0");
|
||||
}
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
__interrupt void clb4ISR(void)
|
||||
{
|
||||
if (!first_trip_4)
|
||||
{
|
||||
first_trip_4 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
asm(" ESTOP0");
|
||||
}
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
@@ -0,0 +1,291 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clb3 = clb.addInstance();
|
||||
const clb4 = clb.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const epwm2 = epwm.addInstance();
|
||||
const epwm3 = epwm.addInstance();
|
||||
const epwm4 = epwm.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
const TILE3 = TILE.addInstance();
|
||||
const TILE4 = TILE.addInstance();
|
||||
const clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
const clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
const clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
const clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
clb1.filterConfigCLB_IN0 = "CLB_FILTER_RISING_EDGE";
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM1B";
|
||||
|
||||
clb2.$name = "myTILE2";
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.enableCLB = true;
|
||||
clb2.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
clb2.filterConfigCLB_IN0 = "CLB_FILTER_RISING_EDGE";
|
||||
clb2.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb2.synchronizeCLB_IN0 = true;
|
||||
clb2.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM2A";
|
||||
clb2.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM2A";
|
||||
clb2.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM2B";
|
||||
|
||||
clb3.$name = "myTILE3";
|
||||
clb3.clbBase = "CLB3_BASE";
|
||||
clb3.enableCLB = true;
|
||||
clb3.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
clb3.filterConfigCLB_IN0 = "CLB_FILTER_RISING_EDGE";
|
||||
clb3.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb3.synchronizeCLB_IN0 = true;
|
||||
clb3.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM3A";
|
||||
clb3.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM3A";
|
||||
clb3.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM3B";
|
||||
|
||||
clb4.$name = "myTILE4";
|
||||
clb4.clbBase = "CLB4_BASE";
|
||||
clb4.enableCLB = true;
|
||||
clb4.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
clb4.filterConfigCLB_IN0 = "CLB_FILTER_RISING_EDGE";
|
||||
clb4.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb4.synchronizeCLB_IN0 = true;
|
||||
clb4.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_EPWM4A";
|
||||
clb4.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_EPWM4A";
|
||||
clb4.globalConfigCLB_IN2 = "CLB_GLOBAL_IN_MUX_EPWM4B";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
epwm2.$name = "myEPWM2";
|
||||
epwm2.epwm.$assign = "EPWM2";
|
||||
epwm2.epwm.epwmaPin.$assign = "GPIO2";
|
||||
epwm2.epwm.epwmbPin.$assign = "GPIO3";
|
||||
|
||||
epwm3.$name = "myEPWM3";
|
||||
epwm3.epwm.$assign = "EPWM3";
|
||||
epwm3.epwm.epwmaPin.$assign = "GPIO4";
|
||||
epwm3.epwm.epwmbPin.$assign = "GPIO5";
|
||||
|
||||
epwm4.$name = "myEPWM4";
|
||||
epwm4.epwm.$assign = "EPWM4";
|
||||
epwm4.epwm.epwmaPin.$assign = "GPIO6";
|
||||
epwm4.epwm.epwmbPin.$assign = "GPIO7";
|
||||
|
||||
TILE.sim_duration = 500000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_edge0 = "rising edge";
|
||||
TILE1.BOUNDARY.in_period0 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 4;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 1000;
|
||||
TILE1.BOUNDARY.boundaryInput1 = "squareWave";
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 1000;
|
||||
TILE1.BOUNDARY.in_edge1 = "rising edge";
|
||||
TILE1.BOUNDARY.boundaryInput2 = "1";
|
||||
TILE1.BOUNDARY.in_period1 = 1800;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.LUT_2.i0 = "FSM_0.S0";
|
||||
TILE1.LUT_2.i1 = "COUNTER_0.count_match1";
|
||||
TILE1.LUT_2.i2 = "COUNTER_0.count_match2";
|
||||
TILE1.LUT_2.eqn = "(~i0 & i1) | (i0 & i2)";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE1.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE1.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1))";
|
||||
TILE1.FSM_0.eqn_out = "~s0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in2";
|
||||
TILE1.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE1.COUNTER_0.match1_val = "50";
|
||||
TILE1.COUNTER_0.match2_val = "3200";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "LUT_2.OUT";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 1";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
TILE2.$name = "TILE2";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.LUT_2.eqn = "(~i0 & i1) | (i0 & i2)";
|
||||
TILE2.LUT_2.i0 = "FSM_0.S0";
|
||||
TILE2.LUT_2.i1 = "COUNTER_0.count_match1";
|
||||
TILE2.LUT_2.i2 = "COUNTER_0.count_match2";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1))";
|
||||
TILE2.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE2.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE2.FSM_0.eqn_out = "~s0";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_0.mode1 = "1";
|
||||
TILE2.COUNTER_0.mode0 = "BOUNDARY.in2";
|
||||
TILE2.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE2.COUNTER_0.match1_val = "50";
|
||||
TILE2.COUNTER_0.match2_val = "3200";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.e0 = "LUT_2.OUT";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program0.instruct0 = "INTR 2";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE2.AOC_0.$name = "AOC_8";
|
||||
TILE2.AOC_1.$name = "AOC_9";
|
||||
TILE2.AOC_2.$name = "AOC_10";
|
||||
TILE2.AOC_3.$name = "AOC_11";
|
||||
TILE2.AOC_4.$name = "AOC_12";
|
||||
TILE2.AOC_5.$name = "AOC_13";
|
||||
TILE2.AOC_6.$name = "AOC_14";
|
||||
TILE2.AOC_7.$name = "AOC_15";
|
||||
|
||||
TILE3.$name = "TILE3";
|
||||
TILE3.BOUNDARY.$name = "BOUNDARY2";
|
||||
TILE3.LUT_0.$name = "LUT_6";
|
||||
TILE3.LUT_1.$name = "LUT_7";
|
||||
TILE3.LUT_2.$name = "LUT_8";
|
||||
TILE3.LUT_2.eqn = "(~i0 & i1) | (i0 & i2)";
|
||||
TILE3.LUT_2.i0 = "FSM_0.S0";
|
||||
TILE3.LUT_2.i1 = "COUNTER_0.count_match1";
|
||||
TILE3.LUT_2.i2 = "COUNTER_0.count_match2";
|
||||
TILE3.FSM_0.$name = "FSM_6";
|
||||
TILE3.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1))";
|
||||
TILE3.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE3.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE3.FSM_0.eqn_out = "~s0";
|
||||
TILE3.FSM_1.$name = "FSM_7";
|
||||
TILE3.FSM_2.$name = "FSM_8";
|
||||
TILE3.COUNTER_0.$name = "COUNTER_6";
|
||||
TILE3.COUNTER_0.mode0 = "BOUNDARY.in2";
|
||||
TILE3.COUNTER_0.mode1 = "1";
|
||||
TILE3.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE3.COUNTER_0.match1_val = "50";
|
||||
TILE3.COUNTER_0.match2_val = "3200";
|
||||
TILE3.COUNTER_1.$name = "COUNTER_7";
|
||||
TILE3.COUNTER_2.$name = "COUNTER_8";
|
||||
TILE3.OUTLUT_0.$name = "OUTLUT_16";
|
||||
TILE3.OUTLUT_1.$name = "OUTLUT_17";
|
||||
TILE3.OUTLUT_2.$name = "OUTLUT_18";
|
||||
TILE3.OUTLUT_3.$name = "OUTLUT_19";
|
||||
TILE3.OUTLUT_4.$name = "OUTLUT_20";
|
||||
TILE3.OUTLUT_5.$name = "OUTLUT_21";
|
||||
TILE3.OUTLUT_6.$name = "OUTLUT_22";
|
||||
TILE3.OUTLUT_7.$name = "OUTLUT_23";
|
||||
TILE3.HLC.$name = "HLC_2";
|
||||
TILE3.HLC.e0 = "LUT_2.OUT";
|
||||
TILE3.HLC.program0.$name = "HLCP_8";
|
||||
TILE3.HLC.program0.instruct0 = "INTR 3";
|
||||
TILE3.HLC.program1.$name = "HLCP_9";
|
||||
TILE3.HLC.program2.$name = "HLCP_10";
|
||||
TILE3.HLC.program3.$name = "HLCP_11";
|
||||
TILE3.AOC_0.$name = "AOC_16";
|
||||
TILE3.AOC_1.$name = "AOC_17";
|
||||
TILE3.AOC_2.$name = "AOC_18";
|
||||
TILE3.AOC_3.$name = "AOC_19";
|
||||
TILE3.AOC_4.$name = "AOC_20";
|
||||
TILE3.AOC_5.$name = "AOC_21";
|
||||
TILE3.AOC_6.$name = "AOC_22";
|
||||
TILE3.AOC_7.$name = "AOC_23";
|
||||
|
||||
TILE4.$name = "TILE4";
|
||||
TILE4.BOUNDARY.$name = "BOUNDARY3";
|
||||
TILE4.LUT_0.$name = "LUT_9";
|
||||
TILE4.LUT_1.$name = "LUT_10";
|
||||
TILE4.LUT_2.$name = "LUT_11";
|
||||
TILE4.LUT_2.eqn = "(~i0 & i1) | (i0 & i2)";
|
||||
TILE4.LUT_2.i0 = "FSM_0.S0";
|
||||
TILE4.LUT_2.i1 = "COUNTER_0.count_match1";
|
||||
TILE4.LUT_2.i2 = "COUNTER_0.count_match2";
|
||||
TILE4.FSM_0.$name = "FSM_9";
|
||||
TILE4.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & (~e1))";
|
||||
TILE4.FSM_0.e0 = "BOUNDARY.in0";
|
||||
TILE4.FSM_0.e1 = "BOUNDARY.in1";
|
||||
TILE4.FSM_0.eqn_out = "~s0";
|
||||
TILE4.FSM_1.$name = "FSM_10";
|
||||
TILE4.FSM_2.$name = "FSM_11";
|
||||
TILE4.COUNTER_0.$name = "COUNTER_9";
|
||||
TILE4.COUNTER_0.mode0 = "BOUNDARY.in2";
|
||||
TILE4.COUNTER_0.mode1 = "1";
|
||||
TILE4.COUNTER_0.reset = "FSM_0.OUT";
|
||||
TILE4.COUNTER_0.match1_val = "50";
|
||||
TILE4.COUNTER_0.match2_val = "3200";
|
||||
TILE4.COUNTER_1.$name = "COUNTER_10";
|
||||
TILE4.COUNTER_2.$name = "COUNTER_11";
|
||||
TILE4.OUTLUT_0.$name = "OUTLUT_24";
|
||||
TILE4.OUTLUT_1.$name = "OUTLUT_25";
|
||||
TILE4.OUTLUT_2.$name = "OUTLUT_26";
|
||||
TILE4.OUTLUT_3.$name = "OUTLUT_27";
|
||||
TILE4.OUTLUT_4.$name = "OUTLUT_28";
|
||||
TILE4.OUTLUT_5.$name = "OUTLUT_29";
|
||||
TILE4.OUTLUT_6.$name = "OUTLUT_30";
|
||||
TILE4.OUTLUT_7.$name = "OUTLUT_31";
|
||||
TILE4.HLC.$name = "HLC_3";
|
||||
TILE4.HLC.e0 = "LUT_2.OUT";
|
||||
TILE4.HLC.program0.$name = "HLCP_12";
|
||||
TILE4.HLC.program0.instruct0 = "INTR 4";
|
||||
TILE4.HLC.program1.$name = "HLCP_13";
|
||||
TILE4.HLC.program2.$name = "HLCP_14";
|
||||
TILE4.HLC.program3.$name = "HLCP_15";
|
||||
TILE4.AOC_0.$name = "AOC_24";
|
||||
TILE4.AOC_1.$name = "AOC_25";
|
||||
TILE4.AOC_2.$name = "AOC_26";
|
||||
TILE4.AOC_3.$name = "AOC_27";
|
||||
TILE4.AOC_4.$name = "AOC_28";
|
||||
TILE4.AOC_5.$name = "AOC_29";
|
||||
TILE4.AOC_6.$name = "AOC_30";
|
||||
TILE4.AOC_7.$name = "AOC_31";
|
||||
@@ -0,0 +1,135 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex6_siggen.c
|
||||
//
|
||||
// TITLE: CLB Signal Generator.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Signal Generator</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! This example uses CLB1 to generate a rectangular wave and CLB2 to check the
|
||||
//! rectangular wave generated by CLB1 doesnât exceed the defined duty cycle and
|
||||
//! period limits.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
__interrupt void clb2ISR(void);
|
||||
|
||||
// GPREG settings:
|
||||
// bit 2 = enable
|
||||
// bit 1 = ISR end flag
|
||||
// bit 0 not used
|
||||
uint32_t gpreg1 = 1;
|
||||
|
||||
|
||||
bool error_low = false;
|
||||
bool error_hi = false;
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// map interrupts
|
||||
//
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB2, &clb2ISR);
|
||||
|
||||
|
||||
//
|
||||
// initialize CLB tiles
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
initTILE2(myTILE2_BASE);
|
||||
|
||||
//
|
||||
// enable interrupts
|
||||
//
|
||||
Interrupt_enable(INT_CLB2);
|
||||
EINT;
|
||||
|
||||
//
|
||||
// enable CLB counters
|
||||
//
|
||||
HWREG(0x3100) = 0x6;
|
||||
HWREG(0x3500) = 0x6;
|
||||
CLB_setGPREG(myTILE1_BASE, gpreg1);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__interrupt void clb2ISR(void)
|
||||
{
|
||||
asm(" ESTOP0");
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
//
|
||||
// end of file //
|
||||
//
|
||||
@@ -0,0 +1,161 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clb2 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const clbxbar2 = clbxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
const TILE2 = TILE.addInstance();
|
||||
const clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
const clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
const clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
const clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0"];
|
||||
|
||||
clb2.$name = "myTILE2";
|
||||
clb2.clbBase = "CLB2_BASE";
|
||||
clb2.enableCLB = true;
|
||||
clb2.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb2.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb2.synchronizeCLB_IN1 = true;
|
||||
clb2.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb2.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb2.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb2.synchronizeCLB_IN0 = true;
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_CLB1_OUT4";
|
||||
|
||||
clbxbar2.$name = "myCLBXBAR1";
|
||||
clbxbar2.auxInput = "XBAR_AUXSIG1";
|
||||
clbxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
clbxbar2.mux3Config = "XBAR_CLB_MUX03_CLB1_OUT5";
|
||||
|
||||
TILE.sim_duration = 500000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_period0 = 10000;
|
||||
TILE1.BOUNDARY.in_duty0 = 8000;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 10;
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.FSM_0.e1 = "COUNTER_0.count_match2";
|
||||
TILE1.FSM_0.eqn_s0 = "(~s0 & e0) | (s0 & ~e1)";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match2";
|
||||
TILE1.COUNTER_0.match1_val = "500";
|
||||
TILE1.COUNTER_0.match2_val = "1000";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_5.i0 = "BOUNDARY.in0";
|
||||
TILE1.OUTLUT_5.eqn = "i0";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
|
||||
TILE2.$name = "TILE2";
|
||||
TILE2.BOUNDARY.$name = "BOUNDARY1";
|
||||
TILE2.BOUNDARY.boundaryInput0 = "tileOutput";
|
||||
TILE2.BOUNDARY.tileSelect0 = "TILE1";
|
||||
TILE2.BOUNDARY.tileOutputSelect0 = 4;
|
||||
TILE2.BOUNDARY.boundaryInput1 = "tileOutput";
|
||||
TILE2.BOUNDARY.tileSelect1 = "TILE1";
|
||||
TILE2.BOUNDARY.tileOutputSelect1 = 5;
|
||||
TILE2.BOUNDARY.input_pipeline0 = true;
|
||||
TILE2.BOUNDARY.input_pipeline1 = true;
|
||||
TILE2.LUT_0.$name = "LUT_3";
|
||||
TILE2.LUT_0.eqn = "i0 & i1";
|
||||
TILE2.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE2.LUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE2.LUT_1.$name = "LUT_4";
|
||||
TILE2.LUT_1.i0 = "BOUNDARY.in0";
|
||||
TILE2.LUT_1.i1 = "BOUNDARY.in1";
|
||||
TILE2.LUT_1.eqn = "~i0 & i1";
|
||||
TILE2.LUT_2.$name = "LUT_5";
|
||||
TILE2.LUT_2.i1 = "COUNTER_0.count_match1";
|
||||
TILE2.LUT_2.i2 = "COUNTER_1.count_match1";
|
||||
TILE2.LUT_2.i0 = "BOUNDARY.in1";
|
||||
TILE2.LUT_2.eqn = "i0 & (i1 |i2)";
|
||||
TILE2.FSM_0.$name = "FSM_3";
|
||||
TILE2.FSM_1.$name = "FSM_4";
|
||||
TILE2.FSM_1.e0 = "LUT_0.OUT";
|
||||
TILE2.FSM_1.eqn_s0 = "e0";
|
||||
TILE2.FSM_1.eqn_out = "e0 & ~s0";
|
||||
TILE2.FSM_2.$name = "FSM_5";
|
||||
TILE2.COUNTER_0.$name = "COUNTER_3";
|
||||
TILE2.COUNTER_0.mode0 = "LUT_0.OUT";
|
||||
TILE2.COUNTER_0.mode1 = "1";
|
||||
TILE2.COUNTER_0.reset = "LUT_1.OUT";
|
||||
TILE2.COUNTER_0.match2_val = "";
|
||||
TILE2.COUNTER_0.match1_val = "520";
|
||||
TILE2.COUNTER_1.$name = "COUNTER_4";
|
||||
TILE2.COUNTER_1.mode1 = "1";
|
||||
TILE2.COUNTER_1.reset = "FSM_1.OUT";
|
||||
TILE2.COUNTER_1.mode0 = "BOUNDARY.in1";
|
||||
TILE2.COUNTER_1.match2_val = "";
|
||||
TILE2.COUNTER_1.match1_val = "1020";
|
||||
TILE2.COUNTER_2.$name = "COUNTER_5";
|
||||
TILE2.OUTLUT_0.$name = "OUTLUT_8";
|
||||
TILE2.OUTLUT_1.$name = "OUTLUT_9";
|
||||
TILE2.OUTLUT_2.$name = "OUTLUT_10";
|
||||
TILE2.OUTLUT_3.$name = "OUTLUT_11";
|
||||
TILE2.OUTLUT_4.$name = "OUTLUT_12";
|
||||
TILE2.OUTLUT_5.$name = "OUTLUT_13";
|
||||
TILE2.OUTLUT_6.$name = "OUTLUT_14";
|
||||
TILE2.OUTLUT_7.$name = "OUTLUT_15";
|
||||
TILE2.HLC.$name = "HLC_1";
|
||||
TILE2.HLC.e0 = "LUT_2.OUT";
|
||||
TILE2.HLC.program0.$name = "HLCP_4";
|
||||
TILE2.HLC.program0.instruct0 = "INTR 5";
|
||||
TILE2.HLC.program1.$name = "HLCP_5";
|
||||
TILE2.HLC.program2.$name = "HLCP_6";
|
||||
TILE2.HLC.program3.$name = "HLCP_7";
|
||||
TILE2.AOC_0.$name = "AOC_8";
|
||||
TILE2.AOC_1.$name = "AOC_9";
|
||||
TILE2.AOC_2.$name = "AOC_10";
|
||||
TILE2.AOC_3.$name = "AOC_11";
|
||||
TILE2.AOC_4.$name = "AOC_12";
|
||||
TILE2.AOC_5.$name = "AOC_13";
|
||||
TILE2.AOC_6.$name = "AOC_14";
|
||||
TILE2.AOC_7.$name = "AOC_15";
|
||||
@@ -0,0 +1,139 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex7_state_machine.c
|
||||
//
|
||||
// TITLE: CLB State Machine.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB State Machine</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\Designing With the C2000 CLB.pdf
|
||||
//! This application report describes the process of creating this CLB example
|
||||
//! and can be used as guidance on desiging custom logic with the CLB. This example
|
||||
//! uses all submodules inside a CLB TILE in order to implement a complete system.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
#define UPDATE_PWM_COMPLETED_TAG 1
|
||||
#define TRIGGER_PWM_UPDATE_SHIFT 2
|
||||
volatile uint16_t canUpdate = 1;
|
||||
|
||||
volatile uint32_t clbPwmPeriod = 2000;
|
||||
volatile uint32_t clbPwmDuty = 1000;
|
||||
volatile uint16_t clbPwmUpdateNow = 0;
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
void updateClbPwm(uint32_t period, uint32_t duty);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
while(1)
|
||||
{
|
||||
if (clbPwmUpdateNow)
|
||||
{
|
||||
updateClbPwm(clbPwmPeriod, clbPwmDuty);
|
||||
clbPwmUpdateNow = 0;
|
||||
}
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
uint16_t tag = CLB_getInterruptTag(myTILE1_BASE);
|
||||
if (tag == UPDATE_PWM_COMPLETED_TAG)
|
||||
{
|
||||
canUpdate = 1;
|
||||
CLB_setGPREG(myTILE1_BASE, 0);
|
||||
}
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
void updateClbPwm(uint32_t period, uint32_t duty)
|
||||
{
|
||||
if (canUpdate)
|
||||
{
|
||||
canUpdate = 0;
|
||||
CLB_writeInterface(myTILE1_BASE, CLB_ADDR_COUNTER_1_LOAD, period);
|
||||
HWREG(myTILE1_BASE + CLB_LOGICCTL + CLB_O_BUF_PTR) = 0U;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(0)) = period;
|
||||
HWREG(myTILE1_BASE + CLB_DATAEXCH + CLB_O_PULL(1)) = duty;
|
||||
CLB_setGPREG(myTILE1_BASE, 1 << TRIGGER_PWM_UPDATE_SHIFT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const clbxbar2 = clbxbar.addInstance();
|
||||
const epwm = scripting.addModule("/driverlib/epwm.js", {}, false);
|
||||
const epwm1 = epwm.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const outputxbar2 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.outputsToOverridePeripheral = ["CLB_OUT0","CLB_OUT2"];
|
||||
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
clbxbar1.$name = "myCLBXBAR1";
|
||||
|
||||
clbxbar2.auxInput = "XBAR_AUXSIG1";
|
||||
clbxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
clbxbar2.mux3Config = "XBAR_CLB_MUX03_INPUTXBAR2";
|
||||
clbxbar2.$name = "myCLBXBAR2";
|
||||
|
||||
epwm1.$name = "myEPWM1";
|
||||
epwm1.epwm.$assign = "EPWM1";
|
||||
epwm1.epwm.epwmaPin.$assign = "GPIO0";
|
||||
epwm1.epwm.epwmbPin.$assign = "GPIO1";
|
||||
|
||||
gpio1.$name = "myGPIO4";
|
||||
gpio1.padConfig = "PULLUP";
|
||||
gpio1.gpioPin.$assignAllowConflicts = "GPIO4";
|
||||
|
||||
gpio2.$name = "myGPIO5";
|
||||
gpio2.padConfig = "PULLUP";
|
||||
gpio2.gpioPin.$assignAllowConflicts = "GPIO5";
|
||||
|
||||
inputxbar1.$name = "myINPUTXBAR0";
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio","inputxbar2Gpio"];
|
||||
inputxbar1.inputxbar1Gpio = "GPIO4";
|
||||
inputxbar1.inputxbar2Gpio = "GPIO5";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR8";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR8";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO31";
|
||||
|
||||
outputxbar2.$name = "myOUTPUTXBAR1";
|
||||
outputxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
outputxbar2.mux3Config = "XBAR_OUT_MUX03_CLB1_OUT5";
|
||||
outputxbar2.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar2.outputxbar.outputxbarPin.$assign = "GPIO34";
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "COUNTER_0.count_match1";
|
||||
TILE1.LUT_0.i1 = "BOUNDARY.in0";
|
||||
TILE1.LUT_0.eqn = "i0&i1";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_1.i0 = "COUNTER_0.count_match1";
|
||||
TILE1.LUT_1.i1 = "BOUNDARY.in1";
|
||||
TILE1.LUT_1.eqn = "i0&i1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.LUT_2.i0 = "COUNTER_1.count_zero";
|
||||
TILE1.LUT_2.i1 = "BOUNDARY.in2";
|
||||
TILE1.LUT_2.eqn = "i0&i1";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_0.e0 = "COUNTER_1.count_zero";
|
||||
TILE1.FSM_0.e1 = "COUNTER_1.count_match1";
|
||||
TILE1.FSM_0.eqn_s0 = "(s0 ^ e1)& (!e0)";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_1.e0 = "LUT_0.OUT";
|
||||
TILE1.FSM_1.e1 = "LUT_1.OUT";
|
||||
TILE1.FSM_1.eqn_s0 = " (!e0&s0) | (e0&e1&!s0) | (!s0&!s1&e0) | (e0&!e1&!s1)";
|
||||
TILE1.FSM_1.eqn_s1 = "(s1&!e1) | (s0&s1) | (s0&e1)";
|
||||
TILE1.FSM_1.eqn_out = "(e0&e1) | (!s0&!s1&e0) | (s0&s1&e0)";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.FSM_2.e0 = "FSM_1.S0";
|
||||
TILE1.FSM_2.e1 = "FSM_1.S1";
|
||||
TILE1.FSM_2.eqn_s1 = "(!e0)&e1";
|
||||
TILE1.FSM_2.eqn_s0 = "e0&(!e1)";
|
||||
TILE1.FSM_2.eqn_out = "s0 | s1";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.mode0 = "1";
|
||||
TILE1.COUNTER_0.mode1 = "1";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.match1_val = "50000";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_1.event_load_val = "4000";
|
||||
TILE1.COUNTER_1.action = "Load";
|
||||
TILE1.COUNTER_1.match1_val = "2000";
|
||||
TILE1.COUNTER_1.reset = "FSM_1.OUT";
|
||||
TILE1.COUNTER_1.mode0 = "FSM_2.OUT";
|
||||
TILE1.COUNTER_1.event = "COUNTER_1.count_zero";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_0.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_0.i1 = "FSM_2.S0";
|
||||
TILE1.OUTLUT_0.eqn = "i0&i1";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_2.i0 = "FSM_0.S0";
|
||||
TILE1.OUTLUT_2.i1 = "FSM_2.S1";
|
||||
TILE1.OUTLUT_2.eqn = "i0&i1";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "FSM_1.S0";
|
||||
TILE1.OUTLUT_4.eqn = "!i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_5.i0 = "FSM_1.S1";
|
||||
TILE1.OUTLUT_5.eqn = "!i0";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "LUT_2.OUT";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "PULL C1";
|
||||
TILE1.HLC.program0.instruct1 = "PULL R1";
|
||||
TILE1.HLC.program0.instruct2 = "MOV_T1 R1,C1";
|
||||
TILE1.HLC.program0.instruct3 = "INTR 1";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
TILE1.AOC_0.$name = "AOC_0";
|
||||
TILE1.AOC_1.$name = "AOC_1";
|
||||
TILE1.AOC_2.$name = "AOC_2";
|
||||
TILE1.AOC_3.$name = "AOC_3";
|
||||
TILE1.AOC_4.$name = "AOC_4";
|
||||
TILE1.AOC_5.$name = "AOC_5";
|
||||
TILE1.AOC_6.$name = "AOC_6";
|
||||
TILE1.AOC_7.$name = "AOC_7";
|
||||
@@ -0,0 +1,93 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex8_external_signal_AND_gate.c
|
||||
//
|
||||
// TITLE: CLB External Signal AND Gate.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB External Signal AND Gate</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, two external signals from two GPIOs are passed through the
|
||||
//! Input X-BAR and the CLB X-BAR to the CLB TILE. Inside the CLB module these two
|
||||
//! signals are ANDED. The output of the AND gate is then exported to a GPIO, using
|
||||
//! Output X-BAR.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
Board_init();
|
||||
|
||||
initTILE1(myCLBTILE1_BASE);
|
||||
CLB_enableCLB(myCLBTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const clbxbar = scripting.addModule("/driverlib/clbxbar.js", {}, false);
|
||||
const clbxbar1 = clbxbar.addInstance();
|
||||
const clbxbar2 = clbxbar.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const inputxbar = scripting.addModule("/driverlib/inputxbar.js", {}, false);
|
||||
const inputxbar1 = inputxbar.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1"];
|
||||
clb1.inputTypeCLB_IN0 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN0 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG0";
|
||||
clb1.inputTypeCLB_IN1 = "GLOBAL";
|
||||
clb1.globalConfigCLB_IN1 = "CLB_GLOBAL_IN_MUX_CLB_AUXSIG1";
|
||||
clb1.synchronizeCLB_IN0 = true;
|
||||
clb1.synchronizeCLB_IN1 = true;
|
||||
clb1.$name = "myCLBTILE1";
|
||||
|
||||
clbxbar1.$name = "myCLBXBAR0";
|
||||
clbxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
clbxbar1.mux1Config = "XBAR_CLB_MUX01_INPUTXBAR1";
|
||||
|
||||
clbxbar2.$name = "myCLBXBAR1";
|
||||
clbxbar2.auxInput = "XBAR_AUXSIG1";
|
||||
clbxbar2.muxesUsed = ["XBAR_MUX03"];
|
||||
clbxbar2.mux3Config = "XBAR_CLB_MUX03_INPUTXBAR2";
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
gpio2.$name = "myGPIO1";
|
||||
gpio2.gpioPin.$assign = "GPIO1";
|
||||
|
||||
inputxbar1.inputsUsed = ["inputxbar1Gpio","inputxbar2Gpio"];
|
||||
inputxbar1.inputxbar1Gpio = "GPIO0";
|
||||
inputxbar1.inputxbar2Gpio = "GPIO1";
|
||||
inputxbar1.$name = "myINPUTXBAR";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$name = "MyOUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_duty1 = 50;
|
||||
TILE1.BOUNDARY.in_period1 = 100;
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty0 = 20;
|
||||
TILE1.BOUNDARY.in_period0 = 40;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.boundaryInput1 = "squareWave";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_0.i0 = "BOUNDARY.in0";
|
||||
TILE1.LUT_0.i1 = "BOUNDARY.in1";
|
||||
TILE1.LUT_0.eqn = "i0 & i1";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.i0 = "LUT_0.OUT";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
@@ -0,0 +1,126 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: clb_ex9_timer.c
|
||||
//
|
||||
// TITLE: CLB Timer.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Timer</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//! In this example, a COUNTER module is used to create timed events. The use
|
||||
//! of the GP Register is shown. Through setting/clearing the bits in the GP register,
|
||||
//! the timer is started, stopped or changes direction. The output of the timer
|
||||
//! event (1-clock cycle) is exported to a GPIO. Interrupts are generated from the
|
||||
//! timer event using the HLC module. A GPIO is also toggled inside the CLB ISR. The
|
||||
//! indirect CLB register access is used to update the timerâs event match value and
|
||||
//! the active counter register to modify the frequency of the timer.
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
#include "board.h"
|
||||
|
||||
__interrupt void clb1ISR(void);
|
||||
|
||||
#define RESET_TIMER 1
|
||||
#define ENABLE_TIMER 2
|
||||
#define COUNTUP_MODE 4
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Interrupt_register(INT_CLB1, &clb1ISR);
|
||||
Interrupt_enable(INT_CLB1);
|
||||
|
||||
//
|
||||
// Enabling CLB1
|
||||
//
|
||||
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
|
||||
|
||||
initTILE1(myTILE1_BASE);
|
||||
Board_init();
|
||||
|
||||
CLB_setGPREG(myTILE1_BASE, ENABLE_TIMER | COUNTUP_MODE);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
SysCtl_delay(20000000);
|
||||
// Change Timer Value to 2000
|
||||
CLB_configCounterLoadMatch(myTILE1_BASE, CLB_CTR0, 0, 2000, 0);
|
||||
SysCtl_delay(20000000);
|
||||
// Change Timer Value to 1000
|
||||
CLB_configCounterLoadMatch(myTILE1_BASE, CLB_CTR0, 0, 1000, 0);
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__interrupt void clb1ISR(void)
|
||||
{
|
||||
GPIO_togglePin(myGPIO0);
|
||||
CLB_clearInterruptTag(myTILE1_BASE);
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const clb = scripting.addModule("/driverlib/clb.js", {}, false);
|
||||
const clb1 = clb.addInstance();
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const outputxbar = scripting.addModule("/driverlib/outputxbar.js", {}, false);
|
||||
const outputxbar1 = outputxbar.addInstance();
|
||||
const TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
const TILE1 = TILE.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
clb1.$name = "myTILE1";
|
||||
clb1.enableCLB = true;
|
||||
clb1.inputsUsed = ["CLB_IN0","CLB_IN1","CLB_IN2"];
|
||||
|
||||
gpio1.$name = "myGPIO0";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO0";
|
||||
|
||||
outputxbar1.$name = "myOUTPUTXBAR1";
|
||||
outputxbar1.muxesUsed = ["XBAR_MUX01"];
|
||||
outputxbar1.mux1Config = "XBAR_OUT_MUX01_CLB1_OUT4";
|
||||
outputxbar1.outputxbar.$name = "MyOUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.$assign = "OUTPUTXBAR1";
|
||||
outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
|
||||
|
||||
TILE.clock_period = 10000;
|
||||
TILE.sim_duration = 100000000;
|
||||
|
||||
TILE1.$name = "TILE1";
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
TILE1.BOUNDARY.in_repeat_count0 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count3 = 1;
|
||||
TILE1.BOUNDARY.boundaryInput0 = "squareWave";
|
||||
TILE1.BOUNDARY.in_repeat_count1 = 50;
|
||||
TILE1.BOUNDARY.in_repeat_count2 = 50;
|
||||
TILE1.BOUNDARY.in_period0 = 10000;
|
||||
TILE1.BOUNDARY.in_duty0 = 5001;
|
||||
TILE1.BOUNDARY.in_period1 = 1000;
|
||||
TILE1.BOUNDARY.in_duty1 = 500;
|
||||
TILE1.BOUNDARY.in_period2 = 3000;
|
||||
TILE1.BOUNDARY.in_duty2 = 1500;
|
||||
TILE1.BOUNDARY.boundaryInput1 = "1";
|
||||
TILE1.BOUNDARY.boundaryInput2 = "1";
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
TILE1.COUNTER_0.action = "Load";
|
||||
TILE1.COUNTER_0.reset = "COUNTER_0.count_match1";
|
||||
TILE1.COUNTER_0.event = "BOUNDARY.in0";
|
||||
TILE1.COUNTER_0.mode0 = "BOUNDARY.in1";
|
||||
TILE1.COUNTER_0.mode1 = "BOUNDARY.in2";
|
||||
TILE1.COUNTER_0.match1_val = "1000";
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
TILE1.OUTLUT_4.eqn = "i0";
|
||||
TILE1.OUTLUT_4.i0 = "COUNTER_0.count_match1";
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
TILE1.HLC.e0 = "COUNTER_0.count_match1";
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
TILE1.HLC.program0.instruct0 = "INTR 0";
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
@@ -0,0 +1,79 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: empty.c
|
||||
//
|
||||
// TITLE: CLB Empty Project.
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>CLB Empty Project</h1>
|
||||
//!
|
||||
//! For the detailed description of this example, please refer to:
|
||||
//! `C2000Ware_PATH\utilities\clb_tool\clb_syscfg\doc\CLB Tool Users Guide.pdf`
|
||||
//!
|
||||
//
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// 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.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "clb_config.h"
|
||||
#include "clb.h"
|
||||
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Device_init();
|
||||
Device_initGPIO();
|
||||
|
||||
Interrupt_initModule();
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
|
||||
initTILE1(CLB1_BASE);
|
||||
CLB_enableCLB(CLB1_BASE);
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
asm(" NOP");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
var TILE = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/TILE");
|
||||
var TILE1 = TILE.addInstance();
|
||||
// Name
|
||||
TILE1.$name = "TILE1";
|
||||
// Name
|
||||
TILE1.BOUNDARY.$name = "BOUNDARY0";
|
||||
// Name
|
||||
TILE1.LUT_0.$name = "LUT_0";
|
||||
// Name
|
||||
TILE1.LUT_1.$name = "LUT_1";
|
||||
// Name
|
||||
TILE1.LUT_2.$name = "LUT_2";
|
||||
// Name
|
||||
TILE1.FSM_0.$name = "FSM_0";
|
||||
// Name
|
||||
TILE1.FSM_1.$name = "FSM_1";
|
||||
// Name
|
||||
TILE1.FSM_2.$name = "FSM_2";
|
||||
// Name
|
||||
TILE1.COUNTER_0.$name = "COUNTER_0";
|
||||
// Name
|
||||
TILE1.COUNTER_1.$name = "COUNTER_1";
|
||||
// Name
|
||||
TILE1.COUNTER_2.$name = "COUNTER_2";
|
||||
// Name
|
||||
TILE1.OUTLUT_0.$name = "OUTLUT_0";
|
||||
// Name
|
||||
TILE1.OUTLUT_1.$name = "OUTLUT_1";
|
||||
// Name
|
||||
TILE1.OUTLUT_2.$name = "OUTLUT_2";
|
||||
// Name
|
||||
TILE1.OUTLUT_3.$name = "OUTLUT_3";
|
||||
// Name
|
||||
TILE1.OUTLUT_4.$name = "OUTLUT_4";
|
||||
// Name
|
||||
TILE1.OUTLUT_5.$name = "OUTLUT_5";
|
||||
// Name
|
||||
TILE1.OUTLUT_6.$name = "OUTLUT_6";
|
||||
// Name
|
||||
TILE1.OUTLUT_7.$name = "OUTLUT_7";
|
||||
// Name
|
||||
TILE1.HLC.$name = "HLC_0";
|
||||
// Name
|
||||
TILE1.HLC.program0.$name = "HLCP_0";
|
||||
// Name
|
||||
TILE1.HLC.program1.$name = "HLCP_1";
|
||||
// Name
|
||||
TILE1.HLC.program2.$name = "HLCP_2";
|
||||
// Name
|
||||
TILE1.HLC.program3.$name = "HLCP_3";
|
||||
var clb_run_dynamic_template_clb_h = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_h.js");
|
||||
var clb_run_dynamic_template_clb_c = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_c.js");
|
||||
var clb_run_dynamic_template_clb_sim = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_sim.js");
|
||||
var clb_run_dynamic_template_clb_dot = scripting.addModule("/utilities/clb_tool/clb_syscfg/source/clb_run_dynamic_template_clb_dot.js");
|
||||
|
||||
Reference in New Issue
Block a user