1. 문제 및 설명
- 모듈의 계층 구조는 한 모듈안에서 다른 모듈을 인스턴스화 함으로써 만들어집니다.
- top_module에서 mod_a를 인스턴스화 하여 사용하세요

2. 모듈 정의
module top_module (
input a,
input b,
input c,
input d,
output out1,
output out2
);
3. 답
module top_module (
input a,
input b,
input c,
input d,
output out1,
output out2
);
mod_a i0 (.out1(out1), .out2(out2), .in1(a), .in2(b), .in3(c), .in4(d));
endmodule
'Verilog > HDLbits' 카테고리의 다른 글
| [HDLBits] Module shift8 (0) | 2025.11.02 |
|---|---|
| [HDLBits] Module shift (0) | 2025.11.02 |
| [HDLBits] Module pos (0) | 2025.11.02 |
| [HDLBits] Module (0) | 2025.11.02 |
| [HDLBits] Vector5 (0) | 2025.11.02 |