VLSI DV Interview Puzzles · All levels
When solve-before Is Mostly Redundant
Does solve a before b significantly change distribution here? Explain with legal-set and weighting logic.
Puzzle
Difficulty: Medium · Puzzle 6 of 6 · Topic: solve...before Bias Puzzles
Does solve a before b significantly change distribution here? Explain with legal-set and weighting logic.
Code
systemverilog
class sb_redundant;
rand bit a;
rand bit [3:0] b;
constraint c {
a dist {0 := 1, 1 := 1};
(a == 0) -> (b == 0);
(a == 1) -> (b inside {[0:15]});
}
// Variant: solve a before b;
endclassHint
Separate legality from weighting intent.
Step-by-step solution
diagram
1) Legal tuples are still 17 total (same as classic puzzle).
2) Explicit dist already requests balanced a selection (0 and 1 equal weight intent).
3) Adding solve a before b does not change legal tuples and often has limited extra effect because a is already explicitly weighted.
4) Any remaining differences are solver-implementation details, not legality changes.Answer
Answer: Legal set is unchanged (17 tuples), and both variants typically target near 50/50 on a due to explicit dist; solve-before is mostly redundant here.
Why candidates get it wrong
Using solve-before as a substitute for missing dist intent is fragile across tools/seeds.
Interviewer follow-up
If dist on a is removed, how do distributions change between variants?