Jump to content

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).

Link to comment
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.

Link to comment
Share on other sites

  • 3 months later...

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?

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...