BitFlow

Shift Register (PIPO)

intermediate · sequential · 115 XP

Sign in to write your solution, run it in the simulator and submit it for grading.

Sign in or create a free account →

Problem

Shift Register — PIPO (Parallel-In Parallel-Out) A 4-bit PIPO register. Data is loaded in parallel and available in parallel. This is essentially a **D-type register** — a bank of D flip-flops sharing a clock. **Interface** | Port | Direction | Description | |-----------|-----------|-------------------------------| | `clk` | input | Clock | | `rst` | input | Synchronous reset | | `load` | input | 1=capture input, 0=hold | | `pi[3:0]`| input | Parallel input | | `po[3:0]`| output | Parallel output | **Operation:** - `load=1` on clk↑: `po <= pi` - `load=0` on clk↑: `po` holds - `rst=1` on clk↑: `po <= 0` **Use case:** Pipeline registers, bus latches, output holding registers in CPUs and FPGAs.

Constraints

  • All 4 bits load and output simultaneously.
  • rst > load > hold priority.
  • Use non-blocking assignments (<=).

Examples

Input: load=1, pi=4'hA

Output: po=4'hA on next clk

Input: load=0

Output: po holds

Common questions

What does the Shift Register (PIPO) problem ask you to build?
Shift Register — PIPO (Parallel-In Parallel-Out) A 4-bit PIPO register. Data is loaded in parallel and available in parallel. This is essentially a **D-type register** — a bank of D flip-flops sharing a clock.
What constraints does Shift Register (PIPO) have?
All 4 bits load and output simultaneously.; rst > load > hold priority.; Use non-blocking assignments (<=).
What is an example input and output for Shift Register (PIPO)?
Input load=1, pi=4'hA gives output po=4'hA on next clk.
Which Verilog concepts does Shift Register (PIPO) practise?
sequential, shift-register, PIPO, parallel, register.