Closed xobs closed 5 years ago
Thanks for the feedback. The ideas was to keep the files organized as it is with official/partner/community directory but allow just importing any platform/target from litex_boards
directly. (to ease use/maintenance and simplify changing one platform/target location).
I need to think about a better way to do this and avoid adding dependency. I'll think of it but ideas are welcome :)
I would have thought that this would work:
from litex_boards.partner.targets.fomu import _CRG
But it seems that implicitly does an import of litex_boards.partner.targets.__init__
, which is where the problem is coming from. Is there another way I should be importing things?
Sorry, i haven't been able to look at that yet. I need to have a closer look at how import work in Python. I'd like to be able to do:
from litex_boards.targets.fomu import _CRG
instead of:
from litex_boards.partner.targets.fomu import _CRG
to be able to move more easily platforms/targets from an location to another in the future and simplify imports.
Alright, let me know what you'd like me to do -- I have a BaseSoC implementation of a Fomu target that might be nice to merge, but it doesn't work because of the import issue.
@xobs: i need to look at that, to avoid blocking you i just commited https://github.com/litex-hub/litex-boards/commit/e704014b3643129e39e2b88fadc02a2581c2696b, this should allow your to integrate your code and give me time to do what i initially wanted to do.
@enjoy-digital thanks for that, I just submitted a PR to add Fomu back in, now with a BaseSoC
in addition to the _CRG
.
The imports are fixed with https://github.com/litex-hub/litex-boards/commit/b4eefa6c33ca6a8047da7cafc777d4caa254a34e.
When importing something from
litex_boards.partner.targets
, all boards are imported. This adds a dependency onliteeth
where one is not necessary.