|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectztex.ConfigData
public class ConfigData
This class represents the configuration data space of ZTEX FPGA Boards that support it. The internal format is
<Address> <Description> 0..2 Signature "CD0" 3 Kind of FPGA Board, seeboardNames
, e.g. 2 for "ZTEX USB-FPGA Module", 4 FPGA Board series, e.g. 2 5 FPGA Board number (number behind the dot), e.g. 16 6..7 FPGA Board variant (letter), e.g. "b" 8..9 FPGA, seefpgas
, e.g. 12 for X7A200T 10 FPGA package, seepackages
, e.g. 3 for FBG484 11..13 Speed grade + temperature range, e.g. "2C" 14 RAM size, format is ( n & 0xf0 ) << ( (n & 0xf) + 16 ) bytes 15 RAM type, seeramTypes
16..25 Serial number, overwrites SN_STRING of the ZTEX descriptor. If it is equal to "0000000000" (default) it is replaced by the unique MAC address. 26..27 Actual size of Bitstream in 4K sectors; 0 means Bitstream disabled (default) 28..29 Maximum size of Bitstream in 4K sectors; 0 means that either no Flash is present or that this information is stored in Flash (exchangeable media) 30..79 Reserved 80..127 48 bytes user space
Field Summary | |
---|---|
static java.lang.String[] |
boardNames
Kinds of FPGA Boards. |
static java.lang.String[] |
fpgas
FPGA's used on ZTEX FPGA Boards. |
static java.lang.String[] |
packages
FPGA packages used on ZTEX FPGA boards. |
static java.lang.String[] |
ramTypes
RAM types and speed used on ZTEX FPGA boards. |
Constructor Summary | |
---|---|
ConfigData()
Constructs an empty instance. |
|
ConfigData(Ztex1v1 z)
Constructs an instance and connects it with z. |
Method Summary | |
---|---|
boolean |
connect(Ztex1v1 z)
Reads the configuration data (if existent) from a device and connects it to this instance. |
byte[] |
data()
Returns a copy of the configuration data array. |
boolean |
disconnect()
Disconnects the currently connected device. |
int |
getBitstreamSize()
Returns actual size of bitstream in bytes sectors. 0 means that no bitstream is stored. |
java.lang.String |
getFpga()
Returns FPGA information. |
int |
getMaxBitstreamSize()
Returns maximum size of bitstream in bytes. |
java.lang.String |
getName()
Returns the name of the FPGA Board. |
int |
getRamSize()
Returns RAM size in bytes. |
java.lang.String |
getRamType()
Returns RAM type and speed. |
java.lang.String |
getSN()
Returns the serial number. |
byte |
getUserData(int i)
Returns user data at index i. |
boolean |
sendtUserData()
Sends the user data to the FPGA Board. |
boolean |
setBitstreamSize(int size)
Sets the actual size of bitstream in bytes. |
void |
setFpga(java.lang.String name,
java.lang.String pckg,
java.lang.String sg)
Sets FPGA information. |
void |
setMaxBitstreamSize(int size4k)
Sets the maximum size of bitstream in 4 KByte sectors. |
void |
setName(java.lang.String kind,
int series,
int number,
java.lang.String variant)
Sets the name of the FPGA Board. |
void |
setRam(int size,
java.lang.String type)
Sets RAM information. |
boolean |
setSN(java.lang.String sn)
Sets the serial number. |
void |
setUserData(int i,
byte v)
Sets user data at index i to value v. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] boardNames
public static final String boardNames[] = {
"(unknown)" , // 0
"ZTEX FPGA Module" , // 1
"ZTEX USB-FPGA Module" // 2
};
public static final java.lang.String[] fpgas
public static final String fpgas[] = {
"(unknown)" , // 0
"XC6SLX9" , // 1
"XC6SLX16" , // 2
"XC6SLX25" , // 3
"XC6SLX45" , // 4
"XC6SLX75" , // 5
"XC6SLX100" , // 6
"XC6SLX150" , // 7
"XC7A35T", // 8
"XC7A50T", // 9
"XC7A75T", // 10
"XC7A100T", // 11
"XC7A200T", // 12
"Quad-XC6SLX150" // 13
};
public static final java.lang.String[] packages
public static final String packages[] = {
"(unknown)", // 0
"FTG256" , // 1 256 balls, 1.0mm
"CSG324" , // 2 324 balls, 0.8mm
"CSG484" , // 3 484 balls, 0.8mm
"FBG484" // 4 484 balls, 1.0mm
};
public static final java.lang.String[] ramTypes
public static final String ramTypes[] = {
"(unknown)", // 0
"DDR-200 SDRAM", // 1
"DDR-266 SDRAM", // 2
"DDR-333 SDRAM", // 3
"DDR-400 SDRAM", // 4
"DDR2-400 SDRAM", // 5
"DDR2-533 SDRAM", // 6
"DDR2-667 SDRAM", // 7
"DDR2-800 SDRAM", // 8
"DDR2-1066 SDRAM" // 9
};
Constructor Detail |
---|
public ConfigData()
public ConfigData(Ztex1v1 z) throws InvalidFirmwareException, UsbException, CapabilityException
connect(Ztex1v1)
.
z
- The ztex device to connect with.
InvalidFirmwareException
- if interface 1 is not supported.
UsbException
- If a communication error occurs.
CapabilityException
- If no MAC-EEPROM support is present.Method Detail |
---|
public boolean connect(Ztex1v1 z) throws InvalidFirmwareException, UsbException, CapabilityException
z
- The ztex device to connect with.
InvalidFirmwareException
- If interface 1 is not supported.
UsbException
- If a communication error occurs.
CapabilityException
- If no MAC-EEPROM support is present.public boolean disconnect()
public byte[] data()
public java.lang.String getName()
public void setName(java.lang.String kind, int series, int number, java.lang.String variant)
setName("ZTEX USB-FPGA Module", 2, 16, "b"); // denotes "ZTEX USB-FPGA Module 2.16b"This setting is not transferred to the FPGA Board because is should not be altered by the user.
kind
- Kind of FPGA Board, see boardNames
for possible values, e.g. "ZTEX USB-FPGA Module"series
- FPGA Board series, e.g. 2number
- FPGA Board number (number behind the dot), e.g. 16variant
- FPGA Board variant (letter), e.g. "b"public java.lang.String getFpga()
public void setFpga(java.lang.String name, java.lang.String pckg, java.lang.String sg)
setFpga("XC7A200T", "FBG484", "2C"); // denotes Xilinx part number XC7A200T-2FBG484CThis setting is not transferred to the FPGA Board because is should not be altered by the user.
name
- Name of the FPGA, see fpgas
for possible values, e.g. "XC7A200T"pckg
- FPGA package, see packages
for possible values, e.g. "FBG484"sg
- Speed grade and temperature range, e.g. "2C"public java.lang.String getRamType()
public int getRamSize()
public void setRam(int size, java.lang.String type)
setRam(128, "DDR2-800 SDRAM"); // sets RAM info to 128 MB DDR2-800 SDRAMThis setting is not transferred to the FPGA Board because is should not be altered by the user.
size
- RAM size in MBytes, e.g. 128type
- RAM type and speed, see ramTypes
for possible values, e.g. "DDR2-800 SDRAM"public int getMaxBitstreamSize()
public void setMaxBitstreamSize(int size4k)
size4k
- Maximum size of bitstream in 4 KByte sectors. E.g. a value of 256 reserves 1 MByte for the bitstream.public int getBitstreamSize()
public boolean setBitstreamSize(int size) throws InvalidFirmwareException, UsbException, CapabilityException
getMaxBitstreamSize()
).
size
- Actual size of bitstream in bytes.
InvalidFirmwareException
- If interface 1 is not supported.
UsbException
- If a communication error occurs.
CapabilityException
- If no MAC-EEPROM support is present.public java.lang.String getSN()
setSN(String)
public boolean setSN(java.lang.String sn) throws InvalidFirmwareException, UsbException, CapabilityException
ZtexDevice1
) by this value.
If it is equal to "0000000000" (default) it is replaced by the unique MAC address. This setting is transferred to the FPGA Board. Change takes effect after the next restart of the firmware.
sn
- Serial number string. Only the first 10 characters are considered.
InvalidFirmwareException
- If interface 1 is not supported.
UsbException
- If a communication error occurs.
CapabilityException
- If no MAC-EEPROM support is present.public byte getUserData(int i)
i
- the index. Valid values are 0 to 47.
java.lang.IndexOutOfBoundsException
- If i is smaller than 0 or greater than 47.public void setUserData(int i, byte v) throws java.lang.IndexOutOfBoundsException
getMaxBitstreamSize()
to transfer the data to the FPGA Board.
i
- The index. Valid values are 0 to 47.v
- The value.
java.lang.IndexOutOfBoundsException
- If i is smaller than 0 or greater than 47.public boolean sendtUserData() throws InvalidFirmwareException, UsbException, CapabilityException
InvalidFirmwareException
- If interface 1 is not supported.
UsbException
- If a communication error occurs.
CapabilityException
- If no MAC-EEPROM support is present.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |