当前位置:   article > 正文

[HDLBits] Sim/circuit10

[HDLBits] Sim/circuit10

This is a sequential circuit. The circuit consists of combinational logic and one bit of memory (i.e., one flip-flop). The output of the flip-flop has been made observable through the output state.

Read the simulation waveforms to determine what the circuit does, then implement it.

2030405060708090100110120130140150

  1. module top_module (
  2. input clk,
  3. input a,
  4. input b,
  5. output q,
  6. output state );
  7. always @(posedge clk)
  8. begin
  9. if (a == b)
  10. state <= a;
  11. else
  12. state <= state;
  13. end
  14. assign q = (a == b) ? state : ~state;
  15. endmodule

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

闽ICP备14008679号