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

VHDL Code<br />

Following is the VHDL code for a 3-to-1 1-bit MUX with a 1-bit latch.<br />

library ieee;<br />

use ieee.std_logic_1164.all;<br />

entity mux is<br />

port (a, b, c, d : in std_logic;<br />

s : in std_logic_vector (1 downto 0);<br />

o : out std_logic);<br />

end mux;<br />

architecture archi of mux is<br />

begin<br />

process (a, b, c, d, s)<br />

begin<br />

if (s = "00") then o

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

Saved successfully!

Ooh no, something went wrong!