Exams/m2014 q4c

2023. 6. 18. 15:42FPGA/HDLBits

728x90

Problem Statement

Implement the following circuit:

 

module top_module (
    input clk,
    input d, 
    input r,   // synchronous reset
    output q);

    always @(posedge clk)begin
        if(r)
            q <= 1'b0;
        else
 	       q <= d;
    end
    
endmodule

 


clk이 상승엣지일 시 동작이 작동해야한다. (synchronous reset이기 때문)

'FPGA > HDLBits' 카테고리의 다른 글

Bugs nand3  (0) 2023.06.18
Exams/m2014 q4d  (0) 2023.06.18
Exams/m2014 q4a  (0) 2023.06.18
Dff16e  (0) 2023.06.18
Bugs mux2  (0) 2023.06.15