Assuming 1b input A is generated by a random sequence, 1b input B is a delayed version of A. The delay value varies, and can be [1, 10] (inclusive).

Design a circuit, that takes A and B as inputs, and Y as output. If B is guaranteed to have 1s, then Y should be 1.

Obviously, “cnt” should be [0, 10]. If “cnt” > 10, then B is delayed for more than 10 cycles, and this is considered to be a spec violation. Designers should consider to have an SVA for this case.

If “cnt” < 0, then B is not a delayed version of A. This can happen when B sees a 1 but A never sees a 1. Designers should consider to write an SVA to detect the spec violation. In addition, “cnt” should be extended from 4b to 5b, and the MSB of “cnt” is for the sign extension.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.