![Lattice Semiconductor LatticeMico32 Скачать руководство пользователя страница 54](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852054.webp)
U
SING
THE
L
ATTICE
M
ICO
S
YSTEM
S
OFTWARE
:
Performing HDL Functional Simulation of LatticeMico32 Platforms
48
LatticeMico32 Hardware Developer User Guide
Performing HDL Functional Simulation
with Aldec Active-HDL
To perform HDL functional simulation with Aldec Active-HDL, first create a
script, “aldec_script.do,” and place it in the simulation directory. Copy the
following commands into the script:
cd “<path_to_toplevel_directory>/Platform/simulation”
workspace create sim_space
design create sim_design .
design open sim_design
cd “<path_to_toplevel_directory>/Platform/simulation”
set sim_working_folder .
vlog pmi_addsub.v
vlog pmi_ram_dq.v
vlog pmi_ram_dp.v
vlog pmi_ram_dp_true.v
vlog pmi_distributed_dpram.v
vlog pmi_fifo.v
vlog pmi_fifo_dc.v
# add additional vlog commands for each PMI module in the
# design. The list shown is not intended to be complete for all
# possible LM32 designs.
vlog +SIMULATION ../soc/platform.v
acom ../soc/platform_vhd.vhd
vlog +../Components/lm32_top/rtl/../soc
testbench.v
# the VSIM command uses the Aldec for Lattice pre-compiled FPGA
# libraries. If the Aldec for Lattice simulator is not being
# used, it will be necessary to compile the behavioral code for
# the FPGA. For the ECP2, the behavioral code is located at:
# <isptools>/cae_library/simulation/verilog/ecp2
vsim testbench –L ovi_ecp2
Launch the Active-HDL software and execute the following command in the
console window:
cd <path_to_toplevel_directory>/Platform/simulation
# verify that you are in the correct directory
pwd
do aldec_script.do
Performing HDL Functional Simulation
with Mentor Graphics ModelSim
To perform HDL functional simulation with ModelSim, first create a script,
“modelsim_script.do,” and place it in the simulation directory. Copy the
following commands into the script: