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.

HDL Coding Techniques<br />

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

edge clock and clock enable.<br />

IO Pins Description<br />

D Data Input<br />

C Positive-Edge Clock<br />

CE Clock Enable (active High)<br />

Q Data Output<br />

VHDL Code<br />

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

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

library ieee;<br />

use ieee.std_logic_1164.all;<br />

entity flop is<br />

port(C, D, CE : 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 />

if (CE='1') then<br />

Q

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

Saved successfully!

Ooh no, something went wrong!