soc-hub-fi / headsail-vp

Headsail - Virtual Platform
0 stars 2 forks source link

Adds PULP timer_unit driver for timer0 #20

Closed andstepan closed 2 months ago

andstepan commented 2 months ago

This is the driver implements the interfacing for the timer peripheral found in the headsail-vp. The peripheral found in the VP is not the PULP APB Timer, as specified in the Headsail documentation, but is the PULP Timer Unit (https://github.com/pulp-platform/timer_unit). This means, that this driver is valid for the VP ONLY.

Summary of changes: examples/headsail-bp/Cargo.toml: Added timer_unit module dependencies and example entry examples/headsail-bp/src/lib.rs: Added timer_unit module examples/headsail-bp/src/mmap.rs: Added timer0 address constant examples/headsail-bp/src/timer_unit.rs: Driver implementation (New file) examples/hpc/hello-hpc/examples/timer0.rs: Example implementation (New file)

vilukissa68 commented 2 months ago

For some reason @andstepan doesn't have rights to run the CI, so I approved this run.

vilukissa68 commented 2 months ago

Tested example with:

cargo run --example timer0 --target riscv64imac-unknown-none-elf

Works well!