1. 문제 및 설명
- 100개의 입력을 갖는 조합회로를 만드시오.
- AND
- OR
- XOR
2. 모듈 정의
module top_module(
input [99:0] in,
output out_and,
output out_or,
output out_xor
);
3. 답
module top_module(
input [99:0] in,
output out_and,
output out_or,
output out_xor
);
assign out_and = & in[99:0];
assign out_or = | in[99:0];
assign out_xor = ^ in[99:0];
endmodule
'Verilog > HDLbits' 카테고리의 다른 글
| [HDLBits] Popcount255 (0) | 2025.12.07 |
|---|---|
| [HDLBits] Vector100r (0) | 2025.12.07 |
| [HDLBits] Reduction (0) | 2025.12.07 |
| [HDLBits] Conditional (0) | 2025.12.07 |
| [HDLBits] Always nolatches (1) | 2025.12.07 |