# Pastebin wBZAUEwK class MyCSRModule(Module, AutoCSR): def __init__(self, soc): self.my_csr = CSRStorage(32) soc.add_csr("my_csr") self.submodules.my_csr = MyCSRModule(soc=self)