back.rtlil: don't name-prefix signals connected to instance ports.

This gives particularly pathological results on IO buffers, like:
  connect \D_OUT_0 \user_led_0_user_led_0__o

Since subfragment signals are name-prefixed because this works well
for signals propagated upwards across hierarchy, this is never
desirable for instances.
This commit is contained in:
whitequark 2019-07-08 10:48:07 +00:00
parent 0b844da4cf
commit bfbeca4584

View file

@ -772,8 +772,9 @@ def convert_fragment(builder, fragment, hierarchy):
sub_ports = OrderedDict() sub_ports = OrderedDict()
for port, value in sub_port_map.items(): for port, value in sub_port_map.items():
for signal in value._rhs_signals(): if not isinstance(subfragment, ir.Instance):
compiler_state.resolve_curr(signal, prefix=sub_name) for signal in value._rhs_signals():
compiler_state.resolve_curr(signal, prefix=sub_name)
sub_ports[port] = rhs_compiler(value) sub_ports[port] = rhs_compiler(value)
module.cell(sub_type, name=sub_name, ports=sub_ports, params=sub_params, module.cell(sub_type, name=sub_name, ports=sub_ports, params=sub_params,