TT Zephyr Platforms
18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
reg.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 Tenstorrent AI ULC
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
6
#ifndef REG_H
7
#define REG_H
8
9
#include <
stdint.h
>
10
11
#if CONFIG_BOARD_NATIVE_SIM
12
uint32_t
ReadReg
(
uint32_t
addr);
13
void
WriteReg
(
uint32_t
addr,
uint32_t
val);
14
#else
15
static
inline
uint32_t
ReadReg
(
uint32_t
addr)
16
{
17
return
*((
uint32_t
volatile
*)addr);
18
}
19
static
inline
void
WriteReg
(
uint32_t
addr,
uint32_t
val)
20
{
21
*((
uint32_t
volatile
*)addr) = val;
22
}
23
#endif
24
#endif
WriteReg
static void WriteReg(uint32_t addr, uint32_t val)
Definition
reg.h:19
ReadReg
static uint32_t ReadReg(uint32_t addr)
Definition
reg.h:15
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
lib
tenstorrent
bh_arc
reg.h
Generated by
1.14.0