gpt4 book ai didi

cpu - CPU 指令重新排序的跟踪

转载 作者:行者123 更新时间:2023-12-03 18:42:39 29 4
gpt4 key购买 nike

我研究了一些关于处理器和 Tomasulo 算法的指令重新排序的内容。

为了更深入地了解这个主题,我想知道是否有任何方法可以(获取跟踪)查看为给定程序完成的实际动态重新排序?

我想给出一个输入程序并查看我的程序的“乱序指令执行跟踪”。

我可以使用 IBM-P7 机器和 Intel Core2Duo 笔记本电脑。另外请告诉我是否有简单的替代方法。

最佳答案

您无法访问 CPU 内部完成的实际重新排序(没有公开的方法来启用跟踪)。但是有一些重新排序的模拟器,其中一些可以为您提供有用的提示。

对于现代英特尔 CPU(核心 2、nehalem、Sandy 和 Ivy),有来自英特尔的“英特尔(R) 架构代码分析器”(IACA)。它的主页是http://software.intel.com/en-us/articles/intel-architecture-code-analyzer/

这个工具可以让你查看一些线性代码片段将如何拆分为微操作,以及如何将它们规划到执行端口中。这个工具有一些限制,它只是 CPU u-op 重新排序和执行的不精确模型。

还有一些用于模拟 x86/x86_84 CPU 内部结构的“外部”工具,我可以推荐 PTLsim (或派生 MARSSx86 ):

PTLsim models a modern superscalar out of order x86-64 compatible processor core at a configurable level of detail ranging ... down to RTL level models of all key pipeline structures. In addition, all microcode, the complete cache hierarchy, memory subsystem and supporting hardware devices are modeled with true cycle accuracy.



但是 PTLsim 模拟了一些“PTL”cpu,而不是真正的 AMD 或 Intel CPU。好消息是这个 PTL 是 Out-Of-Order ,基于来自真实内核的想法:

The basic microarchitecture of this model is a combination of design features from the Intel Pentium 4, AMD K8 and Intel Core 2, but incorporates some ideas from IBM Power4/Power5 and Alpha EV8.



此外,尽管 http://es.cs.uni-kl.de/publications/datarsg/Senf11.pdf据说 JavaHASE applet能够模拟不同的简单 CPU,甚至支持 Tomasulo example .

关于cpu - CPU 指令重新排序的跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9250797/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com