How to write functional coverage for FSM (for both State coverage and Transition coverage)

In reply to rohit_kumar:

if you don’t want to rely on the tool FSM coverage and want to define your own FSM coverage. collector , Inside the interface of testbench where you have access low level information.
Define the transition coverage (Arc of the FSM) in cover group inside the interface.