日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

FPGA边沿检测Verilog实现(包含上升沿,下降沿,双边沿)

發(fā)布時(shí)間:2024/9/27 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 FPGA边沿检测Verilog实现(包含上升沿,下降沿,双边沿) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

脈沖邊沿的特性:兩側(cè)電平發(fā)生了變化

思路:設(shè)計(jì)兩個(gè)或多個(gè)一位的寄存器,用來接收被檢測的信號,系統(tǒng)時(shí)鐘來一次記一次輸入信號,如果用了兩個(gè)寄存器直接異或就可以了。

module edge_detect(input clk,input rst_n, input data_in, output raising_edge_detect, output falling_edge_detect, output double_edge_detect); reg data_in_d1; reg data_in_d2;always @ (posedge clk,negedge rst_n) beginif(!rst_n)begin data_in_d1 <= 1'b0; data_in_d2 <= 1'b0; end elsebegin data_in_d1 <= data_in; data_in_d2 <= data_in_d1;end end assign raising_edge_detect = data_in_d1 & (~data_in_d2);//上升沿 assign falling_edge_detect = ~data_in_d1 & data_in_d2;//下降沿 assign double_edge_detect = data_in_d1 ^ data_in_d2;//雙邊沿 endmodule

?

總結(jié)

以上是生活随笔為你收集整理的FPGA边沿检测Verilog实现(包含上升沿,下降沿,双边沿)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。