Support forceable on unpacked array variables (#7677) (#7678)

Fixes #7677.
This commit is contained in:
Nikolai Kumar
2026-06-05 20:43:06 -04:00
committed by GitHub
parent 816ab67826
commit bc86701bec
9 changed files with 361 additions and 18 deletions
+8 -4
View File
@@ -4036,8 +4036,10 @@ VerilatedScope::forceableVarInsert(const char* namep, void* datap, bool isParam,
va_list ap;
va_start(ap, pdims);
assert(udims == 0); // Forcing unpacked arrays is unsupported (#4735) and should have been
// checked in V3Force already.
for (int i = 0; i < udims; ++i) {
forceReadSignal.m_unpacked[i].m_left = va_arg(ap, int);
forceReadSignal.m_unpacked[i].m_right = va_arg(ap, int);
}
for (int i = 0; i < pdims; ++i) {
const int msb = va_arg(ap, int);
const int lsb = va_arg(ap, int);
@@ -4055,8 +4057,10 @@ VerilatedScope::forceableVarInsert(const char* namep, void* datap, bool isParam,
verilatedForceControlSignalsp = nullptr;
va_start(ap, pdims);
assert(udims == 0); // Forcing unpacked arrays is unsupported (#4735) and should have been
// checked in V3Force already.
for (int i = 0; i < udims; ++i) {
var.m_unpacked[i].m_left = va_arg(ap, int);
var.m_unpacked[i].m_right = va_arg(ap, int);
}
for (int i = 0; i < pdims; ++i) {
const int msb = va_arg(ap, int);
const int lsb = va_arg(ap, int);