Verilog_RTL 설계

[Verilog_RTL]_HALF_ADDER_GATE

juniha 2025. 6. 13. 23:51

Symbol

[그림 1] Half_adder gate


사용 코드

 

1
2
3
4
5
6
7
8
9
10
11
12
 
module half_adder (a, b, sum, cout); 
 
    input  a, b;                      // 입력 비트 a, b (1비트)
    output sum, cout;                // 출력 포트 sum(합), cout(자리올림)
 
    wire   sum, cout;                // 출력 신호를 wire로 선언 
 
    assign sum  = a ^ b;             // sum = a XOR b → 두 입력의 합 계산
    assign cout = a & b;             // cout = a AND b → 자리올림 계산
 
endmodule
cs

 

Schematic

[그림 2] Half_adder_Schematic

 

'Verilog_RTL 설계' 카테고리의 다른 글

[Verilog_RTL]_MUX  (0) 2025.06.14
[Verilog_RTL]_FULL_ADDER_GATE  (0) 2025.06.14
[Verilog_RTL]_NOR_GATE  (0) 2025.06.13
[Verilog_RTL]_OR_GATE  (0) 2025.06.13
[Verilog_RTL]_INVERTER  (0) 2025.06.13