Hi, Thanks in advance for your insights and recommendations.
Overview:
I have several tests that I’d like to use to collect coverage on. E.g., let’s say I wanted to collect address coverage to a memory that I randomize in the test.
I intended on creating an address_coverage class. However, the ‘address’ attribute is set in my test, not in that class.
Question:
If using a coverage class, is there a preferred way to pass it the attribute that is to be covered? Some thoughts:
I could copy the value to the class attribute before calling .sample(); this works but…
I was hoping I could pass the attribute in my sample command, like …sample(memory_address) but I don’t see anything suggesting it can be done.
Is there a clever way of using a reference link to assign the class’s attribute to my test attribute so I don’t have to manually every time I sample? E.g., in ‘C’ I could change the address of a variable.
Thanks for your suggestions,
Brian
p.s., I’m familiar with using subscribers to do this with TLM style transactions, but not using them here.
If this address is an interface signal, you can also write a coverage in the interface, which will help no matter which test covers which address space.