1. 문제 및 설명
- 아래 회로를 구현하시오, 기계가 동작하기 전에 DFF는 모두 0으로 리셋되어 있다고 가정한다.

2. 모듈 정의
module top_module (
input clk,
input x,
output z
);
3. 답
module top_module (
input clk,
input x,
output z
);
wire D0, D1, D2;
wire Q0, Q1, Q2;
assign D0 = x^Q0;
assign D1 = x&(!Q1);
assign D2 = x|(!Q2);
assign z = !(Q0|Q1|Q2);
always@(posedge clk)
begin
Q0 <= D0;
Q1 <= D1;
Q2 <= D2;
end
endmodule'Verilog > HDLbits' 카테고리의 다른 글
| [HDLBits] Edgedetect (0) | 2026.01.01 |
|---|---|
| [HDLBits] Exams/ece241 2013 q7 (0) | 2026.01.01 |
| [HDLBits] Exams/2014 q4a (0) | 2025.12.31 |
| [HDLBits] Mt2015 muxdff (0) | 2025.12.31 |
| [HDLBits] Exams/m2014 q4d (0) | 2025.12.31 |