Package cbsw
Class TapBuilder
- java.lang.Object
-
- cbsw.TapBuilder
-
public class TapBuilder extends java.lang.Object
A 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 void
clear()
Clears the TMS, TDO and MASK sequencesvoid
clock(int clocks)
Insert extra clocks with TMS 0 (can be 0)void
dr(java.lang.String tdoData, boolean rti)
DR scan StringBuffer buildervoid
ir(java.lang.String ircode, boolean rti)
IR scan StringBuffer builderint
length()
Returns the length of the sequencevoid
rti(int clocks)
Move from anywhere to RTIvoid
setDebug(boolean dbg)
Sets the debug flagvoid
setTapLength(int cl)
Sets the TAP lengthvoid
setTapPosition(int pos)
Sets the TAP positionvoid
show()
Displays the TMS, TDO and MASK sequences on System.errjava.nio.ByteBuffer
tdoMaskToByteBuffer()
Converts MASK to ByteBufferjava.nio.ByteBuffer
tdoToByteBuffer()
Converts TDO to ByteBufferjava.nio.ByteBuffer
tmsTdoToByteBuffer()
Converts TMS/TDO pairs to ByteBuffer (useful for DJTG API)java.nio.ByteBuffer
tmsToByteBuffer()
Convert TMS to ByteBufferjava.nio.ByteBuffer
toByteBuffer(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
-
-