system verilog constraint with unique

159 views
Skip to first unread message

RJ Li

unread,
Oct 6, 2016, 9:20:56 PM10/6/16
to EDA Playground
Hi,

I am trying to constraint random value of array to be in a range and also unique, here is what I write:

  constraint c { unique {array};
    foreach (array[i]) array[i] inside{[0:31]};
}

But I got this message:
ERROR VCP2000 "Syntax error. Unexpected token: _UNIQUE."

Does anyone know what is wrong with my constraints?

Thanks

EDA Playground

unread,
Oct 7, 2016, 4:32:43 AM10/7/16
to EDA Playground

Please could you post a link to your playground?

RJ Li

unread,
Oct 7, 2016, 11:07:27 AM10/7/16
to EDA Playground

EDA Playground

unread,
Oct 7, 2016, 12:28:01 PM10/7/16
to EDA Playground

I think you've discovered a tool issue. I think it's OK.

Matthew

RJ Li

unread,
Oct 7, 2016, 5:30:20 PM10/7/16
to EDA Playground
Thank you!
Reply all
Reply to author
Forward
0 new messages