rand_mode vs constraint_mode in SystemVerilog: Freeze a Variable or Drop a Rule
In short: rand_mode() turns one random variable on or off. When it’s off, randomize() leaves that variable’s value alone. constraint_mode() turns one constraint block on or off. When it’s off, the solver ignores that rule. They are independent: freezing a variable does not switch off the constraints that use it, which is why randomize() often…
