当前位置:网站首页>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 !
边栏推荐
- 【15. 区间合并】
- JS中箭头函数和普通函数的区别
- Basic operations of SQL database
- TypeScript:const
- Generate random numbers (4-bit, 6-bit)
- JVM第一话 -- JVM入门详解以及运行时数据区分析
- Digital transformation: data visualization enables sales management
- JVM第二话 -- JVM内存模型以及垃圾回收
- En utilisant le paquet npoi de net Core 6 c #, lisez Excel.. Image dans la cellule xlsx et stockée sur le serveur spécifié
- MongoDB第二话 -- MongoDB高可用集群实现
猜你喜欢

Word2vec yyds dry goods inventory

微信公众号订阅消息 wx-open-subscribe 的实现及闭坑指南

Blog recommendation | in depth study of message segmentation in pulsar

The markdown editor uses basic syntax

官宣:Apache Doris 顺利毕业,成为 ASF 顶级项目!

微信网页订阅消息实现

Filter & (login interception)

Music player development example (can be set up)

Junda technology - wechat cloud monitoring scheme for multiple precision air conditioners
![Opencv Learning Notes 6 -- image feature [harris+sift]+ feature matching](/img/50/5c8adacea78e470c255070c8621ddd.png)
Opencv Learning Notes 6 -- image feature [harris+sift]+ feature matching
随机推荐
建立自己的网站(14)
MongoDB第二話 -- MongoDB高可用集群實現
Opencv learning note 4 -- bank card number recognition
Flink 系例 之 TableAPI & SQL 与 MYSQL 数据查询
写在Doris毕业后的第一天
竣达技术丨多台精密空调微信云监控方案
Develop small programs and official account from zero [phase III]
手把手带你入门 API 开发
【LeetCode】16、最接近的三数之和
深度分析数据在内存中的存储形式
En utilisant le paquet npoi de net Core 6 c #, lisez Excel.. Image dans la cellule xlsx et stockée sur le serveur spécifié
基于价值量化的需求优先级排序方法
OpenSSL client programming: SSL session failure caused by an insignificant function
C#学习笔记(5)类和继承
Ensure production safety! Guangzhou requires hazardous chemical enterprises to "not produce in an unsafe way, and keep constant communication"
tensorflow2-savedmodel convert to tflite
Semiconductor foundation of binary realization principle
Flink 系例 之 TableAPI & SQL 与 MYSQL 插入数据
[Verilog quick start of Niuke series] ~ multi function data processor, calculate the difference between two numbers, use generate... For statement to simplify the code, and use sub modules to realize
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