tpoikela / uvm-python

UVM 1.2 port to Python
Apache License 2.0
235 stars 45 forks source link

Correct way to clean up UVM objects #36

Open sjalloq opened 3 years ago

sjalloq commented 3 years ago

I've been using the register model I created and having now added more tests to a single file, I noticed I'm getting warnings that more than one uvm_reg_block have been instanced with the same name.

Am I supposed to be cleaning up each test somehow? Is there a particular helper method I should call?

Cheers.

tpoikela commented 3 years ago

Unfortunately the original UVM did not support this kind of use case. It is always one test per simulator run. The issue is that UVM creates a global object of type UVMRoot outside user code, which is needed to execute your UVMTest and create the component hierarchy etc.

This is something that has to be implemented. I have not estimated how much effort this would require. Fixing your issue with uvm_reg_block is part of the solution, and that could be probably fixed with small effort. Is this something that is currently blocking your work?

On Tue, Feb 16, 2021, 23:29 Shareef Jalloq notifications@github.com wrote:

I've been using the register model I created and having now added more tests to a single file, I noticed I'm getting warnings that more than one uvm_reg_block have been instanced with the same name.

Am I supposed to be cleaning up each test somehow? Is there a particular helper method I should call?

Cheers.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tpoikela/uvm-python/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG7SW2CTIGWO2ZFIZZ2Q73S7LPS5ANCNFSM4XXFR33Q .

sjalloq commented 3 years ago

Thanks for the info. No, it's not blocking me as I can simply keep to a single test per file. I just wasn't sure I was using everything correctly.