suffering from contradiction-phobia? The best way to overcome it is by practicing contradictions in a controlled, safe, relaxed environment, away from that critical path.
So, dim the lights, play some soft elevator music, and head over to one of edaplayground solver examples, such as this well written soduko example from http://cluelogic.com/. Make sure it runs first, and then start poking it in a way that will trigger contradictions. Once you have a contradiction, such as the one below, read the error carefully, and make sure you understand any detail the simulator decided was important. Next time you’ll run into a contradiction on the battlefield, you’ll keep your head cool, and perhaps be able to root-cause the issue.
You’ll observe that nowadays errors are in many cases pretty concise and useful. In the simulator I used for pic below first a reduced set of constraints is printed out. Even though these constraints were generated by a single foreach constraint, the simulator is smart enough to give you the exact indices involved. After the constraints come the state variables - this will be any value that participates in the constraints, but isn’t randomized - either because it is outside the randomization scope, or its not even a rand variable. Finally you’ll often see a list of random variables in the order in which the solver tries to solve them. Random variables that must be solved before others will appear first - example might include random list sizes or input to function calls (as in my example). In the log below, these are the ones that have “SOLVED EARLY” next to them. In 90% of the times, just looking at the involved constraints, state variables and solved early variables helps me figure out the problem - either a constraint I’m not expecting to be activated, or a state variable has an unexpected value, or a variable is solved early, which I would expect to be solved with everything else. If you’re using another simulator than the one shown here, you’re likely to find the exact same info stated in a slightly better/worse way. Learn it!
https://lnkd.in/dG_j2jC3
#systemverilog #verification #servingTheNextBug #apple_dv #constraint_solver_tips
SPARK TANK 2024 SECOND RUNNER UP 🥉🏆| TIE GRAD 2024 SEMIFINALIST 🏆| MEMEBER OF INSTITUTES INNOVATION COUNSIL | JAVA | PYTHON | FRONTEND | SQL
2moExcellent works bb b😁😁 😃 😁😁👍😁😃😀. Ob