You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env python3
from nmigen import *
from nmigen.compat import *
class Compat2(Module):
pass
class Compat(Module):
def __init__(self):
self.submodules += Compat2()
if __name__ == "__main__":
m = Compat()
f = Fragment.get(m, platform=None)
Output:
./testcase.py:10: DeprecationWarning: instead of `self.submodules +=`, use `m.submodules +=`
self.submodules += Compat2()
Elaboratable created but never used
Traceback (most recent call last):
File "./testcase.py", line 13, in <module>
m = Compat()
File "./testcase.py", line 10, in __init__
self.submodules += Compat2()
The text was updated successfully, but these errors were encountered:
Testcase:
Output:
The text was updated successfully, but these errors were encountered: