TT-System-Firmware APIs 19.10.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
jtag_emul.c File Reference
#include "axi.h"
#include "jtag_priv.h"
#include <stdbool.h>
#include <string.h>
#include <tenstorrent/bitrev.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/gpio/gpio_emul.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/byteorder.h>
Include dependency graph for jtag_emul.c:

Macros

#define REG_BITS   32

Functions

 LOG_MODULE_REGISTER (jtag_emul, CONFIG_JTAG_LOG_LEVEL)
static void on_tck_falling (struct jtag_data *data, bool tdi)
static bool tck (struct jtag_data *data)
static bool tdi (struct jtag_data *data)
static bool tms (struct jtag_data *data)
static bool trst (struct jtag_data *data)
static void gpio_emul_callback (const struct device *port, struct gpio_callback *cb, gpio_port_pins_t pins)
static void on_update_reg (struct jtag_data *data)
void jtag_emul_setup (const struct device *dev, uint32_t *buf, size_t buf_len)
int jtag_emul_axi_read32 (const struct device *dev, uint32_t addr, uint32_t *value)

Variables

static enum jtag_state next_state [2][16]
static __maybe_unused const char *const jtag_state_to_str []

Macro Definition Documentation

◆ REG_BITS

#define REG_BITS   32

Function Documentation

◆ gpio_emul_callback()

void gpio_emul_callback ( const struct device * port,
struct gpio_callback * cb,
gpio_port_pins_t pins )
static

◆ jtag_emul_axi_read32()

int jtag_emul_axi_read32 ( const struct device * dev,
uint32_t addr,
uint32_t * value )

◆ jtag_emul_setup()

void jtag_emul_setup ( const struct device * dev,
uint32_t * buf,
size_t buf_len )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( jtag_emul ,
CONFIG_JTAG_LOG_LEVEL  )

◆ on_tck_falling()

void on_tck_falling ( struct jtag_data * data,
bool tdi )
static

◆ on_update_reg()

void on_update_reg ( struct jtag_data * data)
static

◆ tck()

bool tck ( struct jtag_data * data)
inlinestatic

◆ tdi()

bool tdi ( struct jtag_data * data)
inlinestatic

◆ tms()

bool tms ( struct jtag_data * data)
inlinestatic

◆ trst()

bool trst ( struct jtag_data * data)
inlinestatic

Variable Documentation

◆ jtag_state_to_str

__maybe_unused const char* const jtag_state_to_str[]
static
Initial value:
= {
"RESET ", "IDLE ", "SCAN_DR", "SCAN_IR", "CAPT_DR ", "CAPT_IR", "SHFT_DR", "SHFT_IR",
"EXT1_DR", "EXT1_IR", "PAUS_DR", "PAUSE_IR", "EXT2_DR", "EXT2_IR", "UPDT_DR", "UPDT_IR",
}

◆ next_state

enum jtag_state next_state[2][16]
static