在sv随机过程中,利用断言使随机失败时结束仿真:
assert(reg_cfg_seq.randomize() with {
foreach(data_q) {
data_q == default_data_q;
}
foreach(check_en_q[i]) {
check_en_q[i] == 0;
}
}) else `uvm_fatal(get_type_name(),"reg_cfg_seq randomize failed...")