ARM926EJ-S 周期计数器

发布于 2024-11-15 06:21:19 字数 143 浏览 4 评论 0原文

我使用 ARM926EJ-S,并试图弄清楚 ARM 是否可以提供(例如可读寄存器)CPU 的周期计数器。我猜想 # 代表 CPU 上电后的周期数。

在我的系统中,我只有低分辨率外部 RTC/定时器。我希望能够实现高分辨率计时器。

非常感谢!

Im using an ARM926EJ-S and am trying to figure out whether the ARM can give (e.g. a readable register) the CPU's cycle-counter. I guess a # that will represent the number of cycles since the CPU has been powered.

In my system i have only Low-Res external RTC/Timers. I would like to be able to achieve a Hi-Res timer.

Many thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绝不放开 2024-11-22 06:21:19

您可能只有两个选择:

  • 使用指令周期精确的模拟器;这里的问题是,有效地模拟外设和外部刺激可能很复杂或不可能。

  • 使用外围硬件定时器。在大多数情况下,您将无法以 ARM9 的典型核心时钟速率运行此类计时器,并且在计时周期的两侧服务计时器都会产生开销,但它可用于执行较大或较长运行代码段的时间,这可能比循环计数更实际。

虽然周期计数可能在某种程度上可扩展到不同的时钟速率,但它仍然受到内存和 I/O 等待状态的限制,因此可能不像性能指标那样有用,除非在微观分析层面,并且更大范围的分析除外。通常可以通过更广阔的视野来获得性能提升。

You probably have only two choices:

  • Use an instruction-cycle accurate simulator; the problem here is that effectively simulating peripherals and external stimulus can be complex or impossible.

  • Use a peripheral hardware timer. In most cases you will not be able to run such a timer at the typical core clock rate of an ARM9, and there will be an over head in servicing the timer either side of the period being timed, but it can be used to give execution time over larger or longer running sections of code, which may be of more practical use than cycle count.

While cycle count may be somewhat scalable to different clock rates, it remains constrained by memory and I/O wait states, so is perhaps not as useful as it may seem as a performance metric, except at the micro-level of analysis, and larger performance gains are typically to be had by taking a wider view.

时光匆匆的小流年 2024-11-22 06:21:19

Arm-9 未配备 Cortex 系列中包含的 PMU(性能监控单元)。 此处描述了 PMU。 Linux 内核支持使用 PMU 进行性能基准测试。参见此处获取 perf 工具集的文档。

对arm-9有点不确定,需要进一步挖掘......

The arm-9 is not equipped with an PMU (Performance Monitoring Unit) as included in the Cortex-family. The PMU is described here. The linux kernel comes equipped with support for using the PMU for benchmarking performance. See here for documentation of the perf tool-set.

Bit unsure about the arm-9, need to dig a bit more...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文