Megafunctions

altshift_taps (Shift Register with Taps) Megafunction



Parameterized shift register with taps megafunction. Implements a RAM-based shift register for efficient creation of very large shift registers. Outputs are visible at regularly spaced points along the shift register ("taps").

This topic contains the following information:


AHDL Function Prototype (port name and order also apply to Verilog HDL):

FUNCTION altshift_taps (shiftin[WIDTH-1..0], clock, clken)
   WITH (NUMBER_OF_TAPS, TAP_DISTANCE, WIDTH)
   RETURNS (shiftout[WIDTH-1..0], taps[(WIDTH * NUMBER_OF_TAPS)-1..0]);


VHDL Component Declaration:

COMPONENT altshift_taps
   GENERIC
      (NUMBER_OF_TAPS   :INTEGER := 4;
      TAP_DISTANCE      :INTEGER := 3;
      WIDTH             :INTEGER := 8);

   PORT (shiftin   : IN STD_LOGIC_VECTOR (WIDTH-1 DOWNTO 0);
         clock     : IN STD_LOGIC;
         clken     : IN STD_LOGIC := '1';
         shiftout  : OUT STD_LOGIC_VECTOR (WIDTH-1 DOWNTO 0):=(OTHERS => '0');
         taps      : OUT STD_LOGIC_VECTOR (WIDTH*NUMBER_OF_TAPS)-1 DOWNTO 0):= (OTHERS => '0'));

END COMPONENT;

 

VHDL LIBRARY-USE Declaration

LIBRARY altera_mf;
USE altera_mf.altera_mf_components.all;


Port Descriptions:

INPUT PORTS

Port Name Required Description Comments
shiftin[] Yes Data input to the shifter. Input port WIDTH wide.
clock Yes Positive-edge triggered clock.  
clken No Clock enable for the clock port.  

OUTPUT PORTS

Port Name Required Description Comments
shiftout[] No Output from the end of the shift register. Output port WIDTH wide.
taps[] No Output from the regularly spaced taps along the shift register. Output port WIDTH * NUMBER_OF_TAPS wide. This port is an aggregate of all the regularly spaced taps (each WIDTH bits) along the shift register.


Parameter Descriptions:

Parameter Type Required Comments
NUMBER_OF_TAPS Integer No Specifies the number of regularly spaced taps along the shift register.
TAP_DISTANCE Integer No Specifies the distance between the regularly spaced taps in clock cycles. This number translates to the number of RAM words that will be used.
WIDTH Integer No Specifies the width of the input pattern.


Resource Usage:

The RAM block used to implement the shift register must have TAP_DISTANCE words and NUMBER_OF_TAPS * WIDTH bits per word.


NOTE This topic prints best in Landscape orientation.

Back to Top

- PLDWorld -

 

Created by chm2web html help conversion utility.