当前位置:   article > 正文

[HDLBits] Three modules

[HDLBits] Three modules

You are given a module my_dff with two inputs and one output (that implements a D flip-flop). Instantiate three of them, then chain them together to make a shift register of length 3. The clk port needs to be connected to all instances.

The module provided to you is: module my_dff ( input clk, input d, output q );

Note that to make the internal connections, you will need to declare some wires. Be careful about naming your wires and module instances: the names must be unique.

  1. module top_module ( input clk, input d, output q );
  2. wire q1,q2;
  3. my_dff d1(clk,d,q1);
  4. my_dff d2(clk,q1,q2);
  5. my_dff d3(clk,q2,q);
  6. endmodule

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

闽ICP备14008679号