05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

HDL Coding Techniques<br />

Verilog Code<br />

Following is the equivalent Verilog code for a latch with a positive<br />

gate.<br />

module latch (G, D, Q);<br />

input G, D;<br />

output Q;<br />

reg Q;<br />

always @(G or D)<br />

begin<br />

if (G)<br />

Q = D;<br />

end<br />

endmodule<br />

Latch with Positive Gate and Asynchronous Clear<br />

The following figure shows a latch with positive gate and<br />

asynchronous clear.<br />

D<br />

G<br />

CLR<br />

LDC<br />

X4070<br />

Q<br />

The following table shows pin definitions for a latch with positive<br />

gate and asynchronous clear.<br />

IO Pins Description<br />

D Data Input<br />

G Positive Gate<br />

CLR Asynchronous Clear (active High)<br />

Q Data Output<br />

XST <strong>User</strong> <strong>Guide</strong> 2-27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!