mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-04 10:20:24 +00:00
Implemented correct handling of signed module parameters
This commit is contained in:
parent
1e6836933d
commit
609caa23b5
8 changed files with 19 additions and 8 deletions
|
@ -1309,9 +1309,13 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
if (child->str.size() == 0) {
|
||||
char buf[100];
|
||||
snprintf(buf, 100, "$%d", ++para_counter);
|
||||
if (child->children[0]->is_signed)
|
||||
cell->signed_parameters.insert(buf);
|
||||
cell->parameters[buf].str = child->children[0]->str;
|
||||
cell->parameters[buf].bits = child->children[0]->bits;
|
||||
} else {
|
||||
if (child->children[0]->is_signed)
|
||||
cell->signed_parameters.insert(child->str);
|
||||
cell->parameters[child->str].str = child->children[0]->str;
|
||||
cell->parameters[child->str].bits = child->children[0]->bits;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue