How to verify FSM for Pattern detection

Hi Dave,
Thanks for the quick response.
I meant the pattern 10110110 will give pattern_detected = 1;
If I randomize rand bit [7:0] without constraints, I may never
get a pattern like 10110110 or it rarely occurs.

In your solution mode dist {1:66, 0:33} means 1 occurs 66% and 0 occurs 33%

What does mode → pattern == 8’b10110110 mean ?

Thanks
JeffD