Your IP : 216.73.217.152


Current Path : /proc/thread-self/root/opt/alt/python37/share/doc/alt-python37-pyparsing-doc/examples/verilog/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python37/share/doc/alt-python37-pyparsing-doc/examples/verilog/ff.v

module ff (clk, D, E, R_, Q, Q_) ; 
  input clk ; 
  input D ; 
  input E ; 
  input R_ ; 
  output Q ; 
  output Q_ ; 
  reg Q ; 
  initial begin 
    Q = 0 ; 
  end 

  assign Q_ = ~Q ; 

  always @( R_ ) if( R_ === 0 ) #1 Q = 0 ; 

  always @(posedge clk) if (R_ !== 0 && E === 1 ) #1 Q = D ; 

endmodule