Support multi-thread hierarchical simulation (#2583) (#5871)

This commit is contained in:
Bartłomiej Chmiel
2025-03-24 18:39:29 -04:00
committed by GitHub
parent 7521c2c644
commit fabded95df
22 changed files with 505 additions and 142 deletions
+10
View File
@@ -18,6 +18,7 @@
#include "V3ProtectLib.h"
#include "V3Config.h"
#include "V3Hasher.h"
#include "V3InstrCount.h"
#include "V3String.h"
@@ -119,8 +120,17 @@ class ProtectVisitor final : public VNVisitor {
// Mark remaining NDA protectlib wrapper DPIs as non-hazardous by deliberately forwarding
// them with non-zero cost.
// Also, specify hierarchical workers for those tasks for scheduling.
txtp->addText(fl, "profile_data -hier-dpi \"" + m_libName
+ "_protectlib_combo_ignore\" -cost 64'd1\n");
txtp->addText(fl, "hier_workers -hier-dpi \"" + m_libName
+ "_protectlib_combo_update\" -workers 16'd"
+ std::to_string(V3Config::getHierWorkers(m_libName)) + "\n");
txtp->addText(fl, "hier_workers -hier-dpi \"" + m_libName
+ "_protectlib_seq_update\" -workers 16'd"
+ std::to_string(V3Config::getHierWorkers(m_libName)) + "\n");
// No workers for combo_ignore
txtp->addText(fl, "`verilog\n");
txtp->addText(fl, "`endif\n");
}