back.rtlil: do not translate empty fragments.

The resulting Verilog confuses some frontends.
This commit is contained in:
whitequark 2018-12-23 09:20:02 +00:00
parent 45a474788c
commit 9faa1d3742

View file

@ -627,6 +627,9 @@ def convert_fragment(builder, fragment, name, top):
# name) names.
memories = OrderedDict()
for subfragment, sub_name in fragment.subfragments:
if not subfragment.ports:
continue
sub_params = OrderedDict()
if hasattr(subfragment, "parameters"):
for param_name, param_value in subfragment.parameters.items():