IMPORTANT NOTICE: Please be advised that the Verification Academy Forums will be offline for scheduled maintenance on Sunday, March 23rd at 4:00 US/Pacific.
The question is as follows -
Write a monitor for a scenario of a serial 4 bit wide signal being received from the interface output. The condition is that the payload which we will send from monitor to scoreboard(via Analysis port) will be in the following format -
ABCD______<Payload>______CAFE
Condition is -
Once you receive ABCD continuously from output this will start the payload data to come and will continue till I receive CAFE if 4 nibbles continuously.
Please use signals as you wish for writing the driver run phase.
I have posted the solution below, I wanted to make sure there is nothing wrong w.r.t. to clock cycle sampling i.e. if there is any miss regarding to sampling at wrong timing. Also any additional input you think that may improve this piece of code.