This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/TMS320C6657:从计时器寄存器读取的 CPU 执行周期过长

Guru**** 2535150 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/627511/ccs-tms320c6657-too-long-execution-cpu-cycles-for-reading-from-a-timer-register

器件型号:TMS320C6657

工具/软件:Code Composer Studio

您好!  

我尝试使用下面的代码来测试从寄存器读取所需的 CPU 周期数。 但结果大约为119个周期、仅用于读取寄存器。 我认为这不正确、那么可能是什么问题?  

代码位于 L2 RAM 上、非常感谢

#include

unsigned int start、stop;
unsigned int test = 0;

int main (空)

TSCL = 0;//需要写入它来开始计数

START = TSCL;

//关键代码
TEST =*((volatile unsigned int *)(0x02220020));// SOC_TMR_2_regs + TMR_INTCTLSTAT

STOP = TSCL;
STOP --= START;// STOP 将具有 CPU 周期总数

for (;;)


  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    访问计时器直通3条总线和 OneBridge、请参阅"Switch Fabric Connections (交换机结构连接)"是 CPU 数据手册、也可以访问 processors.wiki.ti.com/.../Keystone_SoC_Level_Optimizations:
    CPU -> TeraNet 3P_A (CPU 时钟/3)-> TERANET3P_B (时钟/3)-> BRIDGE_20 -> TeraNet 6P_B (时钟/6)->计时器

    不确定计算是否正确、但我想:
    (/3)(/3)(/6)= 54个 CPU 时钟

    CPU 读取至少需要一个命令加上应答、即54 *2 = 108个时钟。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    阿尔贝托

    非常感谢您的回复。 我现在明白了