TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
|
Tenstorrent firmware virtual UART interface. More...
#include <assert.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | tt_vuart |
In-memory ring buffer descriptor for Tenstorrent virtual UART. More... |
Enumerations | |
enum | tt_vuart_role { TT_VUART_ROLE_DEVICE , TT_VUART_ROLE_HOST } |
Role of the virtual UART in the context of the shared memory buffer. More... |
Functions | |
static size_t | tt_vuart_inst (volatile const struct tt_vuart *vuart) |
Determine the instance number of a virtual UART buffer descriptor. | |
static uint32_t | tt_vuart_buf_size (uint32_t head, uint32_t tail) |
Determine the size of the given buffer. | |
static uint32_t | tt_vuart_buf_space (uint32_t head, uint32_t tail, uint32_t cap) |
Determine the free space available in the given buffer. | |
static bool | tt_vuart_buf_empty (uint32_t head, uint32_t tail) |
Determine if the given buffer is empty. | |
static bool | tt_vuart_buf_full (uint32_t head, uint32_t tail, uint32_t cap) |
Determine if the given buffer is full. | |
static int | tt_vuart_poll_in (volatile struct tt_vuart *vuart, unsigned char *p_char, enum tt_vuart_role role) |
Poll the virtual UART buffer for incoming data. | |
static void | tt_vuart_poll_out (volatile struct tt_vuart *vuart, unsigned char out_char, enum tt_vuart_role role) |
Poll the virtual UART buffer with outgoing data. |
Tenstorrent firmware virtual UART interface.