This problem is similar to the previous one (module). You are given a module named mod_a that has 2 outputs and 4 inputs, in that order. You must connect the 6 ports by position to your top-level module's ports out1, out2, a, b, c, and d, in that order.
You are given the following module:
module mod_a ( output, output, input, input, input, input );

此问题与上一个问题(模块)类似。您将得到一个名为mod_a的模块,该模块按顺序有2个输出和4个输入。您必须按位置将6个端口按顺序连接到顶级模块的端口out1、out2、a、b、c和d。
您将获得以下模块:模块mod_a(输出,输出,输入,输入,输出);
很简单,实际上就是更多的连线而已
但这里因为没给mod_a内的每个信号的名字,所以必须要提另一个例化模块接线的方法
mod_a instance1(wa,wb,wc);
这个会按照mod_a内部的信号的顺序直接接线,算是一种偷懒的方式,但我不是很喜欢用,容易出错,不过在信号特别多的时候用起来确实很方便
module top_module (
input a,
input b,
input c,
input d,
output out1,
output out2
);
mod_a mod_a_1(out1,out2,a,b,c,d);
endmodule

文章描述了一个电子设计自动化(EDA)中的问题,涉及VHDL或Verilog硬件描述语言。给定一个名为mod_a的模块,它有两个输出和四个输入,需要将其正确连接到顶级模块top_module的相应端口。尽管可以直接通过实例化模块进行接线,但作者提到这种方法可能有误,更倾向于明确指定每个信号的连接方式。

被折叠的 条评论
为什么被折叠?



