Forum Discussion
Altera_Forum
Honored Contributor
11 years agoAt what time would you sample the counter, and using which clock? You could do something like:
reg cnt_q;
always_ff @(posedge clk)
cnt_q <= cnt_q + 31'd1;
reg lsb_q;
always_ff @(negede clk)
lsb_q <= ~lsb_q;
wire counter = {cnt_q, lsb_q};