Snitch Runtime
Loading...
Searching...
No Matches
riscv_decls.h
1// Copyright 2023 ETH Zurich and University of Bologna.
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5#pragma once
6
7#include <stdint.h>
8
9#define R_TYPE_ENCODE(funct7, rs2, rs1, funct3, rd, opcode) \
10 ((funct7 << 25) | (rs2 << 20) | (rs1 << 15) | (funct3 << 12) | (rd << 7) | \
11 (opcode))
12
13#define OP_CUSTOM1 0b0101011
14
15inline void snrt_wfi();
16
17inline uint32_t snrt_mcycle();
18
19inline void snrt_interrupt_enable(uint32_t irq);
20
21inline void snrt_interrupt_disable(uint32_t irq);
22
23inline void snrt_interrupt_global_enable(void);
24
25inline void snrt_interrupt_global_disable(void);