I have an import DPI function which uses some global data defined on c side. This import function will be called during report_phase() by multiple uvm components. I want to know if I need to add some code (maybe semaphore) to make sure at any given time, there is only one import DPI function active, i.e., the global data is intact.
According to IEEE 126.96.36.199, only an import DPI task can have reentrancy problem b/c it consumes time and the simulator may switch threads. My understanding is that the report_phase() of multiple uvm components are executed sequentially, even though at the same simulation time. Is this correct?