Primitive: 32-Bit Shift Register Look-Up Table (LUT)
- PRIMITIVE_GROUP: CLB
- PRIMITIVE_SUBGROUP: SRL
Introduction
This design element is a shift register look-up table (LUT). The inputs A4, A3, A2, A1, and A0 select the depth of the shift register.
The shift register can be of a fixed, static depth or it can be dynamically adjusted.
To create a fixed-depth shift register: Drive the A4 through A0 inputs with static values. The depth of the shift register can vary from 1-bit to 32-bits, as determined by the following formula:
Depth = (16 * A4) + (8 * A3) + (4 * A2) + (2 * A1) + A0 + 1
If A4, A3, A2, A1, and A0 are all zeros (00000), the shift register is one bit deep. If they are all ones (11111), it is 32-bits deep.
To change the depth of the shift register dynamically: Change the values driving the A4 through A0 inputs. For example, if A3, A2, A1, and A0 are all ones (1111) and A4 toggles between a one (1) and a zero (0), the depth of the shift register changes from 32-bits to 16-bits. Internally, the depth of the shift register is always 32-bits and the input lines A4 through A0 select which of the 32-bits reach the output. The shift register LUT contents are initialized by assigning an eight-digit hexadecimal number to an INIT attribute. The first, or the left-most, hexadecimal digit is the most significant bit. If an INIT value is not specified, it defaults to a value of eight zeros (00000000) so that the shift register LUT is cleared during configuration.
When CE is High, the data (D) is loaded into the first bit of the shift register during the clock (CLK) transition. During subsequent clock transitions, when CE is High, data shifts to the next highest bit position as new data is loaded. The data appears on the Q output when the shift register length determined by the address inputs is reached. When CE is Low, the register ignores clock transitions and retains current data within the shift register.
Port Descriptions
Port | Direction | Width | Function |
---|---|---|---|
A<4:0> | Input | 5 | The value placed on the A0 - A3 inputs specifies the shift register depth. Depth = (16 * A4) + (8 * A3) + (4 * A2) + (2 * A1) + A0 + 1 |
CE | Input | 1 | Active-High clock enable. |
CLK | Input | 1 | Shift register clock. Polarity is determined by the IS_CLK_INVERTED attribute. |
D | Input | 1 | SRL data input. |
Q | Output | 1 | SRL data output. |
Q31 | Output | 1 | SRL data output used to connect more than one SRLC32E component to form deeper than 32-bit shift registers. |
Design Entry Method
Instantiation | Yes |
Inference | Recommended |
IP and IP Integrator Catalog | No |
Available Attributes
Attribute | Type | Allowed Values | Default | Description |
---|---|---|---|---|
INIT | HEX | Any 32-bit HEX value | All zeroes | Specifies the initial contents in the shift register upon completion of configuration. |
IS_CLK_INVERTED | BINARY | 1'b0 to 1'b1 | 1'b0 | Specifies whether or not to use the optional inversion on the clock pin (CLK) of this component. When set to 1 the active edge of the clock is the falling edge. If an external inverter is connected to this pin, the Vivado Design Suite will automatically set this attribute during the opt_design stage so that additional logic is not necessary for changing the clock polarity. |
VHDL Instantiation Template
Library UNISIM;
use UNISIM.vcomponents.all;
-- SRLC32E: 32-Bit Shift Register Look-Up Table (LUT)
-- Versal Prime series
-- Xilinx HDL Language Template, version 2021.1
SRLC32E_inst : SRLC32E
generic map (
INIT => X"00000000", -- Initial contents of shift register
IS_CLK_INVERTED => '0' -- Optional inversion for CLK
)
port map (
Q => Q, -- 1-bit output: SRL Data
Q31 => Q31, -- 1-bit output: SRL Cascade Data
A => A, -- 5-bit input: Selects SRL depth
CE => CE, -- 1-bit input: Clock enable
CLK => CLK, -- 1-bit input: Clock
D => D -- 1-bit input: SRL Data
);
-- End of SRLC32E_inst instantiation
Verilog Instantiation Template
// SRLC32E: 32-Bit Shift Register Look-Up Table (LUT)
// Versal Prime series
// Xilinx HDL Language Template, version 2021.1
SRLC32E #(
.INIT(32'h00000000), // Initial contents of shift register
.IS_CLK_INVERTED(1'b0) // Optional inversion for CLK
)
SRLC32E_inst (
.Q(Q), // 1-bit output: SRL Data
.Q31(Q31), // 1-bit output: SRL Cascade Data
.A(A), // 5-bit input: Selects SRL depth
.CE(CE), // 1-bit input: Clock enable
.CLK(CLK), // 1-bit input: Clock
.D(D) // 1-bit input: SRL Data
);
// End of SRLC32E_inst instantiation
Related Information
- Versal ACAP Configurable Logic Block Architecture Manual (AM005)