( ESNUG 222 Item 5 ) ---------------------------------------------- [7/21/95]

From: [ Nihongo-Man ]
Subject:  JK Flip-Flop Synthesizes Only With Bad Verilog

Hello John, Please keep this anonymous.

I've a question about synthesizing JK Flip-Flop with Design Compiler.  I
can't synthesize appropriate circuit with following Verilog description.

    module jkff(j, k, q, ck);
    input  j,k,ck;
    output q;
    reg    q;

    always @(posedge ck) begin
    case( {j, k} )
      2'b01:    q = 1'b0;   // Reset
      2'b10:    q = 1'b1;   // Set
      2'b11:    q =   ~q;   // Toggle
      2'b00:    q =    q;   // Hold
    endcase
    end
    endmodule

The result of this can't remove 'X' until Reset Condition.  But deleting Hold
Condition ( 2'b00: q = q ), the result seems good. (?)  I'd like to know what
difference of algorithm whether writing Hold Condition or not, in 'case'
statement.  I'm using synopsys ver3.0c

  - [ Nihongo Man ]



 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)