RTL Studio Open IDE

Shift & Bit Manipulation

16-Bit Bidirectional Shift Register (L/R + Load)

16-bit register with mutually exclusive modes: parallel load, shift left, and shift right.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

16-Bit Bidirectional Shift Register (L/R + Load) is a Verilog reference block in the Shift & Bit Manipulation catalog. Shifters, rotators, bit masks, and bitwise manipulation blocks. Marked Medium: more state or a wider datapath, still one workspace in the IDE.

This OpenIP provides a 16-bit shift register with parallel load capability. It supports synchronous reset and multiple operating modes. The module is implemented in Verilog and verified with Icarus Verilog.

This document describes the 16-bit shift register with parallel load functionality. The module supports synchronous reset and multiple operating modes. Verification confirms correct behavior for all defined test cases.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 16-Bit Bidirectional Shift Register (L/R + Load).
  2. Read the Verilog module in the editor. The catalog line for this block: 16-bit register with mutually exclusive modes: parallel load, shift left, and shift right.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Features

  • 16-bit data width.
  • Synchronous active-low reset.
  • Shift Right mode with serial input at MSB.
  • Shift Left mode with serial input at LSB.
  • Parallel Load mode for immediate data update.
  • Hold mode to maintain current state.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Synchronous reset, active low
mode_shift_rightInput1Enable shift right operation
mode_shift_leftInput1Enable shift left operation
mode_parallel_loadInput1Enable parallel load operation
data_inInput1Serial data input
parallel_data_inInput[15:0]Parallel data input
data_outOutput[15:0]Shift register output

Verification

The testbench covers five key scenarios. Reset initializes the register to zero. Parallel load updates the register with a 16-bit value. Shift right moves bits toward LSB with serial input at MSB. Shift left moves bits toward MSB with serial input at LSB. Hold mode preserves the current register value. All tests passed successfully in simulation.

Test CaseDescriptionResult
TC1Reset to zeroPASS
TC2Parallel load 0xA5A5PASS
TC3Shift right 4 cyclesPASS
TC4Shift left 4 cyclesPASS
TC5Hold statePASS

More in Shift & Bit Manipulation

All Shift & Bit Manipulation blocks