On Thu, Jun 3, 2021 at 4:05 AM Ooi, Cinly <cinly....@intel.com> wrote:
> My question is, in riscv_batch_add_dmi_write() [batch.c:116], at > > > batch:c124: riscv_fill_dmi_nop_u64(batch->target, (char > *)field->in_value); > > we are actually writing assigning a value to field->in_value. This will > eventually result in DR scan doing a read. > I don't think that is the case. It's simply assigning in_value some known value. Later on in_value will be overwritten with the result from the actual scan. The simplest way to see this is to see that in riscv_batch_run() there will be one DMI scan for each batch->used_scans. In riscv_batch_add_dmi_write() batch->used_scans is incremented once, as expected. There are probably some ways to optimize memory writing, but the inner loop of write_memory_progbuf() scans no more bits than necessary. Tim >