TI论坛
直播中

甘满盛

7年用户 1249经验值
擅长:386660
私信 关注

关于Cache打开的问题,请大神帮我看看是什么原因?

本帖最后由 人间烟火123 于 2018-6-15 09:01 编辑

你好,我在GEL文件中配置如下:
CACHE_L1PCFG = 7; // L1P on, MAX size
CACHE_L1DCFG = 7; // L1D on, MAX size
CACHE_L2CFG = 2; // L2 on, 64k
,程序运行的时间是80秒;
配置如下:
CACHE_L1PCFG = 7; // L1P on, MAX size
CACHE_L1DCFG = 0; // L1D off
CACHE_L2CFG = 2; // L2 off
,程序运行的时间竟然也是80秒;
请问为什么呢?
配置如下:
CACHE_L1PCFG = 0; // L1P off
CACHE_L1DCFG = 0; // L1D off
CACHE_L2CFG = 0; // L2 off
程序运行的时间竟然也是192秒

回帖(4)

乔婧

2018-6-15 00:28:11
你好,
请问在你打开L2 cache的时候,是否也配置了MAR寄存器把需要cache的DDR区域配置为可以cache了?从你的实验结果来看,你使用的数据段没有被cache。
举报

甘满盛

2018-6-15 00:43:08
引用: 物是人非aaa 发表于 2018-6-15 00:28
你好,
请问在你打开L2 cache的时候,是否也配置了MAR寄存器把需要cache的DDR区域配置为可以cache了?从你的实验结果来看,你使用的数据段没有被cache。

你好,非常感谢你的回复,的确忘记了MAR寄存器的配置,cache已经打开。请问
undefined first referenced
symbol in file
--------- ----------------
_timer_isr D:\CCS_install\MyProjects\3.1.2 hello\vecs.obj这是什么问题?
举报

乔婧

2018-6-15 00:53:13
引用: caoguiqun 发表于 2018-6-15 00:43
你好,非常感谢你的回复,的确忘记了MAR寄存器的配置,cache已经打开。请问
undefined first referenced
symbol in file

你好,
就错误信息来看,编译的时候没有找到_timer_isr,你确认_timer_isr 的确在你代码/库里面?
举报

甘满盛

2018-6-15 01:00:09
引用: 物是人非aaa 发表于 2018-6-15 00:53
你好,
就错误信息来看,编译的时候没有找到_timer_isr,你确认_timer_isr 的确在你代码/库里面?

这是vecs.asm文件,我将其添加到工程中了
*------------------------------------------------------------------------------
* Global symbols defined here and exported out of this file
*------------------------------------------------------------------------------
.global _vectors
.global _c_int00
.global _vector1
.global _vector2
.global _vector3
.global _vector4
.global _vector5
.global _vector6
.global _vector7
.global _vector8 ; Hookup the c_int08 ISR in main()
.global _vector9
.global _vector10
.global _vector11
.global _vector12
.global _vector13
.global _timer_isr
.global _vector15
*------------------------------------------------------------------------------
* Global symbols referenced in this file but defined somewhere else.
* Remember that your interrupt service routines need to be referenced here.
*------------------------------------------------------------------------------
.ref _c_int00
.ref _timer_isr
*------------------------------------------------------------------------------
* This is a macro that instantiates one entry in the interrupt service table.
*------------------------------------------------------------------------------
VEC_ENTRY .macro addr
STW B0,*--B15
MVKL addr,B0
MVKH addr,B0
B B0
LDW *B15++,B0
NOP 2
NOP
NOP
.endm

*------------------------------------------------------------------------------
* This is a dummy interrupt service routine used to initialize the IST.
*------------------------------------------------------------------------------
_vec_dummy:
B B3
NOP 5
*------------------------------------------------------------------------------
* This is the actual interrupt service table (IST). It is properly aligned and
* is located in the subsection .text:vecs. This means if you don't explicitly
* specify this section in your linker command file, it will default and link
* into the .text section. Remember to set the ISTP register to point to this
* table.
*------------------------------------------------------------------------------
.sect ".vectors"
.align 1024
_vectors:
_vector0: VEC_ENTRY _c_int00 ;RESET
_vector1: VEC_ENTRY _vec_dummy ;NMI
_vector2: VEC_ENTRY _vec_dummy ;RSVD
_vector3: VEC_ENTRY _vec_dummy
_vector4: VEC_ENTRY _vec_dummy
_vector5: VEC_ENTRY _vec_dummy
_vector6: VEC_ENTRY _vec_dummy
_vector7: VEC_ENTRY _vec_dummy
_vector8: VEC_ENTRY _vec_dummy ; Hookup the c_int08 ISR in main()
_vector9: VEC_ENTRY _vec_dummy
_vector10: VEC_ENTRY _vec_dummy
_vector11: VEC_ENTRY _vec_dummy
_vector12: VEC_ENTRY _vec_dummy
_vector13: VEC_ENTRY _vec_dummy
_vector14: VEC_ENTRY _timer_isr
_vector15: VEC_ENTRY _vec_dummy
举报

更多回帖

发帖
×
20
完善资料,
赚取积分