当前位置:网站首页>Learn FPGA from the bottom structure (16) -- customization and testing of pll/mmcm IP
Learn FPGA from the bottom structure (16) -- customization and testing of pll/mmcm IP
2022-07-25 20:21:00 【Lonely single knife】
Catalog
2、PLL IP Instantiation and testing of
2.1、 Exemplify a PLL IP nucleus
Series catalog and portal
《 Start with the underlying structure FPGA》 Directory and portal
Customizing one PLL IP Before nuclear , It is strongly recommended that you read : Start with the underlying structure FPGA(15)----MMCM And PLL
In this article , Have been to PLL/MMCM IP The key factors of nuclear are explained in detail .
1、PLL IP The custom of
because MMCM Count as PLL A functional superset , The extra dynamic phase shift and spread function are not explained in detail in this chapter , Therefore, the following contents are used PLL IP Kernel Implementation .
- After creating a new project , Click on IP Catalog
- It will appear after clicking IP Catalog page , stay IP Search in the search box of the kernel clocking
- According to the screening , Double click to select PLL nucleus Clocking Wizard

①、 first page

① Clock monitoring
Enable Clock Monitoring : Real time monitoring can detect the clock at any time
② Implementation types
primitive: Can choose PLL still MMCM To achieve , In general PLL Enough to achieve most functions ,MMCM Suitable for more advanced applications , Such as dynamic phase shifting or frequency spreading
③ Clock characteristics
Frequency Synthesis: Frequency synthesis , Check it to modify the desired clock frequency output
Phase Alignment: Phase alignment , When checked, the phase of the input signal and the output signal are consistent , The price is an extra one BUFG
Dynamic Reconfig : Can pass AXI4 The interface is dynamically modified during use IP To configure , Realize more flexible clock output , Specific implementation can refer to :xapp888_7Series_DynamicRecon
Safe Clock Starup : Do not output before the clock is stable , Benefits: the clock is more stable and safe , Disadvantages may affect performance
Minimize Power : Optimize power consumption , The cost is that performance may be affected
④ Clock jitter (Jitter ) Optimize
Balanced: The default option , performance 、 Power balance state
Minimize Output Jitter: Minimize output clock jitter , The cost is that the power consumption becomes larger and may lead to phase error
Maximize Input Jitter filtering: Maximize input clock filtering , Allow the jitter of the input clock signal to increase ( That is to say, the input clock signal with worse quality is allowed ), However, it may cause the jitter of the output clock signal to become larger
⑤ Dynamic reconfiguration options : This function is not checked , So don't say
⑥ Input clock information
Optional input two clock signals as input
Configure the frequency of the input clock 、 shake 、 source
②、 The second page

① Output clock information setting
Check the clock information to be output , Including frequency , Phase relationship and duty cycle , It should be noted that the set value may not be achieved , Everything is subject to the actual value .
We choose 5 Different types of clock frequencies , See the table for specific information .
② Check the output sequence of different signals , Need to be in the ① Page check Safe Clock Starup Options
③ Clock feedback : Only in the ① Page checked Phase Alignment Options can be checked
automatic control on-chip And user-controlled on-chip: If your output clock signal is FPGA For internal use , Then the feedback path is on chip Of , The difference between automatic and user-defined is whether the feedback clock pin is automatically connected or open to the user to connect
automatic control off-chip And user-controlled off-chip: If your output clock signal is to FPGA Used externally , Then the feedback path is off chip Of , The difference between automatic and user-defined is whether the feedback clock pin is automatically connected or open to the user to connect .automatic control off-chip In mode, it is also necessary to specify that the feedback pin is a single ended signal (single ended) Or differential signal (differential)
④ optional
reset: Reset signal
power_down: Power down mode ( close PLL, Stop output )
locked: When set, it means PLL The output signal is valid , Usually use PLL Do not use the output clock signal until the signal is valid
⑤ Reset type
Select high-level reset or low-level reset . Suggested choice xilinx Common high-level reset .
③、 The third page

Rename the signal of the output port , Generally, for the sake of generality , Name change is not recommended .
④、 Page four

Direct pair PLL The underlying primitive operates , Realize more detailed customized design . Generally not used .
⑤、 Page 5

PLL IP Summary of nuclear design information , Confirm the design information .
2、PLL IP Instantiation and testing of
2.1、 Exemplify a PLL IP nucleus
Follow the above steps to generate IP after , Copy IP The instantiation template provided by the core .


2.2、 To write testbench
We write directly testbench To exemplify PLL IP Nuclear testing :
`timescale 1ns / 1ns
module tb_pll();
reg clk_in; // Input clock 50M
reg reset; // Highly effective reset signal
wire locked;
wire clk50_90d; //50M, The offset 90 degree
wire clk50_n90d; //50M, The offset -90 degree
wire clk50_d75; //50M, Duty cycle 75%
wire clk_100; //100M
wire clk_150; //150M
always #10 clk_in = ~clk_in; // Generate input clock
// Initialize the input signal
initial begin
reset = 1'b1;
clk_in = 1'b0;
#100
reset = 1'b0;
wait(locked); //PLL The output is valid
#1000 $finish;
end
// Exemplification PLL IP nucleus
clk_wiz_0 instance_name
(
// Clock out ports
.clk50_90d (clk50_90d), // output clk50_90d
.clk50_n90d (clk50_n90d), // output clk50_n90d
.clk50_d75 (clk50_d75), // output clk50_d75
.clk_100 (clk_100), // output clk_100
.clk_150 (clk_150), // output clk_150
// Status and control signals
.reset (reset), // input reset
.locked (locked), // output locked
// Clock in ports
.clk_in1 (clk_in)
);
endmodule2.3、 The simulation test
Use vivado Built in simulation tools simulator Run the simulation , The simulation results are as follows :

Next, look at each signal separately :
(1)clk50_90d:50M, The offset 90 degree

(2)clk50_n90d:50M, The offset -90 degree

(3)clk50_d75:50M, Duty cycle 75%

(4)clk_100:100M

(5)clk_150:150M

You can see , All output clock signals are consistent with the expected design , The simulation is successful .
3、 Summary and reference
- For general applications ,PLL IP It's very easy to get started ; As for dynamic reconfiguration and dynamic phase shift functions , It may be a little troublesome
- Don't use frequency division clock in ordinary design , Instead, try to use PLL or MMCM To realize the design of clock signal
Reference material 1:pg065-clk-wiz
- Blog home page :wuzhikai.blog.csdn.net
- This paper is written by Lonely single blade original , First appeared in CSDN platform
- The article is still being updated , Do you have any questions , You can communicate with me in the comment area !
- It's not easy to create , Your support is the biggest driving force for me to continuously update ! If this article helps you , Please give me more praise 、 Reviews and collections !
边栏推荐
- Successfully solved typeerror: a bytes like object is required, not 'str‘
- Stochastic gradient descent method, Newton method, impulse method, adagrad, rmsprop and Adam optimization process and understanding
- 03 isomorphism of tree 1
- [today in history] July 13: the father of database passed away; Apple buys cups code; IBM chip Alliance
- 【高等数学】【4】不定积分
- Pytorch's transforms (numpy data type is converted to tensor, normalized and resized)
- “链”接无限可能:数字资产链,精彩马上来!
- How much memory does bitmap occupy in the development of IM instant messaging?
- [today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day
- RF, gbdt, xgboost feature selection methods "recommended collection"
猜你喜欢

增加 swap 空间

PyTorch 模型 onnx 文件的导出和调用

毕业从事弱电3个月,我为什么会选择转行网络工程师

导电滑环在机械设备方面的应用
![[advanced mathematics] [5] definite integral and its application](/img/b2/62748b7533982f2b864148e0857490.png)
[advanced mathematics] [5] definite integral and its application
![[noi simulation] string matching (suffix automata Sam, Mo team, block)](/img/db/3ccb00e78bba293acdae91ffa72a2c.png)
[noi simulation] string matching (suffix automata Sam, Mo team, block)
![[today in history] July 7: release of C; Chrome OS came out;](/img/a6/3170080268a836f2e0973916d737dc.png)
[today in history] July 7: release of C; Chrome OS came out; "Legend of swordsman" issued

Prescan quick start to master Lesson 19: prescan actuator configuration, track synchronization and non configuration of multiple tracks

Jmeter——接口测试
![[today in history] July 1: the father of time-sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world](/img/41/76687ea13e1722654b235f2cfa66ce.png)
[today in history] July 1: the father of time-sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world
随机推荐
JVM (XXIII) -- JVM runtime parameters
Digital informatization (enumerate assumptions first, and then see whether the conditions are met) (1089 werewolf kill - simple version)
【高等数学】【6】多元函数微分学
[today in history] July 19: the father of IMAP agreement was born; Project kotlin made a public appearance; New breakthroughs in CT imaging
[today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born
Stochastic gradient descent method, Newton method, impulse method, adagrad, rmsprop and Adam optimization process and understanding
JS scope and scope chain
Sentinel simple current limiting and degradation demo problem record
RF、GBDT、XGboost特征选择方法「建议收藏」
「分享」DevExpress ASP.NET v22.1最新版本系统环境配置要求
如何保证定制滑环质量
SecureCRT garbled code solution [easy to understand]
wallys//IPQ5018/IPQ6010/PD-60 802.3AT Input Output 10/100/1000M
PyTorch 模型 onnx 文件的导出和调用
[today in history] July 3: ergonomic standards act; The birth of pioneers in the field of consumer electronics; Ubisoft releases uplay
推荐系统专题 | MiNet:跨域CTR预测
[today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day
Partial interpretation of yolov7 paper [including my own understanding]
当AI邂逅生命健康,华为云为他们搭建三座桥
[today in history] July 18: Intel was founded; The first photo was posted on the world wide web; EBay spins off PayPal