Codiode

Priority Encoder vs One Hot Leading Zero

HardLogic CircuitAnalyze

Hardware synthesis tools aggressively optimize logic when designers provide explicit input constraints. The schematic shows an 8-bit input A[7:0] feeding a module that outputs a 3-bit binary value Y[2:0] representing the position of the most significant 1. The baseline implementation handles arbitrary binary inputs, acting as a standard priority encoder. A second implementation adds a formal constraint guaranteeing A[7:0] is strictly one-hot. Compare the gate-level implementations of both modules. Determine how the one-hot constraint alters the Boolean expressions for Y[2:0] and evaluate the resulting area reduction.

Constraints

  • Input A is an 8-bit vector.
  • Output Y is a 3-bit vector.
  • Indexing is zero-based from the least significant bit.
  • The unconstrained module assumes any combination of 0s and 1s is possible.

Topics

optimizationpriority-encoderone-hotsynthesis

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.

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.

Part of Finite State Machines

Problem 11 of 24 in the Finite State Machines track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.