Is it possible to create a constraint for variable x, such that f(x) = some_constant?
Here’s a small example:
rand bit [3:0] start_addr;
constraint addr_c { transform(start_addr) == 4; }
function bit [3:0] transform(bit [3:0] s_addr);
transform = s_addr + 1;
endfunction
Note: actual transform function may be more complex. I’d like to know in general whether this is possible.
Thanks!