Modelsim与Xilinx联合仿真之PLL
目录
一、如何联合仿真
二、记忆法
三、实战演练之PLL
一、如何联合仿真
1. 前期准备
1)设计环境:Vivado 2018.3 ;
2)仿真平台:Modelsim 10.7 ;
3)笔记本: Windows 11 ;
2. 联合仿真步骤
1)在Vivado的菜单栏中选择编译仿真软件的仿真库:
2)提示编译成功后,需要修改Modelsim的环境变量,方便下次进入:
3)Vivado设计平台上的设置也需要被修改:
4)最后点击 “Run Simulation” 即可在Vivado平台中调用Modelsim来跑仿真了;
二、记忆方法:想象成A国想要引进B国的商品总共分几步?
1. 翻译和审核B国商品;
2. 制造“绿卡”方便后续的引进;
3. 在A国为B国商品设立连接专门的通道;
三、实战演练之PLL
1. 激励程序:
1 entity pll_xilinx_tb is 2 end entity; 3 4 architecture behav of pll_xilinx_tb is 5 6 component pll_xilinx is 7 port( 8 nRST : in std_logic; 9 clkin : in std_logic; 10 clkout : out std_logic 11 ); 12 end component; 13 14 signal nRST_t : std_logic:='0'; 15 signal clkin_t : std_logic:='0'; 16 17 begin 18 19 nRST_t <= '0','1' after 100 ns; 20 clkin_t <= not clkin_t after 10 ns; 21 22 pll_xilinx_inst : pll_xilinx 23 port map ( 24 nRST => nRST_t, 25 clkin => clkin_t, 26 clkout => open 27 ); 28 29 end behav;
2. 仿真模块程序:
entity pll_xilinx is port( nRST : in std_logic; clkin : in std_logic; clkout : out std_logic ); end entity; architecture behav of pll_xilinx is component clk_wiz_0 port( clk_out1 : out std_logic; reset : in std_logic; clk_in1 : in std_logic ); end component; signal reset : std_logic; begin reset <= not nRST; clk_wiz_0_inst : clk_wiz_0 port map ( clk_out1 => clkout, reset => reset, clk_in1 => clkin ); end behav;
3. 仿真结果