Package cbsw
Class TapBuilder
- java.lang.Object
-
- cbsw.TapBuilder
-
public class TapBuilder extends java.lang.ObjectA utility to build bit sequences for a JTAG TAP
-
-
Constructor Summary
Constructors Constructor Description TapBuilder(int cl, int pos)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the TMS, TDO and MASK sequencesvoidclock(int clocks)Insert extra clocks with TMS 0 (can be 0)voiddr(java.lang.String tdoData, boolean rti)DR scan StringBuffer buildervoidir(java.lang.String ircode, boolean rti)IR scan StringBuffer builderintlength()Returns the length of the sequencevoidrti(int clocks)Move from anywhere to RTIvoidsetDebug(boolean dbg)Sets the debug flagvoidsetTapLength(int cl)Sets the TAP lengthvoidsetTapPosition(int pos)Sets the TAP positionvoidshow()Displays the TMS, TDO and MASK sequences on System.errjava.nio.ByteBuffertdoMaskToByteBuffer()Converts MASK to ByteBufferjava.nio.ByteBuffertdoToByteBuffer()Converts TDO to ByteBufferjava.nio.ByteBuffertmsTdoToByteBuffer()Converts TMS/TDO pairs to ByteBuffer (useful for DJTG API)java.nio.ByteBuffertmsToByteBuffer()Convert TMS to ByteBufferjava.nio.ByteBuffertoByteBuffer(java.lang.StringBuilder sb)Converts StringBuilder to ByteBuffer
-
-
-
Method Detail
-
setTapLength
public void setTapLength(int cl)
Sets the TAP length
- Parameters:
cl- The TAP length (number of devices)
-
setTapPosition
public void setTapPosition(int pos)
Sets the TAP position
- Parameters:
pos- The position on the TAP of the target device
-
setDebug
public void setDebug(boolean dbg)
Sets the debug flag
- Parameters:
dbg- true=Enable debug
-
length
public int length()
Returns the length of the sequence
- Returns:
- The length (-1 on error)
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer(java.lang.StringBuilder sb)
Converts StringBuilder to ByteBuffer
- Parameters:
sb- The StringBuilder- Returns:
- The ByteBuffer
-
tdoMaskToByteBuffer
public java.nio.ByteBuffer tdoMaskToByteBuffer()
Converts MASK to ByteBuffer
- Returns:
- The ByteBuffer
-
tdoToByteBuffer
public java.nio.ByteBuffer tdoToByteBuffer()
Converts TDO to ByteBuffer
- Returns:
- The ByteBuffer
-
tmsToByteBuffer
public java.nio.ByteBuffer tmsToByteBuffer()
Convert TMS to ByteBuffer
- Returns:
- The ByteBuffer
-
tmsTdoToByteBuffer
public java.nio.ByteBuffer tmsTdoToByteBuffer()
Converts TMS/TDO pairs to ByteBuffer (useful for DJTG API)
- Returns:
- The ByteBuffer
-
clear
public void clear()
Clears the TMS, TDO and MASK sequences
-
show
public void show()
Displays the TMS, TDO and MASK sequences on System.err
-
ir
public void ir(java.lang.String ircode, boolean rti)IR scan StringBuffer builder
Insert sequence to do IR scan.
Valid from UPDATE-IR, UPDATE-DR or RTI
- Parameters:
ircode- The instruction coderti- If true, insert transitions to RTI
-
dr
public void dr(java.lang.String tdoData, boolean rti)DR scan StringBuffer builder
Insert sequence to do DR scan.
Valid from UPDATE-IR, UPDATE-DR or RTI
- Parameters:
tdoData- The datarti- If true, insert transitions to RTI
-
rti
public void rti(int clocks)
Move from anywhere to RTI
Stay there for the requested extra number of clocks (can be 0).
- Parameters:
clocks- Number of clocks while in RTI
-
clock
public void clock(int clocks)
Insert extra clocks with TMS 0 (can be 0)
- Parameters:
clocks- Number of clocks to insert
-
-