I am attempting to create a test scenario reflecting a state transition diagram. In my case, there is no single defined path from start to end and there are almost 30+ unique paths that could be generated from the state transition diagram. So I assumed that randsequence would help me out in this situation and implemented the same within the base test (derived from UVM base test).
Below is a shortened illustration similar to my code,
task run_phase();
//
//
randsequence(main)
main: A
A : execute_A B;
B : execute_B C;
C : execute_C D|E;
D : execute_D A;
E : execute_E F;
F : execute_F;
// execute_* are all terminals that contain just display statements for now
// execute_F contains the break statement to exit out of the randsequence
endsequence
endtask
One of the generated output that contradicts my expectation is,
A B D …
Question: In B, I expected execute_B and C to get executed in that order always. But I see it does not happen at times, and the execution seems to land upon an unexpected state transition.
Please clarify.
Thanks,
Manju