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

Write a driver for the LiteX timer #11

Open
3 tasks done
mithro opened this issue Apr 13, 2017 · 8 comments
Open
3 tasks done

Write a driver for the LiteX timer #11

mithro opened this issue Apr 13, 2017 · 8 comments
Assignees

Comments

@mithro
Copy link
Member

mithro commented Apr 13, 2017

It seems or1k has an timer object built into the CPU core?
litex has its own timer object.

Figure out the following;

  • If the inbuilt or1k timer object is available on real litex SoCs? -- It's not
  • If we want to write a driver for the LiteX timer object -- We do
  • Which one we want to use under Linux -- We want the LiteX Timer
@mithro
Copy link
Member Author

mithro commented Apr 13, 2017

The litex timer object is currently broken in QEMU - timvideos/qemu-litex#10

@mithro
Copy link
Member Author

mithro commented Apr 16, 2017

@enjoy-digital
Copy link
Member

It seems probably better to use the litex timer in case we want to switch to another cpu (or are do you plan to only use or1k?)

@mithro
Copy link
Member Author

mithro commented Apr 30, 2017

So the summary seems to be;

  • The or1k timer object is disabled on real LiteX SoCs.
  • We want to use the LiteX timer so we can support non-or1k architectures in the future (risc-v / j-core / maybe lm32).
  • We need to write a driver for the LiteX timer object.

@mithro mithro added this to the Booting on real hardware milestone Apr 30, 2017
@mithro mithro changed the title Figure out if we are using litex or or1k timer? Write a driver for the LiteX timer Apr 30, 2017
@tcal-x
Copy link
Member

tcal-x commented Jul 1, 2020

Hi all, is this still an open issue, or has it been superseded by other work?
Thanks,
Tim

@mithro
Copy link
Member Author

mithro commented Jul 1, 2020

@mateusz-holenko Would probably know the current state...

@mateusz-holenko
Copy link

mateusz-holenko commented Jul 2, 2020

@tcal-x I don't think there is a LiteX timer driver for Linux at the moment. We worked on Zephyr version which is available in mainline: https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/timer/litex_timer.c.

LiteX/VexRiscv uses VexRiscvTimer (https://github.com/enjoy-digital/litex/blob/67cf67034ca114faae91bf802424276b093df525/litex/soc/cores/cpu/vexriscv/core.py#L62) that is handled by the VexRiscv's emulator (e.g., https://github.com/SpinalHDL/VexRiscv/blob/master/src/main/c/emulator/src/hal.c#L191).

GitHub
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. - zephyrproject-rtos/zephyr
GitHub
Build your hardware, easily! Contribute to enjoy-digital/litex development by creating an account on GitHub.
GitHub
A FPGA friendly 32 bit RISC-V CPU implementation. Contribute to SpinalHDL/VexRiscv development by creating an account on GitHub.

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

6 participants