cql

导航

2012年5月15日 #

Verilog 上升沿与下降沿检测

摘要: FPGA中常用的上升沿检测和下降沿检测代码,使用的verilog hdl语言//上升沿检测module pose_chk(clk, in, out);input clk, in;output out;reg curr, last;always@(posedge clk)begin curr <= in; last <= curr;endassign out = curr & (~last);endmodule//下降沿检测module nege_chk(clk, in, out);input clk, in;output out;reg curr, last;always@ 阅读全文

posted @ 2012-05-15 21:50 cql blog 阅读(4104) 评论(0) 推荐(0) 编辑