完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
ti 工程师提示:
http://www.ti.com/product/TMS320C6748/technicaldocuments关于TMS320C674x DSP Cache User's Guide (Rev. A) 上面文档中的CSLr是可以使用的,请下载下面SDK包,安装后在路径:C:c6748_sdkpdk_C6748_2_0_0_0biospsp_03_00_01_00cslr下面 http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/bios_c6sdk/latest/index_FDS.html 我安装上面地址下载一份后,翻开例程如下: #include #include #include "cslr/cslr_cache.h" #include #include void config_cache(void); int test_config(void); int testResult=0; // Test status int main(void) [ // Configure the cache using register layer config_cache(); // Verify configuration using the Cache module api's return(test_config()); ] void config_cache(void) [ CSL_CacheRegsOvly cacheRegs = (CSL_CacheRegsOvly)CSL_CACHE_0_REGS; volatile unsigned int stall; // The below writes to the CFG registers are followed by a dummy read. Mode // switches require that a read is performed immediately after the write. The // read stalls the cpu to ensure the mode change completes. // Set L1P size to 32K CSL_FINST(cacheRegs->L1PCFG,CACHE_L1PCFG_MODE,32K); stall = cacheRegs->L1PCFG; // Set L1D size to 32K CSL_FINST(cacheRegs->L1DCFG,CACHE_L1DCFG_MODE,32K); stall = cacheRegs->L1DCFG; // Set L2 size to 64k and normal opperation cacheRegs->L2CFG = CSL_FMKT(CACHE_L2CFG_MODE,64K) | CSL_FMKT(CACHE_L2CFG_L2CC,NORMAL); stall = cacheRegs->L2CFG; // The MAR registers set the cachability of memory spaces external to the // megamodule. Below is an example of turning on cachability for two ranges. // Reference spru871H for a complete list the MAR ranges. // Set MAR[192] range 0xC0000000-0xC0FFFFFF as cacheable CSL_FINST(cacheRegs->MAR[192],CACHE_MAR_PC,CACHEABLE); ] int test_config(void) [ Cache_Size checkSize; Cache_Mode checkMode; Cache_Mar checkMar192; Ptr baseMar192; baseMar192 = (Ptr)0xC0000000; // MAR192 base address // The Cache module read API's are used to verify the previous configuration // that was performed using the register layer. // Read L1P, L1D, and L2 cache size settings Cache_getSize(&checkSize); // Read L2 mode setting checkMode = Cache_getMode(Cache_Type_L2); // Read MAR192 setting checkMar192 = Cache_getMar(baseMar192); printf("nTest cache configuratonn"); // Verify cache size settings for L1P, L1D, and L2 if((checkSize.l1pSize==Cache_L1Size_32K)&&(checkSize.l1dSize==Cache_L1Size_32K)&& (checkSize.l2Size==Cache_L2Size_64K)) [ printf("nL1P size = 32Kn"); printf("L1D size = 32Kn"); printf("L2 size = 64Kn"); ] else [ printf("nError setting cache sizesn"); testResult=1; ] // Verify mode setting for L2 if(checkMode==Cache_Mode_NORMAL) printf("nL2 mode set to NORMALn"); else [ printf("nError setting moden"); testResult=1; ] // Verify MAR192 settings if(checkMar192==Cache_Mar_ENABLE) printf("nMAR192 range set to cacheablen"); else [ printf("nError setting MAR rangen"); testResult=1; ] // Display test status if(testResult==0) printf("nCache configuration test: PASSEDn"); else printf("nCache configuration test: FAILEDn"); return(testResult); ] 但是在文件里面 CACHE_L1PCFG_MODE Cache_getSize() Cache_getMode()这些函数及变量都找不到。 我在startware的安装目录下看到了另一个版本的cache操作函数,但论坛里面好多翻译有问题。 麻烦TI的工程师帮忙解决C6748 缓存这块的问题,论坛里面好多关于C6748 cache 都被凉到一边了。 最好能给个验证OK的示例程序! |
|
相关推荐
2 个讨论
|
|
只有小组成员才能发言,加入小组>>
549 浏览 0 评论
1613 浏览 0 评论
2047 浏览 0 评论
为啥BQ7693003DBTR芯片在和BQ769X0盒子通讯时收不到信号?
1513 浏览 0 评论
DSP 28027F 开发板 XDS100v2调试探针诊断日志显示了 Error -150 (SC_ERR_FTDI_FAIL)如何解决
1337 浏览 0 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
1756浏览 29评论
2781浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
1723浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
1634浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
1645浏览 13评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 22:00 , Processed in 0.762483 second(s), Total 71, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2682