Skip to content

Commit

Permalink
Merge pull request #115 from cfelton/verilog_inout
Browse files Browse the repository at this point in the history
Added inout pot declaration to Verilog conversion for TristateSignals
  • Loading branch information
jandecaluwe committed Jul 28, 2015
2 parents a1ba159 + 16bbf7e commit c7d92c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion myhdl/conversion/_toVerilog.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ def _writeModuleHeader(f, intf, doc):
warnings.warn("%s: %s" % (_error.OutputPortRead, portname),
category=ToVerilogWarning
)
print("output %s%s%s;" % (p, r, portname), file=f)
if isinstance(s, _TristateSignal):
print("inout %s%s%s;" % (p, r, portname), file=f)
else:
print("output %s%s%s;" % (p, r, portname), file=f)
if s._driven == 'reg':
print("reg %s%s%s;" % (p, r, portname), file=f)
else:
Expand Down

0 comments on commit c7d92c4

Please sign in to comment.