1. 문제 및 설명
- assign 문과 combinational always 블록을 모듀 사용하여 AND게이트를 만드세요.

2. 모듈 정의
module top_module(
input a,
input b,
output wire out_assign,
output reg out_alwaysblock
);
3. 답
module top_module(
input a,
input b,
output wire out_assign,
output reg out_alwaysblock
);
assign out_assign = a&b;
always@(*)
begin
out_alwaysblock = a&b;
end
endmodule
'Verilog > HDLbits' 카테고리의 다른 글
| [HDLBits] Always if (0) | 2025.11.23 |
|---|---|
| [HDLBits] Alwaysblock2 (0) | 2025.11.18 |
| [HDLBits] Module addsub (0) | 2025.11.18 |
| [HDLBits] Module cseladd (0) | 2025.11.18 |
| [HDLBits] Module fadd (0) | 2025.11.18 |