当前位置:网站首页>FPGA - odd even frequency division and decimal frequency division code routine
FPGA - odd even frequency division and decimal frequency division code routine
2022-07-29 06:34:00 【qq_ forty-six million four hundred and seventy-five thousand on】
1. Even frequency division
Even frequency division is relatively simple , Just note that the condition for the clock to flip is (N/2) still (N/2)-1, The non blocking assignment will not update the value until the next clock .
2. Odd frequency division
Odd frequency division is more complicated than even frequency division , When the duty cycle of frequency division is not required , Input clock clk Rising edge count , You can set the flip point of two counts , One is (N-1)/2, One is (N-1), Count to (N-1) The output clock flips and the counter is cleared , Suppose the counter counts 0~(N-1)/2 Interval output low level , Then the low level of the output clock has (N-1)/2 + 1 individual clk cycle , The count of high level is (N-1)/2+1 ~ (N-1), common (N-1)/2 individual clk cycle , So it's not 50% Duty cycle .
When the required duty cycle is 50% when , Input clock clk The rising and falling edges of are counted separately , According to the two counters, two clocks with staggered output are obtained , Make two clocks “ or ” operation , A clock that can make up for the difference , achieve 50% Duty cycle . With 7 Take frequency division as an example , The code is as follows :
module Odd_Divider(inputclk,inputrst_n,outputclk_divider);reg [2:0] count_p; // Rising edge countreg [2:0] count_n; // Falling edge countreg clk_p; // Rising edge frequency divisionreg clk_n; // Falling edge frequency division// Rising edge countalways
边栏推荐
猜你喜欢

Leetcode - Tips

day04_数组

Personal views on time complexity

Official tutorial redshift 04 rendering parameters

2022年的软件测试的岗位要求为何越来越高?这其中有什么不可告人的秘密吗?

Ue5 landscape conversion Nanite conversion method and it does not support the use method of starting dynamic mesh with lumen and lumen

Circular linked list and bidirectional linked list

day12_多线程

网络安全学习(二)

虹科白皮书 | 在工业4.0阶段,如何利用TSN时间敏感网络技术打造数字化工厂?
随机推荐
day10_异常处理&枚举
day13_多线程下
Clickhouse failed to import CSV without error but no data
Official tutorial redshift 08 light
Self study understanding of [chain forward star]
浅谈缺陷描写样式
[leetcode brush questions] array 3 - divide and conquer
只让电脑运行某个程序设置
高级套接口编程(选项和控制信息)
服务器常见故障及其解决方法
Vivado IP核之定点数转为浮点数Floating-point
[interview questions] the latest software test interview questions in 2022 (400) [with answers] continue to update
EtherCAT主站掉线后,如何保证目标系统免受故障影响?
子网数、主机数与子网掩码的关系
Merkle Tree 存在性功能第一次修改
网站被挂马的解决方案
Unity初学1——角色移动控制(2d)
day12_多线程
FPGA里两个数的大小直接进行比较就可以吗?
详解FIR滤波器和IIR滤波器的区别