port_list.append(_Port(port.name, "INPUT"))
elif isinstance(port, Instance.Output):
port_list.append(_Port(port.name, "OUTPUT"))
+ elif isinstance(port, Instance.InOut):
+ port_list.append(_Port(port.name, "INOUT"))
elif isinstance(port, Instance.Parameter):
pass
else:
pass
elif isinstance(prop, Instance.Output):
pass
+ elif isinstance(prop, Instance.InOut):
+ pass
elif isinstance(prop, Instance.Parameter):
props.append(_Property(name=prop.name, value=prop.value))
else:
def _generate_ios(f, ios, ns):
outs = list_special_ios(f, False, True, False)
+ inouts = list_special_ios(f, False, False, True)
r = []
for io in ios:
- direction = "OUTPUT" if io in outs else "INPUT"
+ direction = "OUTPUT" if io in outs else "INOUT" if io in inouts else "INPUT"
r.append(_Port(name=ns.get_name(io), direction=direction))
return r
if isinstance(special, Instance):
instname = ns.get_name(special)
for port in special.items:
- if isinstance(port, Instance.Input) or isinstance(port, Instance.Output):
+ if isinstance(port, Instance.Input) or isinstance(port, Instance.Output) or isinstance(port, Instance.InOut):
s = ns.get_name(port.expr)
if s not in r:
r[s] = []