Skip to content

Instantly share code, notes, and snippets.

@cr1901
Last active August 26, 2015 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cr1901/d07c4f12efaa14e957ec to your computer and use it in GitHub Desktop.
Save cr1901/d07c4f12efaa14e957ec to your computer and use it in GitHub Desktop.
Migen BankArray
class YMScope(Module, AutoCSR):
def __init__(self, cpu_core, device_to_test):
self.submodules.stop_cpu = CSRStorage(8)
# Will not actually generate a bank... BankArray doesn't actually
# check whether the object passed in has a get_csrs method.
# BankArray only checks whether the object's attributes have a get_csr
# method. Why is that?
# MiSoC's SoC class inherits from AutoCSR, but calling csrgen.BankArray succeeds- BankArray
# detects the SoC's get_csrs function. What am I doing wrong?
self.submodules.csrbankarray = csrgen.BankArray(self, mem_map, data_width=8, address_width=16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment