当前位置:网站首页>How to realize clock signal frequency division?
How to realize clock signal frequency division?
2022-07-01 15:00:00 【Knowing and doing &】
In the digital circuit experiment , It is often necessary to divide the clock signal , To realize the output of clock signals with different frequencies .
The following question is an example : The request will 50MHz Divide the clock signal of , produce 1MHz The clock signal of . Its Verilog Described below :
First , Accurately understand 50MHz What is the concept of clock frequency ?

50MHz The clock signal of , Its period is 1/50M second ,1 Second has 50M Square wave signal .
module example(clk_out,clk_in);
output reg clk_out;
input clk_in;
reg [30:0]cnt;
[email protected](posedge clk_in)
begin
if(cnt==24999999)
begin
clk_out<=!clk_out;
cnt<=0;
end
else
cnt<=cnt+1;
end
endmodule
The port list is very simple , There is only one input clock signal and one output clock signal .
50MHZ÷1HZ=50000000, Then you can 50MHZ The clock signal of , Set initial value cnt=0. Count when cnt Don't reach 50000000/2 namely 25000000 When the time ,cnt Self increasing 1;
Count when cnt achieve 50000000/2 namely 25000000 When the time .clo_out <= ~clkout, That is, flipping , also cnt from 0 Start counting again .
This can be achieved repeatedly clk_out The output signal of is 1HZ.
The end of this article , If there is any deficiency , Welcome to exchange !
边栏推荐
- Demand prioritization method based on value quantification
- 常见健身器材EN ISO 20957认证标准有哪些
- JVM performance tuning and practical basic theory part II
- MongoDB第二話 -- MongoDB高可用集群實現
- It's settled! 2022 Hainan secondary cost engineer examination time is determined! The registration channel has been opened!
- 这3款在线PS工具,得试试
- Blog recommendation | in depth study of message segmentation in pulsar
- Rearrangement of overloaded operators
- 首届技术播客月开播在即
- Internet hospital system source code hospital applet source code smart hospital source code online consultation system source code
猜你喜欢

Filter &(登录拦截)

IDEA全局搜索快捷键(ctrl+shift+F)失效修复

Opencv Learning Notes 6 -- image mosaic

【15. 区间合并】
![[leetcode 324] 摆动排序 II 思维+排序](/img/cb/26d89e1a1f548b75a5ef9f29eebeee.png)
[leetcode 324] 摆动排序 II 思维+排序

Junda technology indoor air environment monitoring terminal PM2.5, temperature and humidity TVOC and other multi parameter monitoring

写在Doris毕业后的第一天

C learning notes (5) class and inheritance

Task.Run(), Task.Factory.StartNew() 和 New Task() 的行为不一致分析
![[leetcode] 16. The sum of the nearest three numbers](/img/60/6a68333d6e543c601e6ed586b830d0.png)
[leetcode] 16. The sum of the nearest three numbers
随机推荐
Tensorflow 2. X realizes iris classification
Day-02 database
Salesforce, Johns Hopkins, Columbia | progen2: exploring the boundaries of protein language models
Zabbix API与PHP的配置
Storage form of in-depth analysis data in memory
[Verilog quick start of Niuke question series] ~ use functions to realize data size conversion
The State Administration of Chia Tai market supervision, the national development and Reform Commission and the China Securities Regulatory Commission jointly reminded and warned some iron ores
What are the books that have greatly improved the thinking and ability of programming?
Take you to API development by hand
Quelle valeur le pdnp peut - il apporter aux gestionnaires de produits? Vous savez tout?
solidty-基础篇-结构体和数组,私有 / 公共函数,函数的返回值和修饰符,事件
APK签名原理
Solid smart contract development - easy to get started
241. Design priorities for operational expressions
定了!2022海南二级造价工程师考试时间确定!报名通道已开启!
TypeScript:var
Demand prioritization method based on value quantification
The first word of JVM -- detailed introduction to JVM and analysis of runtime data area
三十之前一定要明白的职场潜规则
Redis installation and setting up SSDB master-slave environment under Ubuntu 14.04