Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat Modules cannot be elaborated #83

Closed
tdaede opened this issue Jun 4, 2019 · 0 comments
Closed

Compat Modules cannot be elaborated #83

tdaede opened this issue Jun 4, 2019 · 0 comments
Labels
Milestone

Comments

@tdaede
Copy link

tdaede commented Jun 4, 2019

Testcase:

#!/usr/bin/env python3
from nmigen import *
from nmigen.compat import *
from nmigen.vendor.board.icestick import *

class Compat(Module):
    def __init__(self):
        self.tx = Signal()

if __name__ == "__main__":
    plat = ICEStickPlatform()
    m = Compat()
    plat.build(m)

Output:

./testcase.py 
Traceback (most recent call last):
  File "./testcase.py", line 13, in <module>
    plat.build(m)
  File "/home/thomas/.local/lib/python3.7/site-packages/nmigen-9f643ce-py3.7.egg/nmigen/build/plat.py", line 48, in build
    plan = self.prepare(fragment, name, **kwargs)
  File "/home/thomas/.local/lib/python3.7/site-packages/nmigen-9f643ce-py3.7.egg/nmigen/build/plat.py", line 62, in prepare
    fragment = Fragment.get(fragment, self)
  File "/home/thomas/.local/lib/python3.7/site-packages/nmigen-9f643ce-py3.7.egg/nmigen/hdl/ir.py", line 66, in get
    raise AttributeError("Object '{!r}' cannot be elaborated".format(obj))
AttributeError: Object '<__main__.Compat object at 0x7fb954c57390>' cannot be elaborated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants