본문 바로가기

Verilog/HDLbits

[HDLBits] Dff8r

1. 문제 및 설명

  •   Active High 동기식 리셋을 갖는 8개의 D 플립프롭을 구현하시오.

 

2. 모듈 정의

module top_module (
    input clk,
    input reset,            // Synchronous reset
    input [7:0] d,
    output [7:0] q
);

 

 

 

3. 답

module top_module (
    input clk,
    input reset,            // Synchronous reset
    input [7:0] d,
    output [7:0] q
);
    always@(posedge clk)
        begin
            if(reset)
                q <= 8'b0;
            else
                q <= d;
        end

endmodule
 

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

[HDLBits] Dff8ar  (0) 2025.12.22
[HDLBits] Dff8p  (0) 2025.12.20
[HDLBits] Dff8  (0) 2025.12.20
[HDLBits] Dff  (0) 2025.12.20
[HDLBits] Exams/ece241 2014 q3  (0) 2025.12.20