当前位置:网站首页>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
边栏推荐
- waf防护是什么
- Learning notes of bit operation
- unsigned right shift
- IGMP protocol software development experiment
- Self study understanding of [chain forward star]
- Noi online 2022 popular group problem solving & personal understanding
- Clickhouse failed to import CSV without error but no data
- 2022 summer second day information competition learning achievement sharing 1
- Official tutorial redshift 05 system parameter detailed explanation
- 详解FIR滤波器和IIR滤波器的区别
猜你喜欢

虹科分享 | 测试与验证复杂的FPGA设计(2)——如何在IP核中执行面向全局的仿真

Vivado IP核之定点数转为浮点数Floating-point

虹科方案 | 在数字化的变电站中低成本实现无缝集成的独特解决方案

虹科Automation softPLC | MoDK运行环境与搭建步骤(1)——运行环境简介

day15_泛型

网络安全学习(二)

day06_类与对象

服务器135、137、138、139、445等端口解释和关闭方法
![[leetcode brush questions] array 3 - divide and conquer](/img/76/bc3d9ba0b84578e17bf30195bda5d1.png)
[leetcode brush questions] array 3 - divide and conquer

Official tutorial redshift 05 AOVs
随机推荐
服务器135、137、138、139、445等端口解释和关闭方法
Official tutorial redshift 05 system parameter detailed explanation
不安全的第三方组件的漏洞如何做前置规避?
虹科分享 | 为什么说EtherCAT是提高控制系统性能的最佳解决方案?
软件测试职业发展:软件测试人员该何去何从
day15_泛型
JVM memory structure
Official tutorial redshift 05 AOVs
基于TCP的在线词典
day13_ Under multithreading
多路IO用法
赛博朋克版特效shader
六、 网络互联与互联网
网络安全学习(二)
Official tutorial redshift 04 rendering parameters
解决分频模块modelsim下仿真输出为stx的错误
Ue5 light shadow basic shadow full resolution sawtooth shadow solution lumen
基于FPGA的4位减法器设计及仿真代码
day10_ Exception handling & enumeration
Explain the difference between FIR filter and IIR filter in detail