title: write a verilog for D FF
body: <p><a href="https://i.stack.imgur.com/7QEUq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7QEUq.png" alt="enter image description here"></a></p>
  
  <p>I want to write a behavioral verilog code for a FF with the following characteristics as shown in the picture. </p>
  
  <pre><code>module DFF ( D, CK, RN, Q );
  input  D, CK, RN;
  output reg Q;
  
  always @ (posedge CK)
  begin
  if ( RN==1'b0 )
    Q &lt;= RN ; 
  if ( RN==1'b1 )
       Q &lt;= D ;
  if RN 
  </code></pre>
  
  <p>I DONT KNOW WHAT TO WRITE HERE</p>
  
  <pre><code>end
  
      );
  endmodule
  </code></pre>