How to convert Active-HDL simulation to ModelSim?
Here is the conversion guide using the pixel-to-byte IP as a sample for the ModelSim script:
1. Update the generated AHDL main *_run.do file and replace the AHDL work library with Modelsim work library creation steps.
Example: Crosslink Pixel2Byte (p2b_sample)
$>: /sim/aldec/p2b_sample_run.do
Comment or delete:
#-- Simulation work library creation --
cd "C:/Users/lbeloso/Documents/TEMP/package/p2b_sample/pixel2byte_eval/p2b_sample/sim/aldec"
workspace create pixel2byte_space
design create p2b_sample_design .
design open p2b_sample_design
Add the following:
##-- Modelsim work library creation
vlib work
vdel -lib work -all
vlib work
2. Update the generated AHDL sub *_rtl.do file. This is the file called under the do command of the main *.do file.
Example: Crosslink Pixel2Byte (p2b_sample)
$>: /sim/aldec/pixel2byte_rtl.do
2.1. For vlog command:
- Remove arguements: -v2k5 and *lifmd_black_boxes-aldec.vp
Example:
Original: vlog -v2k5 +define+PIXWIDTH=24 +define+DSI_TEST1 $diamond_dir/cae_library/simulation/blackbox/lifmd_black_boxes-aldec.vp $diamond_dir/cae_library/ ...
New: vlog +define+PIXWIDTH=24 +define+DSI_TEST1 $diamond_dir/cae_library/ ...
2.2. For vsim command:
- Replace "vsim +access +r " with "vsim -L work -L pmi_work -L ovi_lifmd "
Example:
Original: vsim +access +r top
New: vsim -L work -L pmi_work -L ovi_lifmd top
2.3. For wave command:
- Replace "wave //${design_inst}_inst/*" with "view wave" and "add wave /*"
Example:
Original: wave /top/${design_inst}_inst/*
New: view wave
add wave /*
How to run in Modelsim
1. Open Modelsim
2. Run the updated *_run.do file
Example: do /_run.do
Notes:
- Make sure that you are using a Diamond version that supports ModelSim (i.e. Diamond 3.12)
- Make sure that the "diamond_dir" variable points to the correct diamond version