soc-hub-fi / headsail-vp

Headsail — Virtual Platform
0 stars 2 forks source link

Adds PULP APB Timer and implements single timer driver module #21

Closed andstepan closed 4 months ago

andstepan commented 5 months ago

This is the pull request for the implementation of the PULP APB Timer. This pull request extends pull request #20 and thus should only be merged after it. In order to properly handle the difference between the VP and the actual ASIC peripheral, the two timers have been encapsulated in a single module called timer and inside that one, we have choose conditionally at compile-time which driver gets compiled. The selection is done using the vp feature. When vp feature is enabled, the timer_unit timer is used. In this pull request the vp feature is enabled.

Summary of changes: examples/headsail-bsp/Cargo.toml: Added vp feature examples/headsail-bsp/src/apb_timer.rs: APB Timer implementation (New file) examples/headsail-bsp/src/lib.rs: Set timer_unit and apb_timer modules as private and added encapsulating module "timer" examples/hpc/hello-hpc/Cargo.toml: Added vp feature for headsail-bsp hpc/hello-hpc/examples/timer0.rs: Added new encapsulating interface

vilukissa68 commented 5 months ago

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

andstepan commented 5 months ago

I force-push this branch because I rebase it after changes are made to the #20 branch.