mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
committed by
Wilson Snyder
parent
a98eb4fa04
commit
338afff23c
@@ -457,6 +457,20 @@ class ForceConvertVisitor final : public VNVisitor {
|
||||
void visit(AstVarScope* nodep) override {
|
||||
// If this signal is marked externally forceable, create the public force signals
|
||||
if (nodep->varp()->isForceable()) {
|
||||
if (VN_IS(nodep->varp()->dtypeSkipRefp(), UnpackArrayDType)) {
|
||||
nodep->varp()->v3warn(
|
||||
E_UNSUPPORTED,
|
||||
"Unsupported: Forcing unpacked arrays: " << nodep->varp()->name()); // (#4735)
|
||||
return;
|
||||
}
|
||||
|
||||
const AstBasicDType* const bdtypep = nodep->varp()->basicp();
|
||||
const bool strtype = bdtypep && bdtypep->keyword() == VBasicDTypeKwd::STRING;
|
||||
if (strtype) {
|
||||
nodep->varp()->v3error(
|
||||
"Forcing strings is not permitted: " << nodep->varp()->name());
|
||||
}
|
||||
|
||||
const ForceState::ForceComponentsVarScope& fc = m_state.getForceComponents(nodep);
|
||||
fc.m_enVscp->varp()->sigUserRWPublic(true);
|
||||
fc.m_valVscp->varp()->sigUserRWPublic(true);
|
||||
|
||||
Reference in New Issue
Block a user