views:

15

answers:

1

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.

+2  A: 

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.

Jaka