05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

XST <strong>User</strong> <strong>Guide</strong><br />

Verilog Code<br />

Following is the equivalent Verilog code for the flip-flop with a<br />

positive-edge clock and clock enable.<br />

module flop (C, D, CE, Q);<br />

input C, D, CE;<br />

output Q;<br />

reg Q;<br />

always @(posedge C)<br />

begin<br />

if (CE)<br />

Q = D;<br />

end<br />

endmodule<br />

4-bit Register with Positive-Edge Clock,<br />

Asynchronous Set and Clock Enable<br />

The following figure shows a 4-bit register with positive-edge clock,<br />

asynchronous set and clock enable.<br />

PRE<br />

D<br />

CE<br />

C<br />

FDPE<br />

Q<br />

X3721<br />

The following table shows pin definitions for a 4-bit register with<br />

positive-edge clock, asynchronous set and clock enable.<br />

IO Pins Description<br />

D[3:0] Data Input<br />

C Positive-Edge Clock<br />

PRE Asynchronous Set (active High)<br />

2-22 <strong>Xilinx</strong> Development System

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

Saved successfully!

Ooh no, something went wrong!