Altera_Forum
Honored Contributor
21 years agoFlash-Programmer problem after update to NIOS 1.1
After updating my design from Quartus 4.1 / NiosII 1.01 to Quartus 4.2 / NiosII 1.1, I couldn't programm it to EPCS completely. This worked fine under my previous installation.
The appropriate main parts of my design are a EPCS4, cyclone EP1C12, and 1MB external SRAM (avalon-tristate-slave) and no additional Flash because the final firmware is loaded via a PCI-Bus and a separate Avalon-Master (actually disabled). My cpu has set its Restart-Address to EPCS-controller and Exception-Address to SRAM, software compiling is done with setting all three sections to SRAM. The result is verified in objdump file (All firmware is linked to the address specified in SOPC-Builder). My FPGA-design is named 'ComMan.pof' with EPCS4 assigned to U4, my custom board is 'CM_Board', my firmware (a own PCI-Bootloader) is located in .../CM_Boot/Debug. Starting flash-programmer from NIOS-IDE produces the following output:cd D:/Projects/CMNios/Firmware/CM_Boot/Debug
# Creating .flash file for the FPGA configuration
$QUARTUS_ROOTDIR/NIOS_11/bin/sof2flash --flash=U4 --offset=0x00000000 --epcs --i
nput=D:/Projects/CMNios/FPGA/ACT/ComMan.sof --output=ComMan.flash
Info: *******************************************************************
Info: Running Quartus II Convert_programming_file
Info: Command: quartus_cpf --no_banner --convert --device=EPCS16 --option=ComMan
.opt D:/Projects/CMNios/FPGA/ACT/ComMan.sof ComMan.pof
Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings
Info: Processing ended: Fri Jan 14 12:03:37 2005
Info: Elapsed time: 00:00:01
Info: *******************************************************************
Info: Running Quartus II Convert_programming_file
Info: Command: quartus_cpf --no_banner --convert ComMan.pof ComMan.rpd
Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings
Info: Processing ended: Fri Jan 14 12:03:38 2005
Info: Elapsed time: 00:00:01
# Programming flash with the FPGA configuration
$QUARTUS_ROOTDIR/NIOS_11/bin/nios2-flash-programmer --input=ComMan.flash --sof=D
:/Projects/CMNios/FPGA/ACT/CM_Board/system/CM_Board.sof --epcs
14.01.2005 12:03:39 - (INFO) nios2-flash-programmer: Launching Quartus Programme
r to download:
D:/Projects/CMNios/FPGA/ACT/CM_Board/system/CM_Board.sof
Pre-Reading 148KBytes of data from U4:
|----.----+----.----|
********************* (14.438 sec).
Writing 64KBytes :
|----.----+----.----|
********************* (3.813 sec).
Verifying 64KBytes of data:
|----.----+----.----|
********************* (3.593 sec).
14.01.2005 12:04:13 - (INFO) nios2-flash-programmer: Success. Verified 64Kbytes
written to U4.
14.01.2005 12:04:13 - (INFO) nios2-flash-programmer: Flash programming complete
# Creating .flash file for the project
$QUARTUS_ROOTDIR/NIOS_11/bin/elf2flash --flash=U4 --epcs --base=0x0 --end=0x7fff
ffff --input=CM_Boot.elf --output=epcs_controller.flash --boot=$QUARTUS_ROOTDIR/
NIOS_11/components/altera_nios2/boot_loader_epcs.srec
# Programming flash with the project
$QUARTUS_ROOTDIR/NIOS_11/bin/nios2-flash-programmer --input=epcs_controller.flas
h --sof=__NO_SOF_PLEASE__ --epcs
14.01.2005 12:04:14 - (INFO) nios2-flash-programmer: SOF-download skipped.
Pre-Reading 63KBytes of data from U4:
|----.----+----.----|
********************* (7.75 sec).
Writing 64KBytes :
|----.----+----.----|
********************* (3.75 sec).
Verifying 64KBytes of data:
|----.----+----.----|
********************* (3.891 sec).
14.01.2005 12:04:34 - (INFO) nios2-flash-programmer: Success. Verified 64Kbytes
written to U4.
14.01.2005 12:04:34 - (INFO) nios2-flash-programmer: Flash programming complete After power Off/On I see that EPCS4 is accessed for about 65msec. With Signal-Tap I've checked that the fpga has now its new configuration loaded and reset_n is released when clock is stable (PLL locked the first time). But there is not any access (CS) to my SRAM as I expected to copy firmware from EPCS to SRAM. Has anybody an explanation? Thanks in advance Mike