[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.

module top_module ( input clk, input d, output q );
    wire q1,q2;
    my_dff d1(clk,d,q1);
    my_dff d2(clk,q1,q2);
    my_dff d3(clk,q2,q);
endmodule

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-13 21:32:05       70 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-13 21:32:05       74 阅读
  3. 在Django里面运行非项目文件

    2024-05-13 21:32:05       62 阅读
  4. Python语言-面向对象

    2024-05-13 21:32:05       72 阅读

热门阅读

  1. 杂记-记一次前端打包问题解决过程

    2024-05-13 21:32:05       26 阅读
  2. python 关键字(in)

    2024-05-13 21:32:05       28 阅读
  3. Buffer

    2024-05-13 21:32:05       33 阅读
  4. 常见请求方法及状态码分析

    2024-05-13 21:32:05       26 阅读
  5. leetcode刷题

    2024-05-13 21:32:05       28 阅读
  6. 字符数组(字符串):单词计数

    2024-05-13 21:32:05       34 阅读
  7. 翻译prompt

    2024-05-13 21:32:05       27 阅读
  8. Vue ref,reactive 响应式引用

    2024-05-13 21:32:05       27 阅读
  9. mediasoup源码(一)编译及部署

    2024-05-13 21:32:05       28 阅读
  10. js 脚本语言

    2024-05-13 21:32:05       23 阅读