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 synchronous set.<br />

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

input C, D, S;<br />

output Q;<br />

reg Q;<br />

always @(posedge C)<br />

begin<br />

if (S)<br />

Q = 1’b1;<br />

else<br />

Q = D;<br />

end<br />

endmodule<br />

Flip-flop with Positive-Edge Clock and Clock Enable<br />

The following figure shows a flip-flop with positive-edge clock and<br />

clock enable.<br />

D<br />

CE<br />

C<br />

FDE<br />

Q<br />

X8361<br />

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

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

Saved successfully!

Ooh no, something went wrong!