File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -1290,12 +1290,21 @@ struct SimWorker : SimShared
1290
1290
RTLIL::IdString escaped_s = RTLIL::escape_id (signal_name (parts[len-1 ]));
1291
1291
if (len==3 ) {
1292
1292
Wire *w = topmod->wire (escaped_s);
1293
- if (!w)
1294
- log_warning (" Wire %s not present in module %s\n " ,log_id (escaped_s),log_id (topmod));
1295
- if (w && (int )parts[1 ].size () != w->width )
1296
- log_error (" Size of wire %s is different than provided data.\n " , log_signal (w));
1297
- if (w)
1293
+ if (!w) {
1294
+ Cell *c = topmod->cell (escaped_s);
1295
+ if (!c)
1296
+ log_warning (" Wire/cell %s not present in module %s\n " ,log_id (escaped_s),log_id (topmod));
1297
+ else if (c->type .in (ID ($anyconst), ID ($anyseq))) {
1298
+ SigSpec sig_y= c->getPort (ID::Y);
1299
+ if ((int )parts[1 ].size () != GetSize (sig_y))
1300
+ log_error (" Size of wire %s is different than provided data.\n " , log_signal (sig_y));
1301
+ top->set_state (sig_y, Const::from_string (parts[1 ]));
1302
+ }
1303
+ } else {
1304
+ if ((int )parts[1 ].size () != w->width )
1305
+ log_error (" Size of wire %s is different than provided data.\n " , log_signal (w));
1298
1306
top->set_state (w, Const::from_string (parts[1 ]));
1307
+ }
1299
1308
} else {
1300
1309
Cell *c = topmod->cell (escaped_s);
1301
1310
if (!c)
You can’t perform that action at this time.
0 commit comments