Report macros

What is the difference between uvm_fatal and uvm_error

In reply to Muthamizh:

uvm_fatal will terminate the test with the print message that is provided with the macro. While uvm_error will continue with the simulation after generating the message along with incrementing the count for the total number of uvm_error detected.

In reply to Muthamizh:

What is the difference between uvm_fatal and uvm_error

fatal and error are 2 different severities. Defining a state as fatal will stop the simulation immediately. error you can configure to tolerate a certain number of errors before stopping the simulation.

In reply to chr_sue:

I got it. Thank you so much

In reply to abdus_k:

thank you so much. i understood now

In reply to Muthamizh:

Typically you use uvm_fatal for unrecoverable problems, like you did not set up the test correctly. uvm_error is for problems yo find with the DUT not behaving correctly.

In reply to dave_59:

Thank you dave. Similarly, I am getting confused with @ and wait. What is the difference between @and wait?

In reply to Muthamizh:

@ is used to hold the process until the particular event(s), which is mentioned in the sensitivity list, is detected. wait is used to hold the process until a condition mentioned in the argument is satisfied.

For ex:


fork
    forever begin
        @(posedge clk) begin
            addr <= intf.addr;
        end
    end
join_none
wait(addr == 32'h1234_5678);

In the above example, the process waits for an event which is a positive edge of the clock to assign the address from the interface signal to a local variable. This thread will run in the background and at every positive edge of the clock, the address will be updated. However, the wait method will hold the process until the address received from the interface matches with 32’h1234_5678.

Hope this illustrates the difference.