Move JTAG batch printing to DEBUG_LVL_IO

This commit is contained in:
Palmer Dabbelt 2018-05-29 19:59:14 -07:00
parent 052b4e3142
commit d7bb150086
1 changed files with 7 additions and 7 deletions

View File

@ -51,7 +51,7 @@ int riscv_batch_run(struct riscv_batch *batch)
keep_alive(); keep_alive();
LOG_DEBUG("running a batch of %ld scans", (long)batch->used_scans); LOG_DEBUG_IO("running a batch of %ld scans", (long)batch->used_scans);
riscv_batch_add_nop(batch); riscv_batch_add_nop(batch);
for (size_t i = 0; i < batch->used_scans; ++i) { for (size_t i = 0; i < batch->used_scans; ++i) {
@ -60,7 +60,7 @@ int riscv_batch_run(struct riscv_batch *batch)
jtag_add_runtest(batch->idle_count, TAP_IDLE); jtag_add_runtest(batch->idle_count, TAP_IDLE);
} }
LOG_DEBUG("executing queue"); LOG_DEBUG_IO("executing queue");
if (jtag_execute_queue() != ERROR_OK) { if (jtag_execute_queue() != ERROR_OK) {
LOG_ERROR("Unable to execute JTAG queue"); LOG_ERROR("Unable to execute JTAG queue");
return ERROR_FAIL; return ERROR_FAIL;
@ -102,7 +102,7 @@ size_t riscv_batch_add_dmi_read(struct riscv_batch *batch, unsigned address)
riscv_batch_add_nop(batch); riscv_batch_add_nop(batch);
batch->read_keys[batch->read_keys_used] = batch->used_scans - 1; batch->read_keys[batch->read_keys_used] = batch->used_scans - 1;
LOG_DEBUG("read key %u for batch 0x%p is %u (0x%p)", LOG_DEBUG_IO("read key %u for batch 0x%p is %u (0x%p)",
(unsigned) batch->read_keys_used, batch, (unsigned) (batch->used_scans - 1), (unsigned) batch->read_keys_used, batch, (unsigned) (batch->used_scans - 1),
batch->data_in + sizeof(uint64_t) * (batch->used_scans + 1)); batch->data_in + sizeof(uint64_t) * (batch->used_scans + 1));
return batch->read_keys_used++; return batch->read_keys_used++;
@ -135,7 +135,7 @@ void riscv_batch_add_nop(struct riscv_batch *batch)
riscv_fill_dmi_nop_u64(batch->target, (char *)field->in_value); riscv_fill_dmi_nop_u64(batch->target, (char *)field->in_value);
batch->last_scan = RISCV_SCAN_TYPE_NOP; batch->last_scan = RISCV_SCAN_TYPE_NOP;
batch->used_scans++; batch->used_scans++;
LOG_DEBUG(" added NOP with in_value=0x%p", field->in_value); LOG_DEBUG_IO(" added NOP with in_value=0x%p", field->in_value);
} }
void dump_field(const struct scan_field *field) void dump_field(const struct scan_field *field)
@ -143,7 +143,7 @@ void dump_field(const struct scan_field *field)
static const char * const op_string[] = {"-", "r", "w", "?"}; static const char * const op_string[] = {"-", "r", "w", "?"};
static const char * const status_string[] = {"+", "?", "F", "b"}; static const char * const status_string[] = {"+", "?", "F", "b"};
if (debug_level < LOG_LVL_DEBUG) if (debug_level < LOG_LVL_DEBUG_IO)
return; return;
assert(field->out_value != NULL); assert(field->out_value != NULL);
@ -158,14 +158,14 @@ void dump_field(const struct scan_field *field)
unsigned int in_data = get_field(in, DTM_DMI_DATA); unsigned int in_data = get_field(in, DTM_DMI_DATA);
unsigned int in_address = in >> DTM_DMI_ADDRESS_OFFSET; unsigned int in_address = in >> DTM_DMI_ADDRESS_OFFSET;
log_printf_lf(LOG_LVL_DEBUG, log_printf_lf(LOG_LVL_DEBUG_IO,
__FILE__, __LINE__, __PRETTY_FUNCTION__, __FILE__, __LINE__, __PRETTY_FUNCTION__,
"%db %s %08x @%02x -> %s %08x @%02x", "%db %s %08x @%02x -> %s %08x @%02x",
field->num_bits, field->num_bits,
op_string[out_op], out_data, out_address, op_string[out_op], out_data, out_address,
status_string[in_op], in_data, in_address); status_string[in_op], in_data, in_address);
} else { } else {
log_printf_lf(LOG_LVL_DEBUG, log_printf_lf(LOG_LVL_DEBUG_IO,
__FILE__, __LINE__, __PRETTY_FUNCTION__, "%db %s %08x @%02x -> ?", __FILE__, __LINE__, __PRETTY_FUNCTION__, "%db %s %08x @%02x -> ?",
field->num_bits, op_string[out_op], out_data, out_address); field->num_bits, op_string[out_op], out_data, out_address);
} }