OpenOCD
batch.c File Reference
Include dependency graph for batch.c:

Go to the source code of this file.

Macros

#define DMI_SCAN_BUF_SIZE   (DIV_ROUND_UP(DMI_SCAN_MAX_BIT_LENGTH, 8))
 
#define DMI_SCAN_MAX_BIT_LENGTH   (DTM_DMI_MAX_ADDRESS_LENGTH + DTM_DMI_DATA_LENGTH + DTM_DMI_OP_LENGTH)
 
#define DTM_DMI_MAX_ADDRESS_LENGTH   ((1<<DTM_DTMCS_ABITS_LENGTH)-1)
 
#define get_field(reg, mask)   (((reg) & (mask)) / ((mask) & ~((mask) << 1)))
 
#define set_field(reg, mask, val)   (((reg) & ~(mask)) | (((val) * ((mask) & ~((mask) << 1))) & (mask)))
 

Functions

static void dump_field (int idle, const struct scan_field *field)
 
size_t riscv_batch_add_dmi_read (struct riscv_batch *batch, unsigned address)
 
void riscv_batch_add_dmi_write (struct riscv_batch *batch, unsigned address, uint64_t data)
 
void riscv_batch_add_nop (struct riscv_batch *batch)
 
struct riscv_batchriscv_batch_alloc (struct target *target, size_t scans, size_t idle)
 
size_t riscv_batch_available_scans (struct riscv_batch *batch)
 
void riscv_batch_free (struct riscv_batch *batch)
 
bool riscv_batch_full (struct riscv_batch *batch)
 
uint32_t riscv_batch_get_dmi_read_data (struct riscv_batch *batch, size_t key)
 
unsigned riscv_batch_get_dmi_read_op (struct riscv_batch *batch, size_t key)
 
int riscv_batch_run (struct riscv_batch *batch)
 

Macro Definition Documentation

◆ DMI_SCAN_BUF_SIZE

#define DMI_SCAN_BUF_SIZE   (DIV_ROUND_UP(DMI_SCAN_MAX_BIT_LENGTH, 8))

Definition at line 16 of file batch.c.

◆ DMI_SCAN_MAX_BIT_LENGTH

#define DMI_SCAN_MAX_BIT_LENGTH   (DTM_DMI_MAX_ADDRESS_LENGTH + DTM_DMI_DATA_LENGTH + DTM_DMI_OP_LENGTH)

Definition at line 15 of file batch.c.

◆ DTM_DMI_MAX_ADDRESS_LENGTH

#define DTM_DMI_MAX_ADDRESS_LENGTH   ((1<<DTM_DTMCS_ABITS_LENGTH)-1)

Definition at line 14 of file batch.c.

◆ get_field

#define get_field (   reg,
  mask 
)    (((reg) & (mask)) / ((mask) & ~((mask) << 1)))

Definition at line 11 of file batch.c.

◆ set_field

#define set_field (   reg,
  mask,
  val 
)    (((reg) & ~(mask)) | (((val) * ((mask) & ~((mask) << 1))) & (mask)))

Definition at line 12 of file batch.c.

Function Documentation

◆ dump_field()

void dump_field ( int  idle,
const struct scan_field field 
)
static

◆ riscv_batch_add_dmi_read()

◆ riscv_batch_add_dmi_write()

◆ riscv_batch_add_nop()

◆ riscv_batch_alloc()

◆ riscv_batch_available_scans()

size_t riscv_batch_available_scans ( struct riscv_batch batch)

Definition at line 222 of file batch.c.

References riscv_batch::allocated_scans, and riscv_batch::used_scans.

Referenced by write_memory_bus_v1().

◆ riscv_batch_free()

◆ riscv_batch_full()

bool riscv_batch_full ( struct riscv_batch batch)

◆ riscv_batch_get_dmi_read_data()

uint32_t riscv_batch_get_dmi_read_data ( struct riscv_batch batch,
size_t  key 
)

◆ riscv_batch_get_dmi_read_op()

unsigned riscv_batch_get_dmi_read_op ( struct riscv_batch batch,
size_t  key 
)

◆ riscv_batch_run()