sandeep Posted March 15, 2011 Report Share Posted March 15, 2011 How to get the coverage for the Indirect Register Array, that is not mapped in the Register Model ? If we include the Coverage in the Indirect Register Array, UVM gives an error. Can anyone Help me on this ? Quote Link to comment Share on other sites More sharing options...
janick Posted March 15, 2011 Report Share Posted March 15, 2011 Coverage models are not part of the UVM library. That is a model-generator feature. It is likely a problem that needs to be address by the vendor of the model generator tool. It would also help if you provided more details. It is hard to figure out what your exact problem is when all we have to go on is "UVM gives an error". Quote Link to comment Share on other sites More sharing options...
sandeep Posted March 22, 2011 Author Report Share Posted March 22, 2011 (edited) My question is simply this : I have an indirectly addressed register array (for example the TABLES array in the "primer" UVM example). I need to get an address coverage for this register array. In other words, I need to find out what addresses in the register array have been accessed. Note that this is possible for memory and blocks. But I could not find any example or documentation for indirectly addressed register arrays. Thanks much for any help or pointers. Sandeep Edited March 22, 2011 by sandeep Quote Link to comment Share on other sites More sharing options...
janick Posted March 22, 2011 Report Share Posted March 22, 2011 (edited) The answer is different whether you are a register model generator or a register model user. Since you are from Agnisys, I'll assume you are the former. The address of indirect register is only applicable once it is used to actually access the indirect register array, hence implementing the coverage model in the uvm_reg::sample() method of the index register is not the right location. It has to be implemented in the uvm_reg::sample() method of the data access register. The problem is that the argument to that method is the value read or written, not the index in the array. You will need to obtain the index value from the index register before you cample it into the index coverage model. Assuming you use the uvm_reg_indirect_data class to model the indirect register, you could do something like this (approximate syntax): class my_table extends uvm_reg_indirect_data; ... local uvm_reg_data_t idx_to_cover; covergroup cvr; coverpoint: idx_to_cvr; endgroup function void sample(uvm_reg_data_t data, uvm_reg_data_t byte_en, bit is_read, uvm_reg_map map); idx_to_cover = m_idx.get(); // See note below cvr.sample(); endfunction endclass Note: "m_idx" is currently a local variable in the pre-defined indirect register so that won't work. It should be protected. As a work-around, you can have the configure() method in your extended class save a reference to that index register before calling super.configure(). Hope this helps. P.S> I filed Mantis 3449 on this issue: http://www.eda.org/svdb/view.php?id=3449 Edited March 22, 2011 by janick Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.