How to constrain the 2nd dimension of a 2D array in systemverilog

In reply to dave_59:

Hi Dave, please explain C3, is it mem.sum() ? or mem[j].sum() ??


constraint C3{foreach(mem[,j]) mem.sum() with (int'(mem[item.index][j])) != 2 ;}