VLSI DV Interview Puzzles · All levels

Constraint Solving Order Puzzles

Count legal tuples first, then reason about bias: implication and if/else are declarative relations solved together, and branch cardinality drives observed probabilities.

About this puzzle set

Count legal tuples first, then reason about bias: implication and if/else are declarative relations solved together, and branch cardinality drives observed probabilities.

Puzzles in this topic

diagram
1. Implication vs Partitioned Branches  [Medium]
2. Bidirectional Solving of x+y==10  [Easy]
3. if-else with Overlap on One Value  [Medium]
4. Three-Variable Implication Chain  [Hard]
5. Relational Pair Counting  [Medium]
6. Array Size Coupled to Content  [Hard]

Work each puzzle before reading the solution: predict the exact output or answer, name the rule that governs it, then check yourself.

Constraint solve order and dependency flow

diagram
CONSTRAINT SOLVE ORDER

rand bit [3:0] burst_len;
rand bit [7:0] addr;

constraints:
  burst_len inside {[1:8]};
  addr % burst_len == 0;
  solve burst_len before addr;

solver picks burst_len first
            then chooses addr satisfying alignment

Explicit solve order reduces ambiguity in interview puzzles.

Related topics