I'm beginner in System Verilog. I want to implement a coverage such that a user will send a signal - lets call it input_signal[Width-1 :0] Where width is variable. I want to have bitwise toggle coverage for this signal over the simulation.
I can able to do it for single bit signal.
coverpoint input_signal {
bins toggle1 (0=>1);
bins toggle2 (1=>0);}
How can I extend it to incorporate multibit signal?
There is usually no need to write covergroups to collect toggle coverage--most tools can do this for you as part of code coverage.
Otherwise you can declare your covergroup
for a single bit, then construct an instance for each bit.