Latch With Positive Gate and Asynchronous Reset Coding Example (Verilog) - Latch With Positive Gate and Asynchronous Reset Coding Example (Verilog) - 2022.2 English - UG901

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2022-11-16
Version
2022.2 English

Filename: latches.v

// Latch with Positive Gate and Asynchronous Reset

// File: latches.v

module latches (

input G,

input D,

input CLR,

output reg Q

);

always @ *

begin

if(CLR)

Q = 0;

else if(G)

Q = D;

end

endmodule