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

SPI Slave MISO Driver

MediumLogic CircuitBuild

SPI slave devices must present data to the master with sufficient setup time before the sampling edge. By driving the miso line on the falling edge of the oversampled serial clock, the slave ensures the master reads stable data on the subsequent rising edge.

The circuit operates on an implicit fast internal system clock. The external SPI clock sck is oversampled to detect transitions.

  • When rst is 1, the internal 8-bit shift register clears to 0.
  • When load is 1, the shift register loads the 8-bit data_in.
  • When load is 0 and a falling edge is detected on sck, the register shifts left by one bit. A 0 is shifted into the LSB.
  • The output miso continuously reflects the most significant bit (bit 7) of the shift register.

Constraints

  • Use a synchronous active-high reset.
  • Implement an edge detector to find the 1-to-0 transition of sck.
  • Shift data out MSB first.
  • Drive miso combinationally from the MSB of the shift register.

Topics

shift-registercommunicationspiedge-detection

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