Forum Discussion
Altera_Forum
Honored Contributor
14 years agoLVDS High-speed counter。
I designed a counter, used to LVDS level pulse signal count. The number of pulses per second is a few hundred or so. Pulse width is random, from 1ns to 3ns, need to count the number of pulses, the in...
Altera_Forum
Honored Contributor
14 years agoalways @(posedge plusein or negedge c)
begin if(c==1'b0) count_data1[11:0]=12'b0; else begin if(count_data1[11:0]<12'hfff) begin count_data1[11:0]=count_data1[11:0]+1'b1; end end end The "count_data1 [11:0]" is the counter,the "c" is the reset signal, the "plusein" is the pulse input.