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

Serial-to-Parallel with Double-Buffered Output

HardLogic CircuitBuild

High-speed serial interfaces like SPI or UART require receiving continuous back-to-back byte streams without data loss. A double-buffered serial-to-parallel converter captures incoming bits in a shift register and transfers the complete byte to a holding register, giving the downstream logic a full eight clock cycles to read the data before it is overwritten.

The circuit receives a continuous serial bitstream on sin. On every clock cycle, sin is shifted into an internal 8-bit shift register. An internal modulo-8 counter tracks the incoming bits. On the 8th bit of every byte, the complete 8-bit word is loaded into an output register driving pout. The output register must hold this value stable for the next 8 clock cycles while the shift register receives the next byte. The rst signal synchronously resets the internal counter and clears all registers to zero.

| Cycle | rst | sin | pout | Description | |-------|-------|-------|--------|-------------| | 0 | 1 | 0 | 0 | Reset all registers | | 1 | 0 | Bit 7 | 0 | Shift in MSB of Byte 1 | | 2-7 | 0 | Bits | 0 | Shift in remaining bits | | 8 | 0 | Bit 0 | 0 | Shift in LSB of Byte 1 | | 9 | 0 | Bit 7 | Byte 1 | pout updates, shift MSB of Byte 2 | | 10-16 | 0 | Bits | Byte 1 | pout holds stable | | 17 | 0 | Bit 7 | Byte 2 | pout updates, shift MSB of Byte 3 |

Constraints

  • Synchronous active-high reset on rst.
  • Output pout must only update exactly every 8 clock cycles after reset.
  • The first received bit must become the most significant bit (MSB) of the 8-bit output.

Topics

Shift Registers

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