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

Overlapping Sequence Detector with Timeout

HardLogic CircuitBuild

Network packet parsers and serial protocol monitors must recover gracefully from dropped connections. Implementing timeout mechanisms directly within a state machine causes state explosion, requiring a decoupled counter architecture.

Construct a sequence detector that identifies the overlapping pattern 1011 on the din input. The state machine must advance only when valid is 1. If valid remains 0 for 15 consecutive clock cycles, the sequence detector must reset to its initial state regardless of previous progress. Assert match to 1 for one cycle immediately when the sequence is completely detected.

Constraints

  • Use a separate 4-bit counter for the timeout logic.
  • Do not implement the timeout as 15 distinct states in the main sequence FSM.
  • Reset the 4-bit counter to 0 synchronously whenever valid is 1.
  • Force the sequence FSM to its initial state when the counter reaches 15.

Topics

sequentialfsmcounters

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

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Hex Nibble to BinaryEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Full Adder from Half AddersEasy
  • Modulo ArithmeticMedium
  • Two's Complement: Encode a Negative DecimalEasy

Browse all problems · Learning tracks