HDLBits-Modules 题解【Verilog模块例化】(中文翻译+英文原文,可顺带学习英文)

文章介绍了Verilog中模块的概念,模块是通过输入和输出端口交互的电路单元,可以通过组合形成层级结构。重点讲述了如何通过位置连接法和名字连接法将信号连接到模块的端口,强调了即使端口顺序改变,按名称连接仍能保持正确性。并提供了代码示例展示这两种方法。

Moudule

概念介绍

到目前为止,你已经熟悉了一个模块,它是一个通过输入和输出端口与其外部交互的电路。更大、更复杂的电路是通过将较小的模块和其他连接在一起的部分(例如赋值语句和always块)组合而成的更大模块来构建的。因为模块可以包含其他模块的实例,由此形成了一个层级结构。

By now, you’re familiar with a module, which is a circuit that interacts with its outside through input and output ports. Larger, more complex circuits are built by composing bigger modules out of smaller modules and other pieces (such as assign statements and always blocks) connected together. This forms a hierarchy, as modules can contain instances of other modules.

下面这张图展示了一个非常简单的电路及其子模块。在这个练习中,创建一个实例模块mod_a,然后这个模块的三个引脚(in1,in2,和out)连接到你的顶层模块的三个端口(a,b,和out)。这个模块mod_a是给定给你的——你必须实例化它。

The figure below shows a very simple circuit with a sub-module. In this exercise, create one instance of module mod_a, then connect the module’s three pins (in1,

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值