File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -341,8 +341,10 @@ std::vector<IdString> parse_hdlname(const O* object)
341341 path.push_back (" \\ " + item);
342342 if (path.empty () && object->name .isPublic ())
343343 path.push_back (object->name );
344- if (!path.empty () && !(object->name .isPublic () || object->name .begins_with (" $paramod" ) || object->name .begins_with (" $abstract" )))
344+ if (!path.empty () && !(object->name .isPublic () || object->name .begins_with (" $paramod" ) || object->name .begins_with (" $abstract" ))) {
345345 path.pop_back ();
346+ path.push_back (object->name );
347+ }
346348 return path;
347349}
348350
Original file line number Diff line number Diff line change @@ -378,7 +378,10 @@ static void extract_fsm(RTLIL::Wire *wire)
378378 fsm_cell->parameters [ID::NAME] = RTLIL::Const (wire->name .str ());
379379 fsm_cell->attributes = wire->attributes ;
380380 if (fsm_cell->attributes .count (ID::hdlname)) {
381- fsm_cell->attributes [ID (scopename)] = fsm_cell->attributes [ID::hdlname];
381+ auto hdlname = fsm_cell->get_hdlname_attribute ();
382+ hdlname.pop_back ();
383+ fsm_cell->set_hdlname_attribute (hdlname);
384+ fsm_cell->set_string_attribute (ID (scopename), fsm_cell->get_string_attribute (ID::hdlname));
382385 fsm_cell->attributes .erase (ID::hdlname);
383386 }
384387 fsm_data.copy_to_cell (fsm_cell);
@@ -390,7 +393,10 @@ static void extract_fsm(RTLIL::Wire *wire)
390393 wire->name = stringf (" $fsm$oldstate%s" , wire->name .c_str ());
391394 module ->wires_ [wire->name ] = wire;
392395 if (wire->attributes .count (ID::hdlname)) {
393- wire->attributes [ID (scopename)] = wire->attributes [ID::hdlname];
396+ auto hdlname = wire->get_hdlname_attribute ();
397+ hdlname.pop_back ();
398+ wire->set_hdlname_attribute (hdlname);
399+ wire->set_string_attribute (ID (scopename), wire->get_string_attribute (ID::hdlname));
394400 wire->attributes .erase (ID::hdlname);
395401 }
396402
You can’t perform that action at this time.
0 commit comments