I used the CycloneII dev-kit from altera for a project with uCLinux and a NiosII. To save some $$ I'm trying to configure the FPGA from the EPCS64 and load the kernel from the same EPCS64 thus eliminating the need for an extra ROM chip.The FPGA get's configured correctly but the kernel takes ages (ok not ages but a couple of minutes(!!)) to load. When booting the kernel from flash it is loaded in a few seconds (1 or 2 ...). I knew it would be slower but I'm pretty sure I made a mistake somewere 'cause this is just tooo slow. Another thing that puzzles me is that the kernel boots halfway in about two minutes and then after 2 more minutes it's reloaded again (from the beginning, it doesn't continue where it was) and completes the boot sequence. From then on the system runs like it used to http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ohmy.gif Please tell me I did something wrong!
Hi wgoossens,1. Did you select the fast mode for EPCS? with hardwire mode select pins? 2. You should try boot from on chip memory, copy(or decompress) EPCS data to dram, then boot linux out of dram. Running directly on EPCS is very slow. Hippo
Thank you for the reply,1. I'm not sure. I use the CycloneII dev-kit with the components as created by Altera. I'm lokking into it... 2. If I understand it correctly I am doing excatly that. The code I used to program the EPCS is:
sof2flash --input=/cygdrive/t/CSC/Lusdetector_onderzoek_PV04900/03-0032-1_Lusdetector_usb_noFlash/fpga/standard.sof --output=standard.flash --epcs elf2flash --epcs --after=standard.flash --input=../kits/nios2/bin/eclipse/workspace/kernel_no_flash/build/vmlinux --output=vmlinux.flash --boot=boot_loader_epcs.srec --end=0x3ffffff nios2-flash-programmer --epcs --sof=altera_nios_dev_board_cyclone_2c35.sof --input=standard.flash nios2-flash-programmer --epcs --sof=altera_nios_dev_board_cyclone_2c35.sof --input=vmlinux.flash --relocatefrom the documentation I thought the bootloader I include when generating the vmlinux.flash file sits in the first 1K (which is directly accesable) and copies the vmlinux to ram and jumps to the start-address.
The EPCS devices are extremely slow. I program them on a daily basis. In addition, booting from an EPCS device is not supported on all devices (i.e. the Stratix II). So for compatibility reasons you may want to avoid doing this anyway.
Hi wgoossens,Check the epcs_controller definition in your ptf file for the "extradelay" parameter. You probably don't want it set to "1" ... it will signficantly affect your programming and boot times. Here are some related threads: http://forum.niosforum.com/forum/index.php...wtopic=2365&hl= (http://forum.niosforum.com/forum/index.php?showtopic=2365&hl=) http://forum.niosforum.com/forum/index.php...wtopic=2280&hl= (http://forum.niosforum.com/forum/index.php?showtopic=2280&hl=) http://forum.niosforum.com/forum/index.php...epcs_controller (http://forum.niosforum.com/forum/index.php?showtopic=1737&hl=epcs_controller) Regards, --Scott
Hi wgoossens,Sorry, forgot about this one: > from the documentation I thought the bootloader I include when generating the > vmlinux.flash file sits in the first 1K (which is directly accesable) and copies the > vmlinux to ram and jumps to the start-address. You shouldn't need the bootloader at all when you're booting from the epcs device. The code in the epcs controller peripheral's on chip memory will search for the end of your configuration data, then load each section to the appropriate address. Regards, --Scott
Hi Scott,I'm at home now but couldn't stop thinking about the problem (I know, laugh as loud as you like) so I couldn't help but reading the forums.... First of: Thanks for those links you provided I think that excatly adresses my problem. I'll try it as soon as possible. I'll come in early tomorrow to try it out http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif I'll try and leave the bootloader out of the flash file 'cause what I now had was probably data from EPCS that got unpacked to RAM where the "second" bootloader kicked in to unpack my kernel from EPCS to RAM.... combine that with a EXTRA_DELAY parameter and you've got my weird problem... @jakobjones: It's not a big deal if the boot-time is a bit higher (but not minute)... And you know how managers are: "Hey don't you think you can loose the onboard ROM? That would save us a lot of money!" So I have to work with a slow EPSC http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif Thanks all! Walter Goossens
I'm happy to announce that an upgrade to quartus 5.1 and NiosII 5.1 gave me a speedup of about 18000% !My boot time went from 180 seconds (I measured this morning) to under 1 second!! That's more like it! Thanks all for helping me out!
Hi Scott,I have the same problem here but it's slightly different. I am having Nios II system where the FPGA configuration data and Nios II software boot up from EPCS and run from my SRAM on custom board having a serial flash, SRAM and a small EEPROM. When the system boot up, Nios II CPU starts to run from SRAM and the first thing it does is it sets up some data in the EEPROM. My problem is that the time taken for the data to transfer from serial flash to SRAM is rather long and then the processor hangs somewhere as it doesn't write to EEPROM. When you say checking the extradelay for EPCS module for '0', may I know should I also ensure that the extradelay for SPI module (EEPROM) to be '0' as well? I have 3 SPI(s) in system. All are set to '1'. Does it affect? Thanks. Carid