Commentary (#3351)

This commit is contained in:
Wilson Snyder 2022-03-14 09:10:03 -04:00
parent 47226236f4
commit c61258c0d0

View File

@ -257,7 +257,9 @@ with respect to that top level module, then the scope could be set with
#include "svdpi.h"
...
svSetScope(svGetScopeFromName("TOP.dut"));
const svScope scope = svGetScopeFromName("TOP.dut");
assert(scope); // Check for nullptr if scope not found
svSetScope(scope);
(Remember that Verilator adds a "TOP" to the top of the module hierarchy.)