title: Constraints for arrays in system verilog
body: <p>Is it valid to use initially generated random elements to constraint consecutive elements of a randomized array. 
  Eg: I want to generate a set of 10 addr, size pairs to mimic a typical memory allocation routine and have a class as follows:</p>
  
  <pre><code>class abc;
    rand bit[5:0] size[8];
    rand bit[5:0] addr[8];
  
    constraint mem_unique{
    foreach(size[i]) begin
      solve size[i] before addr[i];
      size[i] inside {[6'h2:6'h10]};
      if(i&gt;0)
        addr[i] &gt; addr[i-1]+size[i-1];
    end
    }
  endclass:abc
  </code></pre>