Class XilinxDjtg
- All Implemented Interfaces:
ActionListener, EventListener
Implements Xilinx FPGA programming and other functionality through the Digilent Adept DJTG interface.
The programming function should work for both Series7 FPGAs and Spartan6 and probably others.
Other functions, such as XADC access is only available on some devices.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enumclass -
Field Summary
FieldsModifier and TypeFieldDescription(package private) JTextField(package private) int(package private) ActionListenerAction Listener for exit menu button(package private) JniAdeptDepp(package private) Preferences(package private) JProgressBar(package private) XilinxDjtg.ProgramThread(package private) JTextField(package private) byte[](package private) TapBuilder(package private) byte[](package private) final int(package private) final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidActionListener to handle panel eventsdna()Gets the device DNAvoidGets the FUSE_DNA (Series 7)getSTAT6()Gets the configuration status register.getSTAT7()Gets the configuration status register.intidcode()Gets the device IDCODEvoidinit()Called to complete initialisation after constructorvoidGets the XSC_DNA (Series 7)voidGets the ISC_DNA (Spartan 6)voidjprogram()Does JPROGRAMvoidDoes JSHUTDOWN followed by clocks in RTIvoidjstart()Does JSTARTstatic voidLaunch the GUImakeMainMenu(String title) Makes the main menu for a GUI panelMakes a GUI panelvoidprefsSetFilename(File file) Updates the configuration file location preferences.voidprogram()Programs the FPGA.voidPrograms the FPGA.voidrti()Moves to the RTI state (from anywhere)s6dna()Gets the device DNA (Spartan6)voidCreates dialog to select the I/O devicevoidsetConnectedDevice(JniAdeptDepp jniAdept) Sets the I/O devicevoidtlr()Moves to the TLR state (from anywhere)byte[]Extracts data from the TDI buffer.shortxadc(int ch) Reads Series 7 XADCdoubleGets raw ADC and convert to degrees C following ug480doublexadcVoltage(int ch) Gets raw ADC and convert to volts following ug480
-
Field Details
-
prefs
Preferences prefs -
jniAdept
JniAdeptDepp jniAdept -
chainPosition
int chainPosition -
pth
-
tap
TapBuilder tap -
statusTF
JTextField statusTF -
binTF
JTextField binTF -
tdi
byte[] tdi -
txPages
final int txPages- See Also:
-
txPageSize
final int txPageSize- See Also:
-
progressBar
JProgressBar progressBar -
swap
byte[] swap -
exitAL
ActionListener exitALAction Listener for exit menu button
-
-
Constructor Details
-
XilinxDjtg
public XilinxDjtg(int chainLength, int chainPosition) Constructor
- Parameters:
chainLength- Chain length (number of devices)chainPosition- Position of target device on chain
-
-
Method Details
-
init
public void init()Called to complete initialisation after constructor
-
setConnectedDevice
Sets the I/O device
- Parameters:
jniAdept- The I/O device
-
setConnectedDevice
public void setConnectedDevice()Creates dialog to select the I/O device
-
makePanel
Makes a GUI panel
Creates a panel to allow interactive execution of JTAG operations.
- Returns:
- The panel
-
getSTAT7
Gets the configuration status register.
- Returns:
- Content of status register (hexadecimal)
-
getSTAT6
Gets the configuration status register.
- Returns:
- Content of status register (hexadecimal)
-
actionPerformed
ActionListener to handle panel events
- Specified by:
actionPerformedin interfaceActionListener- Parameters:
e- The ActionEvent
-
prefsSetFilename
Updates the configuration file location preferences.
- Parameters:
file- The configuration file.
-
unpackData
public byte[] unpackData()Extracts data from the TDI buffer.
- Returns:
- The data array
-
xadc
public short xadc(int ch) Reads Series 7 XADC
The internal ADC channels are (See ug480 for more):
00: Temperature 01: VCCINT 02: VCCAUX- Parameters:
ch- The ADC channel to read- Returns:
- The ADC value
-
xadcTemperature
public double xadcTemperature()Gets raw ADC and convert to degrees C following ug480
- Returns:
- The ADC value
-
xadcVoltage
public double xadcVoltage(int ch) Gets raw ADC and convert to volts following ug480
- Parameters:
ch- The ADC channel- Returns:
- The ADC value
-
idcode
public int idcode()Gets the device IDCODE
- Returns:
- The IDCODE
-
dna
-
s6dna
-
fuseDnaSeries7
public void fuseDnaSeries7()Gets the FUSE_DNA (Series 7)
FUSE_DNA is accessible while the device is running
-
iscDnaSeries7
public void iscDnaSeries7()Gets the XSC_DNA (Series 7)
XSC_DNA (0x17) requires that ISC_ENABLE (0x10) is loaded first. Follow with ISC_DISABLE (0x16)
-
iscDnaSpartan6
public void iscDnaSpartan6()Gets the ISC_DNA (Spartan 6)
ISC_DNA (0x30) requires that ISC_ENABLE (0x10) is loaded first. Follow with ISC_DISABLE (0x16)
-
jstart
public void jstart()Does JSTART
-
tlr
public void tlr()Moves to the TLR state (from anywhere)
TMS: 5 or more 1's take us to TLR
-
rti
public void rti()Moves to the RTI state (from anywhere)
TMS: 5 or more 1's take us to TLR then 0 to go to RTI
-
jshutdown
public void jshutdown()Does JSHUTDOWN followed by clocks in RTI
Series7 requires >12 clocks to complete shutdown
Spartan6 requires 24 clocks to complete shutdown
-
jprogram
public void jprogram()Does JPROGRAM
-
program
public void program()Programs the FPGA.
-
program
Programs the FPGA.
The CFG_IN data are shifted MSB first while instructions are LSB first.
- Parameters:
binFileName- File name path of bin configuration.
-
makeMainMenu
-
main
-