Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Nios Processor Troubleshooting Help

Hello, this is my first post on these forums so excuse me if this is already covered elsewhere. I have searched for threads describing problems similar to mine but I haven't figured this out.

I currently have a custom board setup with a Cyclone II device and an ISSI and EPCS device for memory. My design in Quartus includes some peripherals and a Nios II processor built using SOPC builder containing the processor, SDRAM controller, EPCS controller, as well as a module for a USB port.

I am running a C++ program from a PC to communicate with the Nios processor via USB cable. I can send various commands to it, such as a "welcome" command which turns the LEDs on in a noticeable pattern.

A few months ago, I lost the ability to program the FPGA board. The lights would stay dimly lit until I used Quartus programmer to put new firmware, but on reboot it would disappear. I was also having trouble loading the .elf file into the relevant area on the board (I'm still not sure where this would be, but I'm guessing the ram for the processor to be running?), because before I would load both the .sof and .elf file into the EPCS.

When I tried to talk with the processor, it would say the port was opened but there is no answer. We guessed it was something to do with the EPCS chip and the .elf file wasn't ever getting loaded, so we replaced the EPCS chip.

This seems to have fixed the reboot problem. The lights do not stay dimly light up anymore and the Quartus firmware gets loaded on reboot. However, I have no way of verifying whether the .elf file gets loaded. Before, the LEDs would light up in the "welcome" pattern every time the processor powered up (or the board was reset, etc), and I have not seen that yet. I can open the USB port still but again no answer.

Something strange that happened: when I was switching my USB-Blaster cable from the Active Serial connector to the JTAG connector, as I was wiggling it out of the AS connector, the LEDs lit up in the "welcome" command pattern, as if the processor started up. However I wasn't able to open coms with the USB port in time to see if the processor was responding.

The person who designed this setup isn't available and I am a novice in Quartus and Nios, so I might be missing something elementary. Any help in troubleshooting this? Perhaps a debug tutorial relevant to a setup similar to mine? I haven't had any luck tracking down tutorials or examples that can help.

Could this be caused by a physical hardware issue, such as a bad USB port (though that doesn't explain the LEDs not lighting up)? Bad RAM? Bad Cyclone II?

Thank you...

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hm, so is that to say the signal I'm seeing on the oscilloscope isn't actually 400 Mbps? I'm seeing 10 bits per 25 ns, albeit the eye diagram isn't the prettiest. Anyway, would this be related to the Nios CPU at all? Or is that the timing constraints. I have found a tutorial on TimeQuest I will try to implement on my design...

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    There is no limitation stopping you from connecting a 400MHz clock to logic. I'm just saying you'll never meet timing at 400MHz with something like a Nios II processor in today's FPGAs. Running a Nios II core at 400MHz would be like clocking an Intel Xeon at 16GHz (which won't work either for the same reason).

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I see. I suppose it was naive to think the Nios processor wouldn't be affected when I added an additional component to the FPGA running so fast, thanks for the clarification.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just an update, I seem to have fixed this issue. In case anyone has similar symptoms in the future:

    My original design had two PLLs, one producing the 40 MHz clock for the Nios system and one producing a 400 MHz for the LFSR. When I used a single PLL with two clocks, at 40 and 400 MHz, the issue disappeared.