- Debug Daily
- Posts
- (Hard) Constraint Challenge - Various Companies
(Hard) Constraint Challenge - Various Companies
Question of the Day
Good morning!
One of the favorite topics of top companies and startups hiring in design verification is System Verilog constraints. So with that said, here is a difficult problem I came across the other day which has been allegedly asked by companies like Meta and Google.
Question:
Write a constraint where you have a 32 bit value (bit [31:0]) and randomize this value such that every randomization would only allow 2 bits to differ from the previous randomization.
Hint: Do we need to store the previous value somehow or is there an even better way?
Answer: Will be provided in tomorrow’s question of the day post! Have fun and stay curious. 😄
Reply