Bitstream structure — XC9500
On a high level, the whole bitstream is split into “areas”. Each FB
of the device corresponds two areas, one of which contains the UIM wire-AND
configuration, and the other (main area) contains everything else.
The main area of a FB is made of 72 “rows”. Each row is made of 15 “columns”.
Each column is made of 6 or 8 bits: columns 0-8 are made of 8 bits, while
columns 9-14 are made of 6 bits.
The low 6 bits of every column are used to store product term masks, and
the high 2 bits of columns 0-8 are used to store everything else.
The UIM wire-AND area of a FB is, in turn, made of “subareas”, one for each
FB of the device. Each subarea is in turn made of 18 rows. Each row
is made of 5 columns. Column 0 is made of 8 bits, while columns 1-4 are made
of 7 bits, making for 36 total bits per row.
When programmed or read via JTAG, the bitstream is transmitted as bytes,
which are 6-8 bits long. Each byte of the bitstream has its address.
Not all addresses are valid, and valid addresses are not contiguous.
Address is 17 bits long, and is split to several fields:
The unprogrammed state of a bit on XC9500 is 1
.
The programmed state is 0
. Thus, whenever a boolean fuse is mentioned
in the documentation, the “true” value is actually represented as 0
in the bitstream. This includes the USERCODE bits.
Fuses — product terms
The product term masks are stored in bits 0-5 of every column and every row of the main area.
The formulas are as follows:
FB[i].MC[j].PT[k].IM[l].P
is stored at:
row: l * 2 + 1
column: k + (j % 3) * 5
bit: j // 3
FB[i].MC[j].PT[k].IM[l].N
is stored at:
row: l * 2
column: k + (j % 3) * 5
bit: j // 3
Fuses — macrocells
Per-MC config fuses (that are not product term masks) are stored in bits 6-7 of
columns 0-8 of rows 12-54 of the main area. The formulas are as follows:
PT[0].ALLOC | [0, 13, 0] | [0, 12, 0] |
NONE | 1 | 1 |
SUM | 1 | 0 |
EXPORT | 0 | 1 |
SPECIAL | 0 | 0 |
PT[1].ALLOC | [0, 15, 0] | [0, 14, 0] |
NONE | 1 | 1 |
SUM | 1 | 0 |
EXPORT | 0 | 1 |
SPECIAL | 0 | 0 |
PT[2].ALLOC | [0, 17, 0] | [0, 16, 0] |
NONE | 1 | 1 |
SUM | 1 | 0 |
EXPORT | 0 | 1 |
SPECIAL | 0 | 0 |
PT[3].ALLOC | [0, 19, 0] | [0, 18, 0] |
NONE | 1 | 1 |
SUM | 1 | 0 |
EXPORT | 0 | 1 |
SPECIAL | 0 | 0 |
PT[4].ALLOC | [0, 21, 0] | [0, 20, 0] |
NONE | 1 | 1 |
SUM | 1 | 0 |
EXPORT | 0 | 1 |
SPECIAL | 0 | 0 |
INV | [0, 22, 0] |
Inverted | ~[0] |
IMPORT_UP_ALLOC | [0, 23, 0] |
EXPORT | 1 |
SUM | 0 |
IMPORT_DOWN_ALLOC | [0, 24, 0] |
EXPORT | 1 |
SUM | 0 |
EXPORT_CHAIN_DIR | [0, 25, 0] |
UP | 1 |
DOWN | 0 |
SUM_HP | [0, 26, 0] |
Inverted | ~[0] |
IOB_OE_MUX | [0, 28, 0] | [0, 27, 0] |
GND | 1 | 1 |
OE_MUX | 1 | 0 |
VCC | 0 | 1 |
OE_MUX | [0, 31, 0] | [0, 30, 0] | [0, 29, 0] |
PT | 1 | 1 | 1 |
FOE0 | 1 | 1 | 0 |
FOE1 | 1 | 0 | 1 |
FOE2 | 1 | 0 | 0 |
FOE3 | 0 | 1 | 1 |
OUT_MUX | [0, 35, 0] |
FF | 1 |
COMB | 0 |
CLK_MUX | [0, 37, 0] | [0, 36, 0] |
FCLK1 | 1 | 1 |
FCLK2 | 1 | 0 |
FCLK0 | 0 | 1 |
PT | 0 | 0 |
REG_MODE | [0, 40, 0] |
DFF | 1 |
TFF | 0 |
RST_MUX | [0, 41, 0] |
PT | 1 |
FSR | 0 |
SET_MUX | [0, 42, 0] |
PT | 1 |
FSR | 0 |
REG_INIT | [0, 43, 0] |
Inverted | ~[0] |
UIM_OE_MUX | [0, 45, 0] | [0, 44, 0] |
OE_MUX | 1 | 1 |
GND | 1 | 0 |
VCC | 0 | 1 |
UIM_OUT_INV | [0, 46, 0] |
Inverted | ~[0] |
IOB_GND | [0, 48, 0] |
Inverted | ~[0] |
IOB_SLEW | [0, 49, 0] |
SLOW | 1 |
FAST | 0 |
PT[0].HP | [0, 50, 0] |
Inverted | ~[0] |
PT[1].HP | [0, 51, 0] |
Inverted | ~[0] |
PT[2].HP | [0, 52, 0] |
Inverted | ~[0] |
PT[3].HP | [0, 53, 0] |
Inverted | ~[0] |
PT[4].HP | [0, 54, 0] |
Inverted | ~[0] |
Fuses — per-FB bits and globals
Per-FB bits are stored in rows 67-68, columns 0-8, bits 6-7. The bits are (row, bit, column):
Row | Bit, column |
6 | 7 |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
11 |
- | - | - | X | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
67 |
X | X | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
68 |
X | - | - | X | - | - | X | - | - | - | - | - | - | - | - | - | - | - |
READ_PROT_A | [0, 11, 3] |
Inverted | ~[0] |
ENABLE | [0, 67, 0] |
Inverted | ~[0] |
EXPORT_ENABLE | [0, 67, 1] |
Inverted | ~[0] |
WRITE_PROT | [0, 68, 0] |
Inverted | ~[0] |
READ_PROT_B | [0, 68, 3] |
Inverted | ~[0] |
PULLUP_DISABLE | [0, 68, 6] |
Inverted | ~[0] |
Global bits are stored in rows (0, 3, 4, 6, 7), columns 0-8, bits 6-7 of FB 0. The bits are (fb, row, bit, column):
FSR_INV | [0, 0, 1] |
Inverted | ~[0] |
FCLK0_INV | [0, 0, 2] |
Inverted | ~[0] |
FCLK1_INV | [0, 0, 3] |
Inverted | ~[0] |
FCLK2_INV | [0, 0, 4] |
Inverted | ~[0] |
FOE0_INV | [0, 0, 5] |
Inverted | ~[0] |
FOE1_INV | [0, 0, 6] |
Inverted | ~[0] |
FOE2_INV | [0, 0, 7] |
Inverted | ~[0] |
FOE3_INV | [0, 0, 8] |
Inverted | ~[0] |
FCLK0_MUX | [0, 4, 2] | [0, 3, 2] |
NONE | 1 | 1 |
GCLK0 | 1 | 0 |
GCLK1 | 0 | 1 |
FCLK1_MUX | [0, 4, 3] | [0, 3, 3] |
NONE | 1 | 1 |
GCLK1 | 1 | 0 |
GCLK2 | 0 | 1 |
FCLK2_MUX | [0, 4, 4] | [0, 3, 4] |
NONE | 1 | 1 |
GCLK2 | 1 | 0 |
GCLK0 | 0 | 1 |
FOE0_MUX.LARGE | [0, 4, 5] | [0, 3, 5] |
NONE | 1 | 1 |
GOE0 | 1 | 0 |
GOE1 | 0 | 1 |
FOE0_MUX.SMALL | [0, 4, 5] | [0, 3, 5] |
NONE | 1 | 1 |
GOE0 | 1 | 0 |
GOE1 | 0 | 1 |
FOE1_MUX.LARGE | [0, 4, 6] | [0, 3, 6] |
NONE | 1 | 1 |
GOE1 | 1 | 0 |
GOE2 | 0 | 1 |
FOE1_MUX.SMALL | [0, 4, 6] | [0, 3, 6] |
NONE | 1 | 1 |
GOE1 | 1 | 0 |
GOE0 | 0 | 1 |
FOE2_MUX.LARGE | [0, 4, 7] | [0, 3, 7] |
NONE | 1 | 1 |
GOE2 | 1 | 0 |
GOE3 | 0 | 1 |
FOE3_MUX.LARGE | [0, 4, 8] | [0, 3, 8] |
NONE | 1 | 1 |
GOE3 | 1 | 0 |
GOE0 | 0 | 1 |
USERCODE | [0, 6, 9] | [0, 6, 0] | [0, 6, 10] | [0, 6, 1] | [0, 6, 11] | [0, 6, 2] | [0, 6, 12] | [0, 6, 3] | [0, 6, 13] | [0, 6, 4] | [0, 6, 14] | [0, 6, 5] | [0, 6, 15] | [0, 6, 6] | [0, 6, 16] | [0, 6, 7] | [0, 7, 9] | [0, 7, 0] | [0, 7, 10] | [0, 7, 1] | [0, 7, 11] | [0, 7, 2] | [0, 7, 12] | [0, 7, 3] | [0, 7, 13] | [0, 7, 4] | [0, 7, 14] | [0, 7, 5] | [0, 7, 15] | [0, 7, 6] | [0, 7, 16] | [0, 7, 7] |
Inverted | ~[31] | ~[30] | ~[29] | ~[28] | ~[27] | ~[26] | ~[25] | ~[24] | ~[23] | ~[22] | ~[21] | ~[20] | ~[19] | ~[18] | ~[17] | ~[16] | ~[15] | ~[14] | ~[13] | ~[12] | ~[11] | ~[10] | ~[9] | ~[8] | ~[7] | ~[6] | ~[5] | ~[4] | ~[3] | ~[2] | ~[1] | ~[0] |
Fuses — UIM wire-AND
The FB[i].IM[j].UIM.FB[k].MC[l]
fuse is stored at:
subarea: k
row: l
column: j % 5
bit: j // 5