DCM is a digital clock management unit that is frequently used in xilinx devices. It can be used for frequency division and frequency doubling.
The basis of the experiment for ip Simulation is that all xilinx libraries have been added to modelsim, and the method is not described here.
1. Create a folder to save the source code
Dcm. v is the top-level file.
My_dcm is an instance of the IP address of dcm.
Dcm_tb is a test file
Glbl is in the C: \ Xilinx \ 12.4 \ ISE_DS \ ISE \ Xilinx \ src directory. C: \ Xilinx is the installation directory of ISE.
2. Write do
1 # Creat a work lib 2 vlib work 3 4 # Map the work lib to current lib 5 vmap work 6 7 # Compile the source files 8 vlog F: /work/dcm/src/dcm. v 9 vlog F:/work/dcm/src/dcm_tb.v10 vlog F:/work/dcm/src/my_dcm.v11 vlog F:/work/dcm/src/glbl. v12 # start simulator13 14 vsim-L xilinxcorelib_ver-L secureip-L simprims_ver-L unisims_ver-novopt work. dcm_tb work. glbl 15 16 # add wave17 18 add wave/* 19 20 21 22 23 24 25 26 27 run-all
The second line is to compile several libraries in xilinx and add work. glbl at the end.
3. Run modelsim simulation.
(1): Build a project
(2): enter do dcm. do in the Command window.
The simulation results are as follows: