这一部分主要介绍模块例化部分的内容
例如有一个模块:
module mod_a ( input in1, input in2, output out );
// Module body
endmodule
现在要在顶层模块(top_module)中实例化这个部分
具体做法:
模块名 例化后的的模块名(.模块的信号名(top中与模块连接的信号的名字),
.模块的信号名(top中与模块连接的信号的名字),
.模块的信号名(top中与模块连接的信号的名字)
);
例如:
mod_a instance1(.out(wc),
.in1(wa),
.in2(wb)
);
所以这个题目的做法也很简单
In this exercise, create one instance of module mod_a, then connect the module's three pins (in1, in2, and out) to your top-level module's three ports (wires a, b, and out). The module mod_a is provided for you — you must instantiate it.
在本练习中,创建模块mod_a的一个实例,然后将模块的三个引脚(in1、in2和out)连接到顶级模块的三条端口(导线a、b和out)。
module top_module ( input a, input b, output out );
mod_a mod_a_1(
.in1(a),
.in2(b),
.out(out)
);
endmodule