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

The following table shows pin descriptions for a dual-port RAM with<br />

synchronous read (read through) and two clocks.<br />

IO pins Description<br />

clk1 Positive-Edge Write/Primary Read Clock<br />

clk2 Positive-Edge Dual Read Clock<br />

we Synchronous Write Enable (active High)<br />

add1 Write/Primary Read Address<br />

add2 Dual Read Address<br />

di Data Input<br />

do1 Primary Output Port<br />

do2 Dual Output Port<br />

VHDL<br />

Following is the VHDL code.<br />

library ieee;<br />

use ieee.std_logic_1164.all;<br />

use ieee.std_logic_unsigned.all;<br />

entity raminfr is<br />

port (clk1 : in std_logic;<br />

clk2 : in std_logic;<br />

we : in std_logic;<br />

add1 : in std_logic_vector(4 downto 0);<br />

add2 : in std_logic_vector(4 downto 0);<br />

di : in std_logic_vector(3 downto 0);<br />

do1 : out std_logic_vector(3 downto 0);<br />

do2 : out std_logic_vector(3 downto 0));<br />

end raminfr;<br />

2-156 <strong>Xilinx</strong> Development System

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

Saved successfully!

Ooh no, something went wrong!