10-14-2014 11:45 PM
Hi, there,
I made a design with XC6S75. Now I am going to usethe AES encrypting the code.
Doing following steps, the FLASH couldn't be programed:
1) Ticked the check box in Encrypt Bitsteam option.
2) Select eFUSE to store the AES key
3 ) Enter 64 charachters hexdecimal value
4) Specifies the nameof the input encryption file (.nky)
5) Leave the AES initial vector to be blank
6) Generate BitStream file (.bit)
5) Generate the PROM file (.MSC)
8) Using iMPACT and USB Cable, program the eFUSE with the .nky file generated before
9) Program the FLASH with the MCS file generated before.
10)iMPACT prompted that the program process failed.
after this, repeated above steps, program failed again. But the non-encrypted bitstream still works on the board.
BTW, The ISE version was Webpack 14.7, the Cable was USB platform.(not USB-II platform).
Anybody can help?
Thanks,
Wang
10-15-2014 10:11 PM
Hi,
The EFUSE register is one time programmable.
When you are trying to program the flash from the FPGA using indirect programming, .COR file is programmed into the FPGA. Since you already have the EFUSE registers programmed on the fpga, it will accept only the encrypted bitstream. Probably that is the reason you are not able to program the FLASH.
Please paste the error that you are getting while trying to program the FLASH.
10-16-2014 10:32 AM
> it will accept only the encrypted bitstream.
This is incorrect. There is an option to enable AES only encrypted bitstreams, but this is not the default and the OP specifically stated that they were able to program the device with an unencrypted bitstream so the bit has not been set.
> 10)iMPACT prompted that the program process failed.
Please post the log file that shows the failure. Be very careful to not disclose the 64-bit AES key when you post this.
10-29-2014 06:34 PM
Sorry replying so late, I was on a trip. Just tried to program the flash again, and it prompted "Program Faild" as before. the log file attached bellow:
Welcome to iMPACT
iMPACT Version: 13.2
GUI --- Auto connect to cable...
// *** BATCH CMD : setCable -port auto
AutoDetecting cable. Please wait.
PROGRESS_START - Starting Operation.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
Driver file xusbdfwu.sys found.
Driver version: src=1027, dest=1027.
Driver windrvr6.sys version = 10.2.1.0. WinDriver v10.21 Jungo (c) 1997 - 2010 Build Date: Aug 31 2010 X86 32bit SYS 14:35:41, version = 1021.
Cable PID = 0008.
Max current requested during enumeration is 74 mA.
Type = 0x0004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 1303.
File version of D:/Xilinx/13.2/ISE_DS/ISE/data/xusb_xlp.hex = 1303.
Firmware hex file version = 1303.
PLD file version = 0012h.
PLD version = 0012h.
PROGRESS_END - End Operation.
Elapsed time = 1 sec.
Type = 0x0004.
ESN device is not available for this cable.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 2014-10-30 9:09:21
// *** BATCH CMD : Identify -inferir
PROGRESS_START - Starting Operation.
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xc6slx75, Version : 2
INFO:iMPACT:1777 -
Reading D:/Xilinx/13.2/ISE_DS/ISE/spartan6/data/xc6slx75.bsd...
INFO:iMPACT:501 - '1': Added Device xc6slx75 successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
// *** BATCH CMD : identifyMPM
Selected part: M25P32
// *** BATCH CMD : attachflash -position 1 -spi "M25P32"
Unprotect sectors: FALSE
// *** BATCH CMD : assignfiletoattachedflash -position 1 -file "D:/Dual_AVR/Verilog/DualAverager_19/DualAverager.mcs"
INFO:iMPACT - Current time: 2014-10-30 9:10:31
// *** BATCH CMD : Program -p 1 -dataWidth 1 -spionly -e -v -loadfpga
PROGRESS_START - Starting Operation.
Maximum TCK operating frequency for this device chain: 25000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': SPI access core not detected. SPI access core will be downloaded to the device to enable operations.
INFO:iMPACT - Downloading core file D:/Xilinx/13.2/ISE_DS/ISE/spartan6/data/xc6slx75_spi.cor.
'1': Downloading core...
LCK_cycle = NoWait.
LCK cycle: NoWait
done.
'1': Reading status register contents...
INFO:iMPACT:2219 - Status register values:
INFO:iMPACT - 0011 1100 1110 1100
INFO:iMPACT:2492 - '1': Completed downloading core to device.
'1': IDCODE is '202016' (in hex).
'1': ID Check passed.
'1': IDCODE is '202016' (in hex).
'1': ID Check passed.
'1': Erasing Device.
'1': Using Sector Erase.
'1': Programming Flash.
'1': Reading device contents...
done.
'1': Verification completed.
'1':Programming in x1 mode.
'1': Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings.
INFO:iMPACT - '1': Flash was not programmed successfully.
PROGRESS_END - End Operation.
Elapsed time = 424 sec.
10-29-2014 06:35 PM
Sorry replying so late, I was on a trip. Just tried to program the flash again, and it prompted "Program Faild" as before. the log file attached bellow:
Welcome to iMPACT
iMPACT Version: 13.2
GUI --- Auto connect to cable...
// *** BATCH CMD : setCable -port auto
AutoDetecting cable. Please wait.
PROGRESS_START - Starting Operation.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
Driver file xusbdfwu.sys found.
Driver version: src=1027, dest=1027.
Driver windrvr6.sys version = 10.2.1.0. WinDriver v10.21 Jungo (c) 1997 - 2010 Build Date: Aug 31 2010 X86 32bit SYS 14:35:41, version = 1021.
Cable PID = 0008.
Max current requested during enumeration is 74 mA.
Type = 0x0004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 1303.
File version of D:/Xilinx/13.2/ISE_DS/ISE/data/xusb_xlp.hex = 1303.
Firmware hex file version = 1303.
PLD file version = 0012h.
PLD version = 0012h.
PROGRESS_END - End Operation.
Elapsed time = 1 sec.
Type = 0x0004.
ESN device is not available for this cable.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 2014-10-30 9:09:21
// *** BATCH CMD : Identify -inferir
PROGRESS_START - Starting Operation.
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xc6slx75, Version : 2
INFO:iMPACT:1777 -
Reading D:/Xilinx/13.2/ISE_DS/ISE/spartan6/data/xc6slx75.bsd...
INFO:iMPACT:501 - '1': Added Device xc6slx75 successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
// *** BATCH CMD : identifyMPM
Selected part: M25P32
// *** BATCH CMD : attachflash -position 1 -spi "M25P32"
Unprotect sectors: FALSE
// *** BATCH CMD : assignfiletoattachedflash -position 1 -file "D:/Dual_AVR/Verilog/DualAverager_19/DualAverager.mcs"
INFO:iMPACT - Current time: 2014-10-30 9:10:31
// *** BATCH CMD : Program -p 1 -dataWidth 1 -spionly -e -v -loadfpga
PROGRESS_START - Starting Operation.
Maximum TCK operating frequency for this device chain: 25000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': SPI access core not detected. SPI access core will be downloaded to the device to enable operations.
INFO:iMPACT - Downloading core file D:/Xilinx/13.2/ISE_DS/ISE/spartan6/data/xc6slx75_spi.cor.
'1': Downloading core...
LCK_cycle = NoWait.
LCK cycle: NoWait
done.
'1': Reading status register contents...
INFO:iMPACT:2219 - Status register values:
INFO:iMPACT - 0011 1100 1110 1100
INFO:iMPACT:2492 - '1': Completed downloading core to device.
'1': IDCODE is '202016' (in hex).
'1': ID Check passed.
'1': IDCODE is '202016' (in hex).
'1': ID Check passed.
'1': Erasing Device.
'1': Using Sector Erase.
'1': Programming Flash.
'1': Reading device contents...
done.
'1': Verification completed.
'1':Programming in x1 mode.
'1': Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings.
INFO:iMPACT - '1': Flash was not programmed successfully.
PROGRESS_END - End Operation.
Elapsed time = 424 sec.
10-30-2014 08:34 AM
The log file shows that the issue is with the PROM programming the FPGA and not with the programming the PROM.
10-31-2014 06:49 PM
Before programmed the eFUSE with the key, non-encrypted bitstream could be download to the board in both JTAGE or PROM ways. The board worked well.
After the programmed the eFUSE, encrypted bitsteam can not be download to the PROM.
Also, the encrypted bitstream can not configure the device with JATG.
But with non-encrypted bitstream, the device can still be configured with JATG, and the PROM can still be programmed.
11-02-2014 09:22 PM
Hi,
Please read the EFUSE registers from IMPACT and paste here. Especially the output of the FUSE_CNTL control register.
Also send the ""Read Device Status" output which should help identify which stage the configuration failed.
11-03-2014 07:00 PM
Hi, athandr,
Sorry replying late. I was using USB cable and it doesn't support to read eFuse. Had just bought an USB II Cable.
The status report is listed below:
Welcome to iMPACT
iMPACT Version: 13.2
Project: 'D:\CMOS Sensor\ISE Design Files\DNA Related\DNA_Reader\\auto_project.ipf' already exists.
Original project has been renamed to 'D:\CMOS Sensor\ISE Design Files\DNA Related\DNA_Reader\\auto_project_1.ipf'.
Project: D:\CMOS Sensor\ISE Design Files\DNA Related\DNA_Reader\\auto_project.ipf created.
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
GUI --- Auto connect to cable...
// *** BATCH CMD : setCable -port auto
AutoDetecting cable. Please wait.
PROGRESS_START - Starting Operation.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
Driver file xusbdfwu.sys found.
Driver version: src=1027, dest=1027.
Driver windrvr6.sys version = 10.2.1.0. WinDriver v10.21 Jungo (c) 1997 - 2010 Build Date: Aug 31 2010 X86 32bit SYS 14:35:41, version = 1021.
Cable PID = 0008.
Max current requested during enumeration is 300 mA.
Type = 0x0005.
write (count, cmdBuffer, dataBuffer) failed C0000004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 2301.
File version of D:/Xilinx/13.2/ISE_DS/ISE/data/xusb_xp2.hex = 2401.
Firmware hex file version = 2401.
Downloading D:/Xilinx/13.2/ISE_DS/ISE/data/xusb_xp2.hex.
Downloaded firmware version = 2401.
PLD file version = 200Dh.
PLD version = 200Dh.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
Type = 0x0005.
ESN option: 000014D28A7C01.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 2014-11-4 10:09:47
// *** BATCH CMD : Identify -inferir
PROGRESS_START - Starting Operation.
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xc6slx75, Version : 2
INFO:iMPACT:1777 -
Reading D:/Xilinx/13.2/ISE_DS/ISE/spartan6/data/xc6slx75.bsd...
INFO:iMPACT:501 - '1': Added Device xc6slx75 successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time = 1 sec.
// *** BATCH CMD : identifyMPM
INFO:iMPACT - Current time: 2014-11-4 10:09:59
// *** BATCH CMD : ReadStatusRegister -p 1
Maximum TCK operating frequency for this device chain: 25000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': Reading bootsts register contents...
[0] VALID_0 - ERROR OR END OF STARTUP (EOS) DETECTED : 1
[1] FALLBACK_0 - FALLBACK RECONFIGURATION ATTEMPT DETECTED : 0
[2] RESERVED : 0
[3] WTO_ERROR_0 - WATCHDOG TIME OUT ERROR : 0
[4] ID_ERROR_0 - FPGA DEVICE IDCODE ERROR : 0
[5] CRC_ERROR_0 - CYCLIC REDUNDANCY CHECK (CRC) ERROR : 0
[6] VALID_1 - ERROR OR END OF STARTUP (EOS) DETECTED : 0
[7] FALLBACK_1 - FALLBACK RECONFIGURATION ATTEMPT DETECTED : 0
[8] RESERVED : 0
[9] WTO_ERROR_1 - WATCHDOG TIME OUT ERROR : 0
[10] ID_ERROR_1 - FPGA DEVICE IDCODE ERROR : 0
[11] CRC_ERROR_1 - CYCLIC REDUNDANCY CHECK (CRC) ERROR : 0
[12] STRIKE CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
[13] STRIKE_CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
[14] STRIKE_CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
[15] STRIKE_CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
'1': Reading status register contents...
[0] CRC ERROR : 0
[1] IDCODE ERROR : 0
[2] DCM LOCK STATUS : 1
[3] GTS_CFG_B STATUS : 1
[4] GWE STATUS : 1
[5] GHIGH STATUS : 1
[6] DECRYPTION ERROR : 0
[7] DECRYPTOR ENABLE : 0
[8] HSWAPEN PIN : 1
[9] MODE PIN M[0] : 1
[10] MODE PIN M[1] : 1
[11] RESERVED : 0
[12] INIT_B PIN : 1
[13] DONE PIN : 1
[14] SUSPEND STATUS : 0
[15] FALLBACK STATUS : 0
The eFUSE reading log are listed below, and as it asked to change the cable spead to 1.5M to read the registers, the content may include the information of changing cable speed:
Welcome to iMPACT
iMPACT Version: 13.2
Project: 'D:\CMOS Sensor\ISE Design Files\DNA Related\DNA_Reader\\auto_project.ipf' already exists.
Original project has been renamed to 'D:\CMOS Sensor\ISE Design Files\DNA Related\DNA_Reader\\auto_project_1.ipf'.
Project: D:\CMOS Sensor\ISE Design Files\DNA Related\DNA_Reader\\auto_project.ipf created.
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
GUI --- Auto connect to cable...
// *** BATCH CMD : setCable -port auto
AutoDetecting cable. Please wait.
PROGRESS_START - Starting Operation.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
Driver file xusbdfwu.sys found.
Driver version: src=1027, dest=1027.
Driver windrvr6.sys version = 10.2.1.0. WinDriver v10.21 Jungo (c) 1997 - 2010 Build Date: Aug 31 2010 X86 32bit SYS 14:35:41, version = 1021.
Cable PID = 0008.
Max current requested during enumeration is 300 mA.
Type = 0x0005.
write (count, cmdBuffer, dataBuffer) failed C0000004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 2301.
File version of D:/Xilinx/13.2/ISE_DS/ISE/data/xusb_xp2.hex = 2401.
Firmware hex file version = 2401.
Downloading D:/Xilinx/13.2/ISE_DS/ISE/data/xusb_xp2.hex.
Downloaded firmware version = 2401.
PLD file version = 200Dh.
PLD version = 200Dh.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
Type = 0x0005.
ESN option: 000014D28A7C01.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 2014-11-4 10:09:47
// *** BATCH CMD : Identify -inferir
PROGRESS_START - Starting Operation.
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xc6slx75, Version : 2
INFO:iMPACT:1777 -
Reading D:/Xilinx/13.2/ISE_DS/ISE/spartan6/data/xc6slx75.bsd...
INFO:iMPACT:501 - '1': Added Device xc6slx75 successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time = 1 sec.
// *** BATCH CMD : identifyMPM
INFO:iMPACT - Current time: 2014-11-4 10:09:59
// *** BATCH CMD : ReadStatusRegister -p 1
Maximum TCK operating frequency for this device chain: 25000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': Reading bootsts register contents...
[0] VALID_0 - ERROR OR END OF STARTUP (EOS) DETECTED : 1
[1] FALLBACK_0 - FALLBACK RECONFIGURATION ATTEMPT DETECTED : 0
[2] RESERVED : 0
[3] WTO_ERROR_0 - WATCHDOG TIME OUT ERROR : 0
[4] ID_ERROR_0 - FPGA DEVICE IDCODE ERROR : 0
[5] CRC_ERROR_0 - CYCLIC REDUNDANCY CHECK (CRC) ERROR : 0
[6] VALID_1 - ERROR OR END OF STARTUP (EOS) DETECTED : 0
[7] FALLBACK_1 - FALLBACK RECONFIGURATION ATTEMPT DETECTED : 0
[8] RESERVED : 0
[9] WTO_ERROR_1 - WATCHDOG TIME OUT ERROR : 0
[10] ID_ERROR_1 - FPGA DEVICE IDCODE ERROR : 0
[11] CRC_ERROR_1 - CYCLIC REDUNDANCY CHECK (CRC) ERROR : 0
[12] STRIKE CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
[13] STRIKE_CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
[14] STRIKE_CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
[15] STRIKE_CNT - STRIKE COUNT FOR FALLBACK ATTEMPTS : 0
'1': Reading status register contents...
[0] CRC ERROR : 0
[1] IDCODE ERROR : 0
[2] DCM LOCK STATUS : 1
[3] GTS_CFG_B STATUS : 1
[4] GWE STATUS : 1
[5] GHIGH STATUS : 1
[6] DECRYPTION ERROR : 0
[7] DECRYPTOR ENABLE : 0
[8] HSWAPEN PIN : 1
[9] MODE PIN M[0] : 1
[10] MODE PIN M[1] : 1
[11] RESERVED : 0
[12] INIT_B PIN : 1
[13] DONE PIN : 1
[14] SUSPEND STATUS : 0
[15] FALLBACK STATUS : 0
Also, the eFUSE control register reading report is listed below, just in case:
INFO:iMPACT - Current time: 2014-11-4 10:18:06
// *** BATCH CMD : ReadEfuseControlReg -p 1
Maximum TCK operating frequency for this device chain: 25000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': Reading CONTROL register...
'1': Reading CONTROL register...
==================================
msb --> lsb
MSB 1 0 0 0 - 0 0 0 0 [0x80]
0 0 0 0 - 0 0 0 0 [0x00]
0 0 0 0 - 0 0 0 0 [0x00]
LSB 0 0 0 0 - 0 0 0 0 [0x00]
==================================
============================================
Control Register Bits
============================================
Disable Control Register Read/Write : 0
Disable Key Register Read/Write : 0
Disable Control Register Read/Write : 0
Disable Key Register Read/Write : 0
Configure After Power Cycle Only : 0
Use AES eFUSE Key Only : 0
============================================
BTW: How to "MARK this is as an answer in case it helped resolve your query.Give kudos in case the post guided to the solution." ? I am new user of this forum.
Many thanks,
Yu Wang