Semaphore

In reply to anvesh dangeti:

I didn’t think it was possible, but the four commercial simulators on EDAPlayground.com each exhibit a different behavior if the new() argument is negative:

  1. Throws an error and exits.
  2. Throws a warning and sets the value to 0.
  3. Treats the argument as a signed integer and waits for a positive number of keys for the get() to proceed.
  4. Treats the argument as an unsigned integer, which is the results you are seeing: 232-1 keys

I believe 3) matches closest to what the LRM currently specifies, but 1) should probably be made the default behavior. I submitted a clarification request to the IEEE SystemVerilog committee.