본문 바로가기

Verilog/HDLbits

[HDLBits] Exams/ece241 2013 q7

1. 문제 및 설명

  • JK 플립플롭은 아래와 같은 진리표를 가진다. D 플립플롭과 논리 게이트만을 사용하여 JK 플립플롭을 구현하시오.

 

2. 모듈 정의

module top_module (
    input clk,
    input j,
    input k,
    output Q);

 

 

 

3. 답

module top_module (
    input clk,
    input j,
    input k,
    output Q); 
    
    wire D;
    
    assign D = (j&(!Q))|((!k)&Q);
    
    always@(posedge clk)
        begin
            Q <= D;
        end

endmodule
 

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

[HDLBits] Edgedetect2  (0) 2026.01.01
[HDLBits] Edgedetect  (0) 2026.01.01
[HDLBits] Exams/ece241 2014 q4  (0) 2025.12.31
[HDLBits] Exams/2014 q4a  (0) 2025.12.31
[HDLBits] Mt2015 muxdff  (0) 2025.12.31