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

SoCBusHandler.add_peripheral does not work #2052

Open
jwise opened this issue Aug 29, 2024 · 1 comment
Open

SoCBusHandler.add_peripheral does not work #2052

jwise opened this issue Aug 29, 2024 · 1 comment

Comments

@jwise
Copy link
Contributor

jwise commented Aug 29, 2024

Attempting to use SoCBusHandler.add_peripheral, which seems to be a more pleasant name to access the same interface as SoCBusHandler.add_slave, chokes in the following way:

Traceback (most recent call last):
  File "/storage/home/joshua/work/xxx/gateware/./bridge.py", line 234, in <module>
    main()
  File "/storage/home/joshua/work/xxx/gateware/./bridge.py", line 224, in main
    build_with_platform(platform,
  File "/storage/home/joshua/work/xxx/gateware/./bridge.py", line 206, in build_with_platform
    soc = BaseSoC(**{'platform': platform, **soc_args})
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/storage/home/joshua/work/xxx/gateware/./bridge.py", line 203, in __init__
    self.bus.add_peripheral(name = "csirx0", peripheral = self.csirx0.bus, region = self.bus.alloc_region("csirx0", 64 * 4, cached = False))
  File "/storage/home/joshua/work/xxx/litex/litex/litex/soc/integration/soc.py", line 530, in add_peripheral
    self.add_slave(self, name=name, slave=peripheral, region=region)
TypeError: SoCBusHandler.add_slave() got multiple values for argument 'name'

It seems that the first self there is unnecessary.

(I would submit this as a PR instead of an Issue but my tree is a total mess right now :) )

@enjoy-digital
Copy link
Owner

Thanks @jwise, this should be done with 61b54aa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants