covergroup CovPort;
options.auto_bin_max = 8; //所有的coverpoint auto_bin数量是8
coverpoint tr.port
{ option.auto_bin_max = 2} //特定的covepoint auto_bin数量2
endgroup
covergroup CovKind;
coverpoint tr.kind{
bins zero = {0}; //1个仓代表kind==0
bins lo = {[1:3] , 5}; //1个仓代表1:3和5
bins hi[] = {[8:$]}; //8个独立的仓代表8:15
bins misc = default; //1个仓代表剩余所有值
} //没有分号
endgroup
注意coverpoint定义使用{ }而不是begin...end大括号结尾没带分号,和end一样。