Coverage from sequence

How can we get coverage of generated data? means from sequence. But if we directly get it by declaring analysis port in sequence then the sequence will be dependent and thats not preferable. So is thre any other way to do that? what about sequencer, means can we cover it from sequencer? But dont know how? and is it write thing?

In reply to Ravina:

Coverage of generated data is meaningless. Just because you generated a sequence item doesn’t mean that it was processed correctly by the DUT.

Instead, you should collect coverage on the sequence items that the DUT processes, which is why monitors are connected to coverage components.

In reply to cgales:

But just to keep track of data i want to cover generated data and also i am doing coverge from driver and monitor also . So plz help me to cover generated data. Is there any way?

In reply to Ravina:

Ideally this type of coverage is not recommended ,but if you want to have a coverage for this ,then I fell best place is to have it in driver where you are doing get_next_item().
Also you cannot do it from sequence (sequences cannot have ports ) , only components can have ports declaration .

What you can do is , create a port in driver and when you get the item from sequencer write to that port , which will be connected to your coverage class .
**
Driver code run_phase()**
get_next_item(req);
clone req
port.write(req).

Coverage code :write_function
local_variables = tr.*(varialbes)
covergroup.sample();