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

Verilog<br />

Following is the Verilog code for instantiation of a MUXF5.<br />

module MUXF5 (O, I0, I1, S);<br />

output 0;<br />

input IO, I1, S;<br />

endmodule<br />

// synthesis attribute BOX_TYPE of MUXF5 is "BLACK_BOX"<br />

module black_b (DI_1, DI_2, SI, DOUT);<br />

input DI_1, DI_2, SI;<br />

output DOUT;<br />

MUXF5 inst (.I0(DI_1), .I1(DI_2), .S(SI), .O(DOUT));<br />

endmodule<br />

Instantiation of MUXF5 with XST Virtex Libraries<br />

Following are VHDL and Verilog examples of an instantiation of a<br />

MUXF5 with XST Virtex Libraries.<br />

VHDL<br />

Following is the VHDL code.<br />

library ieee;<br />

use ieee.std_logic_1164.all;<br />

library unisim;<br />

use unisim.vcomponents.all;<br />

entity black_b is<br />

port(DI_1, DI_2, SI : in std_logic;<br />

DOUT : out std_logic);<br />

end black_b;<br />

architecture archi of black_b is<br />

begin<br />

inst: MUXF5 port map (I0=>DI_1, I1=>DI_2, S=>SI, O=>DOUT);<br />

end archi;<br />

3-30 <strong>Xilinx</strong> Development System

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

Saved successfully!

Ooh no, something went wrong!