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.

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

HDL Coding Techniques<br />

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

D<br />

C<br />

FD<br />

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

edge clock.<br />

IO Pins Description<br />

D Data Input<br />

C Positive Edge Clock<br />

Q Data Output<br />

VHDL Code<br />

Q<br />

X3715<br />

Following is the equivalent VHDL code sample for the flip-flop with<br />

a positive-edge clock.<br />

library ieee;<br />

use ieee.std_logic_1164.all;<br />

entity flop is<br />

port(C, D : in std_logic;<br />

Q : out std_logic);<br />

end flop;<br />

architecture archi of flop is<br />

begin<br />

process (C)<br />

begin<br />

if (C'event and C='1') then<br />

Q

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

Saved successfully!

Ooh no, something went wrong!