05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

library IEEE;<br />

use IEEE.std_logic_1164.all;<br />

use IEEE.std_logic_unsigned.all;<br />

HDL Coding Techniques<br />

entity shiftregluts is<br />

port(CLK : in std_logic;<br />

DATA : in std_logic;<br />

CE : in std_logic;<br />

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

Q : out std_logic);<br />

end shiftregluts;<br />

architecture rtl of shiftregluts is<br />

constant DEPTH_WIDTH : integer := 16;<br />

type SRL_ARRAY is array (0 to DEPTH_WIDTH-1) of<br />

std_logic;<br />

-- The type SRL_ARRAY can be array<br />

-- (0 to DEPTH_WIDTH-1) of<br />

-- std_logic_vector(BUS_WIDTH downto 0)<br />

-- or array (DEPTH_WIDTH-1 downto 0) of<br />

-- std_logic_vector(BUS_WIDTH downto 0)<br />

-- (the subtype is forward (see below))<br />

signal SRL_SIG : SRL_ARRAY;<br />

begin<br />

PROC_SRL16 : process (CLK)<br />

begin<br />

if (CLK'event and CLK = '1') then<br />

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

SRL_SIG

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

Saved successfully!

Ooh no, something went wrong!