read_verilog: correctly format `hdlname` attribute value.

The leading slash is not a part of the attribute as it only concerns
public values.
This commit is contained in:
Catherine 2024-02-13 18:20:26 +00:00
parent 42920c9bc0
commit d8ce26a5ba
1 changed files with 1 additions and 1 deletions

View File

@ -1820,7 +1820,7 @@ std::string AstModule::derive_common(RTLIL::Design *design, const dict<RTLIL::Id
AstNode *new_ast = ast->clone();
if (!new_ast->attributes.count(ID::hdlname))
new_ast->set_attribute(ID::hdlname, AstNode::mkconst_str(stripped_name));
new_ast->set_attribute(ID::hdlname, AstNode::mkconst_str(stripped_name.substr(1)));
para_counter = 0;
for (auto child : new_ast->children) {