카테고리 없음

Exams/m2014 q4b

장영현 2023. 6. 18. 15:33
728x90

Problem Statement

Implement the following circuit:

module top_module (
    input clk,
    input d, 
    input ar,   // asynchronous reset
    output q);
	
    always @(posedge clk or posedge ar) begin
        if(ar)
            q <= 1'b0;
        else
        	q <= d;
    end
    
endmodule

 


asynchronous reset으로 clk과 ar을 비동기적으로 코드를 작성해야 한다.