Count cycles on which event_valid is high. Clear the count on reset. The
external reset can arrive asynchronously and must clear promptly, but release
from reset must be clock-aligned throughout the design so no counter bit sees a
raw asynchronous deassertion. Avoid library-specific attributes or cells.
Write the complete module to /app/design.sv. Do not create or modify other files.