本帖最后由 AutoESL 于 2011-10-16 10:34 编辑
Supported Simulators
ModelSim SEModelSim is a industry standard simulator. SE version should be used to support EDK simulation. If other versions of ModelSim would be used, refer to AR41046
Riviera PRO/Active HDLThese two simulators produced by Aldec are on the support list of compedklib 13.3.
ISimISim is Xilinx's simulator. It doesn't need a library compiling preparation. But the simulation speed is not as fast as other simulators.
Simulation Flow
Compile Sim LibraryIf ModelSim is used, the simulation library should be compiled and linked to EDK before simulation. This is a one-time job for a certain version of EDK/ModelSim combination. After it's set, no need to do it again.
- Install ModelSim. Add its executable path to system's PATH environment variable.
- Launch ISE Design Suite 32 Bit Command Prompt
- Run the 32-bit compedklib because the current version of ModelSim(6.6d) doesn't work well in 64-bit mode. When the future version works well, 64-bit compedklib can be used directly from Windows Start Menu.
- Default options can work well. Just go Next.
- Specify the output path and launch the compilation
Select SimulatorSimulator can be selected in EDK → Edit → Preference → Simulation.
Create TestbenchEDK can create a simple testbench which provides clock and reset. It can also attach the external memory simulation model to the processor system.
Assign SW AppliationXPS can initialize the BRAM content if the application runs in internal BRAM.
XPS → Project → Select Elf File → Choose Simulation Elf File
If the application runs in external memory, read the Sim Tips below for how to initialize external memory.
Run SimulationAlthough this step is divided into “Generate Simulation HDL Files” and “Launch HDL Simulator” in XPS Simulation menu, it can be done with one click of “Launch HDL Simulator” because the former step will be done automatically if the files are not generated yet.
After simulator is launched, use the commands provided by Xilinx scripts to simplify the simulation process.
c - compile the designs - simulatew - add signals to waveform windowrun xx ns - run the simulationThese commands can be typed in one line.
c;s;w;run 100 us;
Sim Tips
Use the correct tool combinationIn a most popular Windows 7 64-bit platform, the EDK shortcuts in Start Menu directs to the 64-bit tools.
Xilinx cable driver only works in 64-bit mode in the certain OS. The problem is, ModelSim upgraded to support 64-bit Windows recently. 32-bit version works better.
ModelSim also has some limitations that 32-bit executable can only use 32-bit library. Same for 64-bit executable.
When simulation is needed, open 32-bit ISE Command Prompt, launch a 32-bit XPS and use it to launch ModelSim. When on-board debug is needed, use 64-bit XPS directly.
Initialize External MemoryXapp1003 provides a perl script that can initialize external memory simulation model |