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.

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

Verilog Code<br />

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

negative-edge clock and asynchronous clear.<br />

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

input C, D, CLR;<br />

output Q;<br />

reg Q;<br />

always @(negedge C or posedge CLR)<br />

begin<br />

if (CLR)<br />

Q = 1’b0;<br />

else<br />

Q = D;<br />

end<br />

endmodule<br />

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

Set<br />

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

synchronous set.<br />

S<br />

D<br />

C<br />

FDS<br />

Q<br />

X3722<br />

The following table shows pin definitions for a flip-flop with positive<br />

edge clock and synchronous set.<br />

IO Pins Description<br />

D Data Input<br />

C Positive-Edge Clock<br />

S Synchronous Set (active High)<br />

Q Data Output<br />

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

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

Saved successfully!

Ooh no, something went wrong!