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 />

Example 6-21 8 bit Counter Description Using a Process with a<br />

Sensitivity List<br />

library ASYL;<br />

use ASYL.PKG_ARITH.all;<br />

entity EXAMPLE is<br />

port (CLK : in BIT;<br />

RST : in BIT;<br />

DO : out BIT_VECTOR (7 downto 0) );<br />

end EXAMPLE;<br />

architecture ARCHI of EXAMPLE is<br />

begin<br />

process (CLK, RST)<br />

variable COUNT : BIT_VECTOR (7 downto 0);<br />

begin<br />

if RST = '1' then<br />

COUNT := "00000000";<br />

elsif CLK'EVENT and CLK = '1' then<br />

COUNT := COUNT + "00000001";<br />

end if;<br />

DO

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

Saved successfully!

Ooh no, something went wrong!