I'm trying to verify a pretty simple handshake between two modules. One module is on a slow clock and raises "req", the faster module should raise "ack" on the next fast clock and hold it until the next slow clock posedge. The end result looks like this:
This is how I wrote the expect:
expect expect_ack_when_req_go is
(@req_rise_e) => @ack_rise_e
else dut_error("ERROR: ack expected to be asserted when req rises!");
*both @req_rise_e and @ack_rise_e are sampled on slow clock.
Running the simulator yields the error as the first expression seems to succeed but the second one does not. This is despite the fact that when tracing events to the wave, I can see both events occur together (as seen in the wave: event_req, event_ack).