EDA Interfaces

Example of Performing a Functional Simulation of a FPGA Express Verilog HDL Design with a Custom Megafunction Variation in the ModelSim Software



You can perform a functional simulation of the custom megafunction variation you created in Example of Creating a "black box" for a Verilog HDL Custom Megafunction Variation Using the FPGA Express Software before compilation in the FPGA Express or the Quartus® II software.

You can create a script file that performs the following steps:

  1. Compiles the altera_mf.v library.

  2. Compiles the Verilog Design File (.v) generated by the MegaWizard® Plug-In Manager with the ModelSim® software. In this example, the file is lvds_rx_wrapper.v.

  3. Compile the top-level Verilog Design File with the ModelSim software. In this example, the file name is top_level_lvds.v.

  4. Compiles the test bench file. In this example, the test bench file name is test.v.

You can simulate this sample design in the ModelSim software by using the commands shown in the following sample script:

vlib work 					# Create working directory
vlog /quartus/eda/sim_lib/altera_mf.v 		# Read the simulation library 
						# /quartus/ is the path to Quartus II
exec vmap altera_mf work			# Create altera_mf library and map it to work
vlog lvds_rx_wrapper.v	lvds_tx_wrapper.v	# Compile Megawizard generated file
vlog top_level_lvds.v				# Compile source instantiating module
vlog  test.v					# Compile test fixture
vsim -t ns  test				# Simulate cam_wrapper_test with 
						# resolution in ns
view wave
add wave /*
run 10000 ns


Back to Top

- PLDWorld -

 

Created by chm2web html help conversion utility.