CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

SPI Full Duplex Shift Register

HardLogic CircuitBuild

Serial Peripheral Interface (SPI) controllers inherently swap data between master and slave devices in a circular buffer fashion. A single core register handles simultaneous transmission and reception to complete a full-duplex data exchange.

Implement an 8-bit shift register that processes data on the rising edge of clk. When rst is high, the register asynchronously clears to zero. When load is high, the register synchronously loads the 8-bit parallel value data_in. When load is low, the register shifts its contents left by one bit position. During a shift, the incoming bit from MISO is shifted into the least significant bit (LSB). The MOSI output must continuously reflect the current most significant bit (MSB) of the register, and data_out must reflect the full 8-bit parallel state.

Constraints

  • Implement synchronous parallel load and left-shift operations.
  • Implement an asynchronous active-high reset.
  • MOSI must continuously output bit 7 of the current register state.

Topics

SequentialShift RegisterSPICommunication

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks