1. 문제 및 설명
입력된 하프워드(16비트, [15:0])를 하위 바이트([7:0])와 상위 바이트([15:8])로 분리하는 조합 논리 회로를 설계하세요.
2. 모듈 정의
module top_module(
input wire [15:0] in,
output wire [7:0] out_hi,
output wire [7:0] out_lo );
3. 답
`default_nettype none // Disable implicit nets. Reduces some types of bugs.
module top_module(
input wire [15:0] in,
output wire [7:0] out_hi,
output wire [7:0] out_lo );
assign {out_hi, out_lo} = in;
endmodule
'Verilog > HDLbits' 카테고리의 다른 글
| [HDLBits] Vectorgates (0) | 2025.08.27 |
|---|---|
| [HDLBits] Vector2 (0) | 2025.08.27 |
| [HDLBits] Vector0 (0) | 2025.08.27 |
| [HDLBits] 7458 Chip (0) | 2025.08.27 |
| [HDLBits] Wire decl (0) | 2025.08.27 |