当前位置:   article > 正文

[HDLBits] Sim/circuit9

[HDLBits] Sim/circuit9

This is a sequential circuit. Read the simulation waveforms to determine what the circuit does, then implement it.

2030405060708090100110120130140150160170180190200210clkaq4560123456014560

  1. module top_module (
  2. input clk,
  3. input a,
  4. output [3:0] q );
  5. always@(posedge clk)begin
  6. if(a)
  7. q <= 'd4;
  8. else if(q == 6)
  9. q <= 4'b0;
  10. else
  11. q <= q + 1;
  12. end
  13. endmodule

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/529055
推荐阅读
相关标签
  

闽ICP备14008679号