Jump to content
debdip

functional coverage for AXI4 WREADY signal

Recommended Posts

For AXI write transaction axi wready signal determines whether the slave can accept the data.
For write burst performance i need to capture the latency between "WREADY" and "next WREADY" signal.
For example this ready signal is getting low at clockno 8 and it should remain low for clockno 9 and 10 and the clockno 11 the signal will be high as per the slave configuration. when the multiple burst transacion occurs with (write length > 2) the ready signal behavior will be like above. I want to write a functional coverage like "wready" and next "wready" signal latency is 2 which means when the ready signal is low it will low for 2 clk cycles and then ready will high(if there are multiple write burst transaction).

Share this post


Link to post
Share on other sites

You can write assertion property that generates events when it detect how long WREADY is asserted and the specific conditions under which it occurs. By means of a simple function call you can then notify the monitor of the data (# cycles) and capture the information to be passed on to a coverage collector. Doulos demonstrate something very like this (measuring Reset pulse widths) in their UVM training.

Share this post


Link to post
Share on other sites

Hello,

 

I am trying to code a covergroup which looks at bins having a range between base addr and final addr.

I have a function which calculates the range of address which i want to use in my covergroup.

Basically i want to do this

memory_range : coverpoint range {bins addr[] = {[base_addr, final_addr]};}

which will be dependant on the size of the memory for which i have defined a function. The size and base_addr are read from registers inside the function.

function void calc();

bit [3:0] size;

register read to get size;
register read to get base_addr;
case(size)
4’b0000: begin
Max_addr = ‘h10000;
Final_addr= base_addr+max_addr;
covergroup.sample();
end

4’b0001: …….

endfunction

Presently when i execute this, i see only one bin getting created. The range is not taking effect.

Can anyone please suggest on how I can access the base addr and final addr from the function in my covergroup?

Share this post


Link to post
Share on other sites

An example from LRM may help you out (just a suggestion):

 
Generic coverage groups can be written by passing their traits as arguments to the constructor. For example:
covergroup cg (ref int ra, input int low, int high ) @(posedge clk);
coverpoint ra // sample variable passed by reference
   {
     bins good = { [low : high] };
     bins bad[] = default;
   }
endgroup
...
int va, vb;
cg c1 = new( va, 0, 50 ); // cover variable va in the range 0 to 50
cg c2 = new( vb, 120, 600 ); // cover variable vb in the range 120 to 600

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×