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

Cannot build code - get "Cannot extract CSR name from code, need to specify." #11

Closed
kscz opened this issue Jan 4, 2025 · 1 comment

Comments

@kscz
Copy link

kscz commented Jan 4, 2025

Taking the latest version of litex and attempting to build this repository gives the error "Cannot extract CSR name from code, need to specify."

I tried to play around a bit with the code - I removed the scripts/csr.csv parameter here: https://github.com/enjoy-digital/colorlite/blob/master/colorlite.py#L134 - but it didn't change anything about the behavior.

Full trace below:

INFO:SoC:Controller ctrl added.
Traceback (most recent call last):
  File "/home/kscz/litex_test/colorlite/./colorlite.py", line 148, in <module>
    main()
    ~~~~^^
  File "/home/kscz/litex_test/colorlite/./colorlite.py", line 133, in main
    soc     = ColorLite(ip_address=args.ip_address, mac_address=int(args.mac_address, 0))
  File "/home/kscz/litex_test/colorlite/./colorlite.py", line 72, in __init__
    SoCMini.__init__(self, platform, clk_freq=sys_clk_freq)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kscz/litex_test/litex/litex/soc/integration/soc_core.py", line 395, in __init__
    SoCCore.__init__(self, *args, **kwargs)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kscz/litex_test/litex/litex/soc/integration/soc_core.py", line 215, in __init__
    self.add_controller("ctrl")
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/home/kscz/litex_test/litex/litex/soc/integration/soc.py", line 1054, in add_controller
    self.add_module(name=name, module=SoCController(**kwargs))
                                      ~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/kscz/litex_test/litex/litex/soc/integration/soc.py", line 889, in __init__
    self._reset = CSRStorage(fields=[
                  ~~~~~~~~~~^^^^^^^^^
        CSRField("soc_rst", size=1, offset=0, pulse=True, description="""Write `1` to this register to reset the full SoC (Pulse Reset)"""),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        CSRField("cpu_rst", size=1, offset=1,             description="""Write `1` to this register to reset the CPU(s) of the SoC (Hold Reset)"""),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ])
    ^^
  File "/home/kscz/litex_test/litex/litex/soc/interconnect/csr.py", line 388, in __init__
    _CompoundCSR.__init__(self, size, name, n)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/kscz/litex_test/litex/litex/soc/interconnect/csr.py", line 136, in __init__
    _CSRBase.__init__(self, size, name, n)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/kscz/litex_test/litex/litex/soc/interconnect/csr.py", line 53, in __init__
    raise ValueError("Cannot extract CSR name from code, need to specify.")
ValueError: Cannot extract CSR name from code, need to specify.
@kscz
Copy link
Author

kscz commented Jan 5, 2025

Ah, this issue is enjoy-digital/litex#2152 - I'll close this as the main problem is not related to this repository

@kscz kscz closed this as completed Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant