-
Notifications
You must be signed in to change notification settings - Fork 568
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
linux dts: add vexii clint support #1983
Conversation
litex/tools/litex_json2dts_linux.py
Outdated
@@ -328,7 +328,7 @@ def generate_dts(d, initrd_start=None, initrd_size=None, initrd=None, root_devic | |||
|
|||
# Interrupt Controller ------------------------------------------------------------------------- | |||
|
|||
if (cpu_arch == "riscv") and ("rocket" in cpu_name): | |||
if (cpu_arch == "riscv") and ("rocket" in cpu_name or "vexiiriscv" in cpu_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using:
if (cpu_arch == "riscv") and (cpu_name in ["rocket", vexiiriscv"]):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was afraid of breaking some weird stuff as :
"rocket" in cpu_name isn't equivalent to cpu_name in ["rocket"]
As there may eventualy be a "rocket_on the moon" as cpu_name ?
So i prefered not disrupting the old behaviour. As they could have done it with cpu_name == "rocket" but didn't XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense but cpu_name
is used with cpu_architecture
so if there is a "rocket_somewhere" a keyError will be produces. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed as you proposed just now ^^
make sense but cpu_name is used with cpu_architecture so if there is a
"rocket_somewhere" a keyError will be produces. :)
Does cpu_name get populated from the name of the directory under
`litex/soc/cores/cpu/` ?
If so, the folder is named `rocket` and we could use `==` instead of
`"string" in cpu_name` -- I have no memory of how/why that got
started.
IOW, is there *currently* a possibility that cpu_name will be
"[some-optional-prefix]rocket[some-optional-trailer]" and not just
simply "rocket" ?
If not, then we should probably
`s/if "rocket" in cpu_name/if cpu_name == "rocket"/g`
and make life simpler :)
|
To me it get named from
|
I checked, it comes from core.py "name = "rocket" # <---- this " So, i did the I kinda need this to be merged before https://wiki.f-si.org/index.php/FSiC2024, (before next week) as it is the last thing which prevent out of the box exployment for Vexii. Let's me know if anything prevent the merge :) |
Applied thanks @Dolu1990 ! |
Thanks :) |
With this change, the DTS generated when using VexiiRiscv is good out of the box and can be used with upstream generic opensbi