Forum Discussion
CYCLONE III - EPCS16 - AS MODE and FLASH PROGRAMMING
Hi all,
this is santhosh. i am not too much into fpga's.... we are utilizing an altera cyclone iii board for a energy meter purpose. We have made a board for the application.i find that in my case, JTAG is working fine.- AS mode is fine (shows 100% progress) but not starting the processor.
- JIC in JTAG mode fails around 70% every time.
- am trying to flash using flash programmer into EPCS16 (sof and elf) - Fails.
- the connections on the board are fine
- i am using 10K pullup and pulldown resistors
- in case of flash programming, i had the CPU's reset vector point to EPCS
13 Replies
- Altera_Forum
Honored Contributor
it seems like the design is not able to be written into the flash device (EPCS16).
"AS mode is fine" - are you doing only programming? you have to do verify to ensure your design is written into the flash. i guess it will certainly fail at verify if you said you can't load the processor during power up. Does loading your design .sof thru JTAG work? - Altera_Forum
Honored Contributor
Through jtag, am able to program both quartus and nios. Actually so far I have been testing like this only. AS I have mentioned,I have checked the pcb and all epcs connections are ok. As given in Altera knowledge base,I have changed the multi propose pins to user i/o.kindly guide me in the right direction so that I can get things done soon.thanks
- Altera_Forum
Honored Contributor
hmm. since you are using EPCS to load your design into FPGA, double check the configuration mode of your cyclone device (it should be the MSEL pins). make sure they are set to Active Serial mode.
- Altera_Forum
Honored Contributor
I am using EP3C25Q240C8N, i have three MSEL pins 0,1 and 2. I realize i have connected them to gnd. for programming in AS mode what should i connect them to. I read the configuration documentation and found that there are two AS modes some "Fast Active Serial Standard" and "Fast Active Serial Fast".
I wish the MSEL connections solve the problems. :confused: - Altera_Forum
Honored Contributor
.... Ok so after tying MSEL[1] to VCCA, the AS problem is solved.
My second issue is the FLASH PROGRAMMER which comes with the NIOS II Software Build Tools. I am able to now use JTAG mode and AS mode with Quartus II. I usually use the Flash programmer to do a complete programming(Quartus and NIOS code). I do the following,- JTAG the FPGA board, write the sof. NIOS II CPU reset vector pointing to EPCS device.
- Note that in NIOS the all Linker segments apart from entry and exceptions point to sram_0 (2Mb SRAM)
- open NIOS, generate BSP, build project and the open the flash programmer.
- Add Choose the BSP/SOPC file.
- add .sof file
- add .elf file
- add offset for elf file based on sof file size
- and run the programmer.
- Altera_Forum
Honored Contributor
well there are some people facing issues with the NIOS II flash programmer in the latest version of Quartus II 12.1sp1. maybe you can take a look at the threads or the NIOS II subforums.
- Altera_Forum
Honored Contributor
Thanks jacklsw86. Actually i am stuck with this Flash Programmer Error. Most threads in NIOS discussion forums are pretty old i guess. I am using Quartus II 12.0 SP1.
- Altera_Forum
Honored Contributor
Here is the thread i came across:
http://www.alteraforum.com/forum/showthread.php?t=35234 do you still have old quartus ii? maybe you can try to do NIOS flash program there. - Altera_Forum
Honored Contributor
:(:(:(
Hi..... I have tried the older version, which was working earlier also. Same error. I am attaching the full stack trace of the eror... Info: Sep 11, 2012 9:14:18 AM - (FINE) sof2flash: Starting Info: Info: ******************************************************************* Info: Info: Running Quartus II Convert_programming_file Info: Info: Command: quartus_cpf --no_banner --convert --device=EPCS128 --option=G:/qcon/qcon_fpga_card/quartus/qcon_v0/software/io_processor_nios11_bsp/flash/qcon_v0_epcs_flash_controller_0.opt G:/qcon/qcon_fpga_card/quartus/qcon_v0/qcon_v0.sof G:/qcon/qcon_fpga_card/quartus/qcon_v0/software/io_processor_nios11_bsp/flash/qcon_v0_epcs_flash_controller_0.pof Info: Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings Info: Info: Peak virtual memory: 131 megabytes Info: Info: Processing ended: Tue Sep 11 09:14:26 2012 Info: Info: Elapsed time: 00:00:03 Info: Info: Total CPU time (on all processors): 00:00:02 Info: Info: ******************************************************************* Info: Info: Running Quartus II Convert_programming_file Info: Info: Command: quartus_cpf --no_banner --convert G:/qcon/qcon_fpga_card/quartus/qcon_v0/software/io_processor_nios11_bsp/flash/qcon_v0_epcs_flash_controller_0.pof G:/qcon/qcon_fpga_card/quartus/qcon_v0/software/io_processor_nios11_bsp/flash/qcon_v0_epcs_flash_controller_0.rpd Info: Info: Quartus II Convert_programming_file was successful. 0 errors, 0 warnings Info: Info: Peak virtual memory: 128 megabytes Info: Info: Processing ended: Tue Sep 11 09:14:29 2012 Info: Info: Elapsed time: 00:00:03 Info: Info: Total CPU time (on all processors): 00:00:02 Info: Sep 11, 2012 9:14:29 AM - (FINE) sof2flash: Done Info: Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Info: Resetting and pausing target processor: OK Info: Reading System ID at address 0x00084188: verified Info: Processor data bus width is 32 bits Info: Looking for EPCS registers at address 0x00083800 (with 32bit alignment) Info: Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A Info: Not here: reserved fields are non-zero Info: Looking for EPCS registers at address 0x00083900 (with 32bit alignment) Info: Initial values: 92400237 4A40100C 483FFD26 90000135 92400237 4A40200C Info: Not here: reserved fields are non-zero Info: Looking for EPCS registers at address 0x00083A00 (with 32bit alignment) Info: Initial values: 108001C4 1004D0FA 002EE03A 003F9C06 002EE03A 003F9506 Info: Not here: reserved fields are non-zero Info: Looking for EPCS registers at address 0x00083B00 (with 32bit alignment) Info: Initial values: 00000000 00000000 00000000 00000000 00000000 00000000 Info: Not here: SPI_SLAVE_SEL has 0 valid bits (should be between 1 and 16) Info: Looking for EPCS registers at address 0x00083C00 (with 32bit alignment) Info: Initial values: 00000000 00000000 00000260 00000000 00000000 00000001 Info: Valid registers found Info: EPCS signature is 0x00 Info: EPCS identifier is 0x000000 Info: No EPCS layout data - looking for section [EPCS-000000] Info: Unable to use EPCS device Info: Leaving target processor paused Error: Error code: 8 for command: $SOPC_KIT_NIOS2/bin/nios2-flash-programmer "G:/qcon/qcon_fpga_card/quartus/qcon_v0/software/io_processor_nios11_bsp/flash/qcon_v0_epcs_flash_controller_0.flash" --base=0x83800 --epcs --sidp=0x84188 --id=0x0 --timestamp=1347252982 --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-0]' --program --verbose Also attached the BSP_EDITOR for my project. Kindly try to help, meanwhile i ll try other resources in Altera forum also. san - Altera_Forum
Honored Contributor
Ok i have observed some thing... but still put me into dead end.
In the Qsys, the EPCS controller has not been exported. The component is not accepting the option to use dedicated AS pins. It says its not supported. So i exported the pins and then assigned the corresponding pin numbers. I have also cross checked that the pins are marked as "Regular I/Os" in the dual purpose pins tab in device settings. still i am getting error in fitting.... Error (176310): Can't place multiple pins assigned to pin location Pin_12 (IOPAD_X0_Y27_N7) Info (176311): Pin epcs_adso is assigned to pin location Pin_12 (IOPAD_X0_Y27_N7) Info (176311): Pin ~ALTERA_ASDO_DATA1~ is assigned to pin location Pin_12 (IOPAD_X0_Y27_N7) Error (176310): Can't place multiple pins assigned to pin location Pin_14 (IOPAD_X0_Y25_N0) Info (176311): Pin epcs_nce is assigned to pin location Pin_14 (IOPAD_X0_Y25_N0) Info (176311): Pin ~ALTERA_FLASH_nCE_nCSO~ is assigned to pin location Pin_14 (IOPAD_X0_Y25_N0) Error (176310): Can't place multiple pins assigned to pin location Pin_23 (IOPAD_X0_Y22_N0) Info (176311): Pin epcs_dclk is assigned to pin location Pin_23 (IOPAD_X0_Y22_N0) Info (176311): Pin ~ALTERA_DCLK~ is assigned to pin location Pin_23 (IOPAD_X0_Y22_N0) Error (176310): Can't place multiple pins assigned to pin location Pin_24 (IOPAD_X0_Y22_N7) Info (176311): Pin epcs_data0 is assigned to pin location Pin_24 (IOPAD_X0_Y22_N7) Info (176311): Pin ~ALTERA_DATA0~ is assigned to pin location Pin_24 (IOPAD_X0_Y22_N7) Info (171121): Fitter preparation operations ending: elapsed time is 00:00:01 Error (171000): Can't fit design in device Error: Quartus II 32-bit Fitter was unsuccessful. 5 errors, 3 warnings Error: Peak virtual memory: 345 megabytes Error: Processing ended: Tue Sep 11 14:56:58 2012 Error: Elapsed time: 00:00:33 Error: Total CPU time (on all processors): 00:00:18 Error (293001): Quartus II Full Compilation was unsuccessful. 7 errors, 987 warnings