본문 바로가기

Verilog/HDLbits

[HDLBits] Wire decl

1. 문제 및 설명

아래 모듈을 만드세요

2. 모듈 정의

module top_module(
    input a,
    input b,
    input c,
    input d,
    output out,
    output out_n   );

 

 

 

3. 답

module top_module(
    input a,
    input b,
    input c,
    input d,
    output out,
    output out_n   ); 
    
    wire x1, x2;
    
    assign x1 = a&b;
    assign x2 = c&d;
    assign out = x1|x2;
    assign out_n = ~out;

endmodule

 

'Verilog > HDLbits' 카테고리의 다른 글

[HDLBits] Vector0  (0) 2025.08.27
[HDLBits] 7458 Chip  (0) 2025.08.27
[HDLBits] Xnorgate  (0) 2025.08.27
[HDLBits] Norgate  (0) 2025.08.27
[HDLBits] AND gate  (0) 2025.06.22