Hi!

I've implemented support for multi-TAP scans in 
https://review.openocd.org/c/openocd/+/8504 patch chain.
Please, take a look when you have the time.

While there are no uses of this functionality for now, the second patch in the 
chain https://review.openocd.org/c/openocd/+/8505 adds a TCL interface to such 
scans.

The motivation is:

  *   Imagine you have a number of cores, each core is behind a separate JTAG 
TAP (the TAPs are in the same chain though)
  *   Now you want to perform an action on all these cores as simultaneous as 
possible. E.g. you are debugging a multi-core application and want to resume or 
halt all the cores at once.
  *   Accessing a TAP at a time will result in a delay between resume requests 
arriving to the TAPs on the order of microsecond (assuming TCK clock is a 
couple of MHz and you need to transfer some number of bits to request the 
resume). This delay is prohibitively large and such a resume can hardly be 
named "simultenious".
  *   Alternative approach would be to select the IR on all the TAPs and shift 
the required value into DRs of all the TAPs. Now, once TMS changes and Update 
DR state is entered, the resume request will be sent to all the TAPs at once 
without any delay.

Example (2 TAPs):

Current workflow:

  1.  Scan IR: TAP0.IR := ACTIVE, TAP1.IR := BYPASS
  2.  Scan DR: TAP0.DR := <some resume request value>,  TAP1.DR := <a single 
irrelevant bit>
  3.  Exiting Scan DR a resume request is sent for Core0
  4.  Scan IR: TAP0.IR := BYPASS, TAP1.IR := ACTIVE
  5.  Scan DR: TAP0.DR := <a single irrelevant bit>, TAP0.DR := <some resume 
request value>
  6.  Exiting Scan DR a resume request is sent for Core1

Workflow made possible by multi-TAP scans:

  1.  Scan IR: TAP0.IR := ACTIVE, TAP1.IR := ACTIVE
  2.  Scan DR: TAP0.DR := <some resume request value>,  TAP1.DR := <some resume 
request value>
  3.  Exiting Scan DR a resume request is sent for both Core0 and Core1.


Reply via email to