In reply to bhimac:
This code is not legal and should have been caught as an error. You’ve declared len as a static variable and it would only get initialized once before time 0.
See function arguments not initializing variable inside the body | Verification Academy