mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-10 09:48:06 +00:00
verilog: indirect AST_CONCAT and AST_TO_UNSIGNED port connections
- AST_CONCAT and AST_TO_UNSIGNED are always unsigned, but may generate RTLIL that exclusively reference a signed wire. - AST_CONCAT may also contain a memory write.
This commit is contained in:
parent
e8f8297e5d
commit
f55fbb5803
6 changed files with 72 additions and 9 deletions
|
@ -2121,11 +2121,9 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
if (sig.is_wire()) {
|
||||
// if the resulting SigSpec is a wire, its
|
||||
// signedness should match that of the AstNode
|
||||
if (arg->type == AST_IDENTIFIER && arg->id2ast && arg->id2ast->is_signed && !arg->is_signed)
|
||||
// fully-sliced signed wire will be resolved
|
||||
// once the module becomes available
|
||||
log_assert(attributes.count(ID::reprocess_after));
|
||||
else
|
||||
// unless this instantiation depends on module
|
||||
// information that isn't available yet
|
||||
if (!attributes.count(ID::reprocess_after))
|
||||
log_assert(arg->is_signed == sig.as_wire()->is_signed);
|
||||
} else if (arg->is_signed) {
|
||||
// non-trivial signed nodes are indirected through
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue