|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我在做覆盖率的学习中在一个class里遇到这么两段代码:
(1)
// Transfer collected covergroup
covergroup cov_trans @cov_transaction;
option.per_instance = 1;
trans_start_addr : coverpoint trans_collected.addr {
option.auto_bin_max = 16; }
trans_dir : coverpoint trans_collected.read_write;
trans_size : coverpoint trans_collected.size {
bins sizes[] = {1, 2, 4, 8};
illegal_bins invalid_sizes = default; }
trans_addrXdir : cross trans_start_addr, trans_dir;
trans_dirXsize : cross trans_dir, trans_size;
endgroup : cov_trans
// Transfer collected beat covergroup
(2)
covergroup cov_trans_beat @cov_transaction_beat;
option.per_instance = 1;
beat_addr : coverpoint addr {
option.auto_bin_max = 16; }
beat_dir : coverpoint trans_collected.read_write;
beat_data : coverpoint data {
option.auto_bin_max = 8; }
beat_wait : coverpoint wait_state {
bins waits[] = { [0:9] };
bins others = { [10] }; }
beat_addrXdir : cross beat_addr, beat_dir;
beat_addrXdata : cross beat_addr, beat_data;
endgroup : cov_trans_beat
可是我发现这两段代码基本一样啊,里面有什么具体含义不一样呢,请高手指点啊!?? |
|