- 打开添加IP的界面,即那个IP Catalog
- 输入clock查找PLL这个IP核,即那个Clocking Wizard。
- 配置相应信息,在这个界面可以配置相应的要输出的时钟频率和相位等信息,这里配置为输出100MHZ。
- 调用PLL模块
`timescale 1ns / 1ns
//
// Company:
// Engineer:
//
// Create Date: 09/23/2020 02:52:12 PM
// Design Name:
// Module Name: test_pll
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module test_pll(
input sys_clk,
input sys_rst_n,
output clk_100M,
output locked
);
clk_wiz_0 clk_wiz_0_inst
(
.clk_out100M(clk_100M),
.resetn (sys_rst_n),
.locked (locked),
.clk_in1 (sys_clk)
);
endmodule
- 测试模块
`timescale 1ns / 1ns
//
// Company:
// Engineer:
//
// Create Date: 09/23/2020 03:04:28 PM
// Design Name:
// Module Name: td_test_pll
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module td_test_pll(
);
reg clk;
reg rst;
wire clk_100M;
wire locked;
initial begin
clk<=1'b0;
rst<=1'b0;
#10 rst<=1'b1;
end
always #5 clk=~clk;
test_pll test_pll_inst(
.sys_clk (clk),
.sys_rst_n (rst),
.clk_100M(clk_100M),
.locked (locked)
);
endmodule
- 仿真波形