still its showing warning: code was not compiled with coverage options
and at end of sim after merging reports the coverage is proper. I am not getting what the problem is?
The -coverage option enables code coverage statistics to be kept during simulation. To enable code coverage, you need to compile your source code with code coverage enabled. Look at the ‘vlog’ or ‘vcom’ help as appropriate for the +cover option to enable code coverage.
The -coverage option will only affect code coverage, but there are other options which can modify other coverage metrics.