1. I need a counter that counts no.of write completions but when write transaction is going to happen we need to check the grant signal.
note: the condition is like this, if grant signal is high for one clock cycle then you can only send one write transaction similarly if grant signal is high for (assume 5 clk cylces) then you can able to send 5 write transactions.
so before sending the packet I need to check for grant signal not equal to zero and the counter should for how many clk cycles the grant signal is high. can anyone give an idea?