New Post: "RISC-V Bytes: Timer Interrupts"
This post goes deep into how timer interrupts are enabled on @risc_v platforms and explores how a single machine mode timer can be used to expose one or more virtual timers to lower privilege levels.
https://danielmangum.com/posts/risc-v-bytes-timer-interrupts/
fun fact: you don't actually have to enable interrupts in machine mode to trigger timer interrupts from supervisor mode. As long as `mie.MTIE` is enabled, the fact that interrupts in higher privilege levels are always enabled when executing at a lower privilege level will cause a machine mode timer interrupt when `mtime` exceeds `mtimecmp`.
Starting a learn section in the `moss` docs, beginning with a short list of terms and their definitions. Feel free to add more!
https://github.com/mosscomp/moss/pull/35
Got the sequence I was looking for working now:
1. Machine mode timer interrupt (0x8...7) triggered by `mtime` exceeding `mtimecmp`.
2. Raise a supervisor timer interrupt (0x8...5) from the machine mode trap handler.
3. Handle in the supervisor trap handler because supervisor timer interrupts were delegated by setting the 5th bit in `mideleg`.
Quite honored that my RISC-V Bytes series is included in @WillFlux’s “Recommended FPGA Sites” alongside a bunch of folks I have tremendous respect for. Check out the list for some holiday reading!
https://projectf.io/recommended-fpga-sites/
Have you discovered any great #FPGA sites this year?
For #FPGAFriday this week, I’m sharing my favourites: https://projectf.io/recommended-fpga-sites/
lzop: “If you want the fastest compression and do not care about size, use level 1. If you want both worse compression time and larger size, use level 3.”
Source: https://stephane.lesimple.fr/blog/lzop-vs-compress-vs-gzip-vs-bzip2-vs-lzma-vs-lzma2xz-benchmark-reloaded/
big fan of computers and human beings.