Menu

#17 JK-Flip-Flop: Preset and Clear-Inputs swapped

open
nobody
None
5
2012-06-18
2012-06-18
No

In the symbol of the JK-Flip-Flop the _P and _C -Inputs seem to be interchanged: Putting _C to low and _P to High, does not Reset the Flip-Flop but sets it. Putting _C to high and _P to low resets the Flip-Flop instead of setting it (see attached image). Putting _C and _P both to high (inactive) works as expected.

Discussion

  • Wolfgang Zukrigl

    Simulation of JK-Flip-Flop

     
  • Wolfgang Zukrigl

    Found the reason:
    In the file /usr/share/tkgate/primitives/jkff.v are the lines

    //
    // Handle preset and clear signals
    //
    always @ (PRE or CLR)
    if (!PRE)
    Qreg = ${JK_BITS}'b0;
    else if (!CLR)
    Qreg = ~${JK_BITS}'b0;

    I think it shoult be ${JK_BITS}'b1 in both cases.

     

Log in to post a comment.

MongoDB Logo MongoDB