mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 04:47:25 -04:00
[sw/simple_system] Add PCOUNT_READ macro
This commit is contained in:
parent
2d1b07a5c6
commit
d20e65e0f2
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
#define DEV_WRITE(addr, val) (*((volatile uint32_t *)(addr)) = val)
|
||||
#define DEV_READ(addr, val) (*((volatile uint32_t *)(addr)))
|
||||
#define PCOUNT_READ(name, dst) asm volatile("csrr %0, " #name ";" : "=r"(dst))
|
||||
|
||||
/**
|
||||
* Writes character to simulator out log. Signature matches c stdlib function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue