Assertion to calculate ON and OFF period of signal based on the configuration

Thanks Ben,
using of function worked. I have done few changes in my code and assertions are triggered at correct point as per my requirement.