hdl.ast: add name_suffix=".." option to Signal.like().
authorwhitequark <whitequark@whitequark.org>
Wed, 12 Jun 2019 22:21:23 +0000 (22:21 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 12 Jun 2019 22:26:57 +0000 (22:26 +0000)
commite52b15d2368f9f66e6a9308ae0ca533961d2b916
tree55325813c797f2e58ed8a78c80ecac965a4d6550
parent3b303c333445d1878c08a07ad174d10be4f0cba5
hdl.ast: add name_suffix=".." option to Signal.like().

This simplifies creation of related signals with nice names during
metaprogramming, e.g.

  def make_ff(m, sig):
      sig_ff = Signal.like(sig, name_suffix="_ff")
      m.d.sync += sig_ff.eq(sig)
      return sig_ff
nmigen/hdl/ast.py
nmigen/test/test_hdl_ast.py