How to synchronise between a module and class?

Hi,

I have verilog based testbench top with an initial block with stimulus and has $finish after the test is done. I am trying to integrate an UVM unit environment with this verilog tb. I created module tb_top, which has run_test(), an env, a test, which raises objection, but before dropping objection I would like to know that verilog activity has been done. Similarly, after dropping the objection, I would like send back information to verilog tb to run $finish. I used an interface with an event and placed inside the config_db, however, my simulation hangs as the uvm test waits for the event (blocking). I even used wait(my_event.triggered).

Not sure what is happening? Is there a better way of communicating between verilog testbench and class based testbench?

Does anyone have an idea how to achieve this?

Thanks,
Madhu

In reply to mseyunni:

There is no common answer to your question. It depends on the structure of your TB.
BTW what are you doing with your Verilog TB while having a UVM Environment?
And what is the UVM Environment doing in this strange combination?

In reply to chr_sue:

Yes. It is a strange combination. I have a verilog based top level tb, in which I would like to use uvm based environment for passive use.

In reply to mseyunni:

Then you have to consider the Verilog TB to be the master, Controlling anything and the UVM part is the dependend part. Where is the problem?

In reply to mseyunni:

You do not need any interface Definition using the Event. Declare them simply in a package.
Did you try for one of the wait the non-blocking event (->>)?

In reply to chr_sue:

Hmm.I can try putting in a package.
But, not sure non-blocking event is the one I want as I want the processes to block and then progress.

In reply to mseyunni:

In reply to chr_sue:
Yes. It is a strange combination. I have a verilog based top level tb, in which I would like to use uvm based environment for passive use.

class can b used only in UVM not in verilog,
and uvm have facilty that within a module we can have class

In reply to preeti laxmi:

How does your Verilog toplevel TB look like? Can this be consiered as SV?