什么是 ModelSim 输出文件以及如何将十六进制文件加载到 ROM 上?

发布于 2024-09-17 05:04:51 字数 97 浏览 1 评论 0原文

我想在 ModelSim 中模拟使用 VHDL 设计的微处理器。我想知道模拟的输出文件格式是什么? 我还想在该微处理器的 ROM 上加载一些 HEX 文件...我该怎么办? 谢谢。

I want to simulate a microprocessor designed using VHDL in ModelSim. I wanted to know what the output file format of the simulation is?
I also want to load some HEX file on the ROM of this Microporcessor...what should I do?
Thanks.

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

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

发布评论

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

评论(1

山田美奈子 2024-09-24 05:04:51

当考虑用 VHDL 或 Verilog 进行模拟时,您需要考虑一下您手中是否有想要进行物理模拟的硬件。

因此,如果您手中有 CPU,则需要将其放在某种 PCB 上,该 PCB 具有时钟、电源、CPU 总线、内存以及您将在 CPU 上运行的程序将使用的其他硬件。

VHDL CPU 也需要所有这些,但不是物理意义上的。您可以用 VHDL 或 Verilog 制作“PCB”和其他东西。因此,在模拟它之前,您需要编写一个测试平台(它的虚拟环境)。这是你可以放置 ROM 的地方。您用 VHDL 编写虚拟 ROM,这样它将位于 CPU 总线上,并在 CPU 尝试读取数据时向 CPU 提供数据。

模拟的输出几乎可以是您喜欢的任何内容。由于您正在制作连接到 CPU 总线的测试平台和设备。由于您正在编写 CPU 将与之交互的设备,因此您可以让它们输出文本,或者您甚至可以创建一个虚拟帧缓冲区,它可以模拟连接到 CPU 总线的图形接口。

您还可以查看 CPU 内部的信号以及它将在总线上执行的操作,但如果您不调试 CPU 本身的 VHDL,那么这可能对您没有多大帮助。

另请记住,这样的模拟非常非常慢(取决于 CPU 的复杂性),模拟在这样的 CPU 上运行的程序可能需要几天的时间。因此,如果您对 CPU 的内部工作原理(其中的信号)不感兴趣,您确实应该考虑为您的 CPU 使用模拟器(如果存在)。

如果您提供有关CPU的更多详细信息以及您想在其上运行什么类型的程序,我可以尝试帮助ypu提供更详细的信息。

When thinking about simulating things in VHDL or Verilog you need to think like if you had the hardware which you want to simulate physically in your hands.

So if you have a CPU in your hand you need to put it on some kind of a PCB which has clocks, power, the CPU's bus, memory and other hardware that the program which you will run on the cpu will use.

The VHDL CPU also needs all of this, but not in a physical sense. You make the "PCB" and other things in VHDL or Verilog. So before you can simulate it you need to write a test bench (the virtual environment for it). This is where you can put your ROM. You write your virtual ROM in VHDL so it will sit on the CPU's bus and give data to the CPU when it will try to read it.

The output of the simulation can be pretty much anything you like. Since you are making the testbench and the devices which are connected to the CPU's bus. Since you are writing the devices that the CPU will interact with you can make them output text or you can even make a virtual framebuffer which could emulate a graphics interface connected to the CPU's bus.

You can also look at the signals inside of the CPU and what it will be doing on the bus, but that will probably not help you much if you are not debugging the VHDL of the CPU itself.

Also keep in mind that simulations like this are very,very slow (depending on the complexity of the CPU) it can take several days to simulate a program running on a CPU like this. So if you are not interested in the inner workings of the CPU (signals inside it), you should really consider using an emulator (if one exists) for your CPU.

If you provide more details on the CPU and what kind of program you want to run on it, I can try to help ypu with more detailed information.

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