mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Implement 'forceable' attribute
Using the 'forceable' directive in a configuration file, or the /* verilator forceable */ metacomment on a variable declaration will generate additional public signals that allow the specified signals to be forced/released from the C++ code.
This commit is contained in:
@@ -256,6 +256,15 @@ class ForceConvertVisitor final : public VNVisitor {
|
||||
relinker.relink(resetEnp);
|
||||
}
|
||||
|
||||
void visit(AstVarScope* nodep) override {
|
||||
// If this signal is marked externally forceable, create the public force signals
|
||||
if (nodep->varp()->isForceable()) {
|
||||
const ForceComponentsVarScope& fc = getForceComponents(nodep);
|
||||
fc.m_enVscp->varp()->sigPublic(true);
|
||||
fc.m_valVscp->varp()->sigPublic(true);
|
||||
}
|
||||
}
|
||||
|
||||
// CONSTRUCTOR
|
||||
explicit ForceConvertVisitor(AstNetlist* nodep) {
|
||||
// Transform all force and release statements
|
||||
|
||||
Reference in New Issue
Block a user