51 uint32_t reg_addr = addr;
52 uint32_t reg_data = wdata;
53 asm volatile (
"sw %[da], 0(%[ad])" : : [da]
"r" (reg_data), [ad]
"r" (reg_addr));
67 uint32_t reg_addr = addr;
68 uint32_t reg_data = (uint32_t)wdata;
69 asm volatile (
"sh %[da], 0(%[ad])" : : [da]
"r" (reg_data), [ad]
"r" (reg_addr));
81 uint32_t reg_addr = addr;
82 uint32_t reg_data = (uint32_t)wdata;
83 asm volatile (
"sb %[da], 0(%[ad])" : : [da]
"r" (reg_data), [ad]
"r" (reg_addr));
97 uint32_t reg_addr = addr;
99 asm volatile (
"lw %[da], 0(%[ad])" : [da]
"=r" (reg_data) : [ad]
"r" (reg_addr));
114 uint32_t reg_addr = addr;
116 asm volatile (
"lhu %[da], 0(%[ad])" : [da]
"=r" (reg_data) : [ad]
"r" (reg_addr));
131 uint32_t reg_addr = addr;
133 asm volatile (
"lh %[da], 0(%[ad])" : [da]
"=r" (reg_data) : [ad]
"r" (reg_addr));
146 uint32_t reg_addr = addr;
148 asm volatile (
"lbu %[da], 0(%[ad])" : [da]
"=r" (reg_data) : [ad]
"r" (reg_addr));
161 uint32_t reg_addr = addr;
163 asm volatile (
"lb %[da], 0(%[ad])" : [da]
"=r" (reg_data) : [ad]
"r" (reg_addr));
177 asm volatile (
"csrr %[result], %[input_i]" : [result]
"=r" (csr_data) : [input_i]
"i" (csr_id));
190 uint32_t csr_data = data;
191 asm volatile (
"csrw %[input_i], %[input_j]" : : [input_i]
"i" (csr_id), [input_j]
"r" (csr_data));
203 uint32_t csr_data = mask;
204 asm volatile (
"csrs %[input_i], %[input_j]" : : [input_i]
"i" (csr_id), [input_j]
"r" (csr_data));
216 uint32_t csr_data = mask;
217 asm volatile (
"csrc %[input_i], %[input_j]" : : [input_i]
"i" (csr_id), [input_j]
"r" (csr_data));
229 asm volatile (
"wfi");
void neorv32_cpu_store_unsigned_word(uint32_t addr, uint32_t wdata)
Definition neorv32_cpu.h:49
void neorv32_cpu_set_mcycle(uint64_t value)
Definition neorv32_cpu.c:72
void neorv32_cpu_csr_set(const int csr_id, uint32_t mask)
Definition neorv32_cpu.h:201
uint32_t neorv32_cpu_pmp_get_num_regions(void)
Definition neorv32_cpu.c:221
void neorv32_cpu_store_unsigned_half(uint32_t addr, uint16_t wdata)
Definition neorv32_cpu.h:65
int8_t neorv32_cpu_load_signed_byte(uint32_t addr)
Definition neorv32_cpu.h:159
uint16_t neorv32_cpu_load_unsigned_half(uint32_t addr)
Definition neorv32_cpu.h:112
uint64_t neorv32_cpu_get_instret(void)
Definition neorv32_cpu.c:90
uint32_t neorv32_cpu_load_unsigned_word(uint32_t addr)
Definition neorv32_cpu.h:95
void neorv32_cpu_set_minstret(uint64_t value)
Definition neorv32_cpu.c:116
uint32_t neorv32_cpu_hpm_get_num_counters(void)
Definition neorv32_cpu.c:374
void neorv32_cpu_sleep(void)
Definition neorv32_cpu.h:227
uint32_t neorv32_cpu_get_clk_from_prsc(int prsc)
Definition neorv32_cpu.c:188
int neorv32_cpu_pmp_configure_region(int index, uint32_t addr, uint8_t config)
Definition neorv32_cpu.c:308
void neorv32_cpu_delay_ms(uint32_t time_ms)
Definition neorv32_cpu.c:138
uint32_t neorv32_cpu_csr_read(const int csr_id)
Definition neorv32_cpu.h:174
void neorv32_cpu_csr_clr(const int csr_id, uint32_t mask)
Definition neorv32_cpu.h:214
uint64_t neorv32_cpu_get_cycle(void)
Definition neorv32_cpu.c:46
uint8_t neorv32_cpu_load_unsigned_byte(uint32_t addr)
Definition neorv32_cpu.h:144
void neorv32_cpu_goto_user_mode(void)
Definition neorv32_cpu.c:447
uint32_t neorv32_cpu_pmp_get_granularity(void)
Definition neorv32_cpu.c:266
uint32_t neorv32_cpu_hpm_get_size(void)
Definition neorv32_cpu.c:409
int16_t neorv32_cpu_load_signed_half(uint32_t addr)
Definition neorv32_cpu.h:129
void neorv32_cpu_store_unsigned_byte(uint32_t addr, uint8_t wdata)
Definition neorv32_cpu.h:79
void neorv32_cpu_csr_write(const int csr_id, uint32_t data)
Definition neorv32_cpu.h:188