aboutsummaryrefslogtreecommitdiffstats
path: root/tests/xilinx_ug901/latches.v
blob: 09d0f9f73a8e2382387e5763231ad91d2266d5a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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