fhdl/decorators: make the transform logic more idiomatic
authorRobert Jordens <jordens@gmail.com>
Thu, 2 Apr 2015 20:28:19 +0000 (14:28 -0600)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Sat, 4 Apr 2015 11:16:50 +0000 (19:16 +0800)
commit4091af69fdc53c62b50d5387b4a2c69c7098c7c4
treec4b1251b50b4aee2dddd5ad9c68fbbfb844d239d
parentaac953dd9035ba2fb19d2df2acc2afa2dbac11f6
fhdl/decorators: make the transform logic more idiomatic

* the transformers work on classes and instances.
  you can now do just do:

    @ResetInserter()
    @ClockDomainRenamer({"sys": "new"})
    class Foo(Module):
        pass

  or:

    a = ResetInserter()(FooModule())

* the old usage semantics still work
* the old DecorateModule is deprecated,
  ModuleDecorator has been refactored into ModuleTransformer
  (because it not only decorates things)
migen/fhdl/decorators.py
migen/fhdl/simplify.py