1

How to make synchronous counter that counts 3,5,7,0 and repeats?

I'm assuming I'll need three T-flip-flops?

4

1 回答 1

-1

嗯,如果以另一种方式处理,您会更简单:两个高位在 0,1,2,3 周围循环,低位是高位的 OR。

类似的东西(伪代码)

wire V[1:0];
wire Out[2:0];
@(posedge clk) {
  V += 1;
  Out[2] <= V[1]; Out[1] <= V[0]; Out[0] <= V[1] | V[0];
}
于 2012-03-24T14:20:15.083 回答