Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12409 Discussions

nios ii doesn't run hello world (or sometimes not correctly)

Altera_Forum
Honored Contributor II
1,234 Views

Hi Guys, 

 

i have a problem with the niosii. I use a Altera Cyclone IV EP4CE22E22C8N on a selfmade board. The board now only contains a 60MHz Clock, the fpga and a sdram. The Reset and exception vectors are both in the sdram. 

The Problem is that after a creation of a niosii based system in Qsys (in older quartus versions sopc-builder) and creating a hello world program in NiosII 13.1 Software Build Tool for Eclipse, the niosii doesn't run. Sometimes he run but doesn'T works correctly. Instread of writing Hello from NIOS II for 100 times and counting the number down, i get this: 

 

llo from Nios II! 96 

Hello from Nios II! 95 

Hello from Nios II! 99 

Hello froHello from Nios II! 99 

HHello from Nios II! 99 

HeHello from Nios II! 99 

Hello froHello from Nios II! 99 

 

 

:confused::confused: 

 

But as i wrote abovde in the most times i don't get anything from the nios ii. 

Do someone has an idea where the problem could be ?;):cool:
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
137 Views

It's difficult to find the cause of the problem with this minimal information. 

I'll give you only a few ideas: 

- is your fpga design fully timing constrained? 

- does it meet timing? 

- are you using reduced HAL drivers? If yes, try to switch to the full featured version 

- is there any delay between one hello world print and the next one?
Altera_Forum
Honored Contributor II
137 Views

Hi Cris72, 

 

between one hello world and another there is no delay. But the output i wrote in the post above doesn't appear everytime. Sometimes i get only an error Download Elf file failed and sometimes the nios ii seems to be running but nothing appears on the Niosii console.
Altera_Forum
Honored Contributor II
137 Views

Did you connect the debug reset request to the CPU and all its peripherals? 

When you are downloading the elf content via nios2-download command, do include -r flag to reset your system.
Altera_Forum
Honored Contributor II
137 Views

 

--- Quote Start ---  

Hi Cris72, 

 

between one hello world and another there is no delay. But the output i wrote in the post above doesn't appear everytime. Sometimes i get only an error Download Elf file failed and sometimes the nios ii seems to be running but nothing appears on the Niosii console. 

--- Quote End ---  

 

 

I have seen this type of things many times, it is usually the NIOS II being run at a clock speed above what the device can handle. The issues downloading are where I generally see the problem with to high of a NIOS clock. You did not state in your post what the NIOS II clock rate was?
Altera_Forum
Honored Contributor II
137 Views

I have seen similar issue with de0-nano that the hello world does not run properly. It was due to timing issue with the SDRAM. 

ftp://ftp.altera.com/up/pub/altera_material/11.0/tutorials/verilog/de0-nano/using_the_sdram.pdf 

 

There is some kind of known clock skew issue with the board and the fix was to add a SDRAM_CLK that leads the NIOS_CLK by 3ns (more explanation in the reference, section 7). I am not sure the 3ns applicable to your case. But you can try.
Altera_Forum
Honored Contributor II
137 Views

 

--- Quote Start ---  

I have seen similar issue with de0-nano that the hello world does not run properly. It was due to timing issue with the SDRAM. 

--- Quote End ---  

 

 

I agree with mikedsouze - SDRAM timing is probably the problem. 

 

Build a NIOS that runs from on-chip memory. Get the memory test running 

 

RK
Reply