mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-04 22:32:36 +00:00
- Updated the formal file list generator to include CLINT source files. - Added CLINT timebase to the clock and reset domains configuration. - Enhanced the SOC topology generation to include CLINT interrupts and their mappings. - Introduced a new CLINT testbench to validate multi-hart and timebase functionality. - Modified the software build configuration to define CLINT timebase frequency. - Updated the RCU module to integrate CLINT timebase generation. - Adjusted the IRQ configuration to reflect changes in CLINT interrupt signals. - Added user-visible flags for interrupts in the topology configuration. - Enhanced the clock reset domain checks to include CLINT timebase. - Updated the memory map tests to validate CLINT peripheral integration.
23 lines
646 B
C
23 lines
646 B
C
#ifndef RETROSOC_HAL_CLINT_H
|
|
#define RETROSOC_HAL_CLINT_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include <retrosoc/core/status.h>
|
|
|
|
#define RS_CLINT_HART_COUNT UINT32_C(1)
|
|
|
|
#ifndef RS_CLINT_TIMEBASE_HZ
|
|
#define RS_CLINT_TIMEBASE_HZ UINT32_C(1000000)
|
|
#endif
|
|
|
|
rs_status_t rs_clint_get_time(uint64_t *time);
|
|
rs_status_t rs_clint_set_time(uint64_t time);
|
|
rs_status_t rs_clint_get_compare(uint32_t hart, uint64_t *compare);
|
|
rs_status_t rs_clint_set_compare(uint32_t hart, uint64_t compare);
|
|
rs_status_t rs_clint_get_software_interrupt(uint32_t hart, bool *pending);
|
|
rs_status_t rs_clint_set_software_interrupt(uint32_t hart, bool pending);
|
|
|
|
#endif
|