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

linux dts: add vexii clint support #1983

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

Dolu1990
Copy link
Collaborator

With this change, the DTS generated when using VexiiRiscv is good out of the box and can be used with upstream generic opensbi

@@ -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):
Copy link
Collaborator

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"]):

Copy link
Collaborator Author

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

Copy link
Collaborator

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. :)

Copy link
Collaborator Author

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 ^^

@gsomlo
Copy link
Collaborator

gsomlo commented Jun 10, 2024 via email

@Dolu1990
Copy link
Collaborator Author

Does cpu_name get populated from the name of the directory under
litex/soc/cores/cpu/ ?

To me it get named from

class Rocket(CPU):
    category             = "softcore"
    family               = "riscv"
    name                 = "rocket" # <---- this 

@Dolu1990
Copy link
Collaborator Author

I checked, it comes from core.py "name = "rocket" # <---- this "

So, i did the s/if "rocket" in cpu_name/if cpu_name == "rocket"/g and pushed it to this PR.

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.
Then this "how to try debian on vexii" would work out of the box :
https://github.com/SpinalHDL/VexiiRiscv/tree/dev/doc/litex/debian

Let's me know if anything prevent the merge :)

@trabucayre trabucayre merged commit 6ed61e1 into enjoy-digital:master Jun 11, 2024
1 check passed
@trabucayre
Copy link
Collaborator

Applied thanks @Dolu1990 !

@Dolu1990
Copy link
Collaborator Author

Thanks :)

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

Successfully merging this pull request may close these issues.

3 participants