Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I want to count the number of pulses. The master clock is running at a fixed 25mhz frequency. The pulses are much slower in the order of khz and do not have even duty cycles. they could be as fast as a few mhz to slow as a few khz.
wire syn_sclk
//you can search web to find "pulse synchronizer" logic
// Or I will come up one later.
psync_cell u_pc(.d(sclk), .clk(fclk), .rstn(rstn), .o(syn_sclk));
reg [15] counter;
always @(posedge fclk or negedge rstn)
if(!rstn) counter <= 0;
else if(syn_sclk) counter <= counter + 1;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.