SV: "atohex" fails for strings representing more than 32 bits, if bits set above that bit

In reply to mtgavin:

The return type of
atohex()
is integer, which is a 32-bit signed type.

If you need to convert values larger than 32-bits, use $sscanf as the LRM says.

status = $sscanf(hex, "%h", num);