On Monday 01 June 2009, Duane Ellis wrote:
> someone asked>>  [something like:  But what would a TCL user expect].
> 
> Hmm,
> 
> What does not happen to day, is the ability to "scan out" data bits and 
> capture them in TCL.

Hmm?  I thought I saw code returning the captured value of the
data register ... is that not complete?  Or did I imagine it?

What I didn't see was doing that for the *instruction* register.


> I think the following would be helpful
> 
> # Goto this state by any means desired, via any random path, really only 
> good for RESET
>    jtag gotostate  STATENAME

If it's only good for RESET, shouldn't one of the reset primitives
handle this?  (Maybe a new one?)  And guarantee all the relevant
state transition hooks fire, as Øyvind mentioned earlier.


> # Goto next state, must be exactly 1 clock/tms step away, can list 
> multiple states
>    jtag nextstate STATENAME  [... more STATENAMEs]

That is, just give a state path?  So for example part of a
Zero-Bit Scan (ZBS) would be:

        jtag nextstate DRSELECT DRCAPTURE DREXIT1 DRUPDATE

I'd think that the rule I mentioned before -- about always
needing to end in a non-SHIFT (and, per Øyvind, non-RESET)
stable state -- should apply here too.  (UPDATE:  Hmm, not
if you're proposing an entirely queued interface.  If the
"nextstate" thing were immediate, it would apply.)
        

> # Tell this tap to do a specific scan type
> #  Tapstate must be CAPTUREDR or CAPTUREIR otherwise error
>    jtag  scan -type DR|IR   -bitlen NBITS -iarray  ARRAYNAME  -oarray 
> ARRAYNAME -endstate NAME

Hmm, now you're getting into rewriting the entire set of lowlevel
JTAG calls.  :)
 

> # Simplistic "ir scans" - of only a few bits
>    jtag  scan  -type IR   -bitlen  5  -value VALUE
> 
> # Run clocks in RESET,  IRPAUSE, DRPAUSE, or IDLE/RUN state
>     jtag  idleclocsk NCLOCKS
> 
> # Finally,
>     jtag execute

AH!!  This batched model I think I like.  Though I think I'd
package it differently, and in a more TCLish way.

Instead of queueing a bunch of JTAG operations *inside* the
OpenOCD engine ... have a array representation of them, which
can be saved and then interpreted by "jtag execute $saved".



> # NOTE: The above commands are "global"
> #   and do not account for any tap in bypass, their view is
> #   effectively at the end of the dongle cable.
> 
> # Wiggle "TRST" and/or SRST pins
>    jtag set TRST  0
>    jtag set TRST  1
>    jtag set SRST  0
>    jtag set SRST  1
> 
> Examples
> 
>     jtag set TRST 0
>     jtag set SRST 0
>     sleep 500
>     jtag set TRST 1
>     jtag set SRST 1

All that stuff is doable with current interfaces.


>     jtag   gotostate  RESET
>     jtag   gotostate SHIFTIR
> # ? not sure here, the idea is to put  the 5 bit value 0x0c in the IR 
> register
>     jtag   scan -type IR -bitlen 5 -value 0x0c -endstate EXITIR
> 
> # Scan out, 35 bits into MYBITS - with, TDI = 1 during the shift.
>     jtag  gotostate CAPTUREDR
>     jtag scan -type DR -bitlen  35 -tdi 1 -oarray MYBITS  -endstate EXITDR

Ditto, I think.  But -- no "jtag execute"?


> 
> ==
> -Duane
> ==
> 
> 
> 
> 
> 


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to