utils: Support composable attributes. * pb_type library now has a `get_blif_model` function which works with both systems. * mux library generates new form of blif_model. Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
diff --git a/v2x/lib/mux.py b/v2x/lib/mux.py index ca31ee2..59db0b2 100644 --- a/v2x/lib/mux.py +++ b/v2x/lib/mux.py
@@ -140,7 +140,13 @@ ) if mux_type == MuxType.LOGIC: - pb_type_xml.attrib['blif_model'] = '.subckt %s' % subckt + add_metadata(pb_type_xml, 'bel', 'mux') + else: + add_metadata(pb_type_xml, 'bel', 'routing') + + if mux_type == MuxType.LOGIC: + model = ET.SubElement(pb_type_xml, "blif_model") + model.text = '.subckt {}'.format(subckt) else: assert not subckt, "Provided subckt={} for non-logic mux!".format( subckt