In reply to Rahulkumar:
Here, let me show you the errors from four different compilers on EDA Playground:
QUESTA:
Fatal: (vsim-8541) A fixed-size array transition bin 'd1' is found in Coverpoint 'c1' of Covergroup instance '\/transition_bins/#ublk#243269587#37/c '. It is illegal to have such fixed-szie array transition bin per LRM.
# Time: 0 ns Iteration: 0 Process: /transition_bins/#INITIAL#39 File: design.sv
# Fatal error at design.sv line 8
#
# HDL call sequence:
# Stopped at design.sv 8 - -
# called from design.sv 39 - -
# exit
# End time: 06:44:20 on May 03,2022, Elapsed time: 0:00:01
# Errors: 1, Warnings: 1
ALDEC PRO:
ERROR VCP2000 "Syntax error. Unexpected token: (." "design.sv" 11 50
FAILURE "Compile failure 1 Errors 0 Warnings Analysis time: 0[s]."
Exit code expected: 0, received: 255
CADENCE:
TOOL: xrun 20.09-s003: Started on May 03, 2022 at 06:58:00 EDT
xrun: 20.09-s003: (c) Copyright 1995-2020 Cadence Design Systems, Inc.
bins d1[1] = (9 => 3); //sequence of transitions: even if the user knows there is only 1 bin created, specifying it in the "[]" throws an error. But unlike goto or non-consecutive repetetions, user can define dynamic bins as they're bounded.
|
xmvlog: *E,ECBSTE (design.sv,11|27): System verilog does not allow specifying size with transition bins.
cg c = new;
|
xmvlog: *W,VARCGT (design.sv,38|8): Covergroup instance declaration shall be separated from its creation and moved out of the local scope.
xmvlog: *W,NOTOPL: no top-level unit found, must have recursive instances.
xrun: *E,VLGERR: An error occurred during parsing. Review the log file for errors with the code *E and fix those identified problems to proceed. Exiting with code (status 1).
TOOL: xrun 20.09-s003: Exiting on May 03, 2022 at 06:58:00 EDT (total: 00:00:00)
Exit code expected: 0, received: 1
SYNOPSIS: //though it is isn't throwing any errors, the coverage is 0.0000%
Coverage: 0.0000%
V C S S i m u l a t i o n R e p o r t
Time: 0 ns
CPU Time: 0.520 seconds; Data structure size: 0.0Mb
Tue May 3 06:59:42 2022
Even when I remove the 1 from b1, synopsis is showing coverage 0.0000% for 100 repetetions. Questa is showing around 22%