2

I got a Nios 2 project that is supposed to be able to run as hardware on my FPGA but how?

I've built it and I can run it in the simulator:

enter image description here

I've chose the uart0 in the BSP editor

enter image description here

But then when I run it as Nios hardware nothing happens

enter image description here

Can you tell me how it should be done?

It works to load the FPGA with a system in Quartus II programmer:

enter image description here

Update

The instructor has answered.

It's possible to run the OS on the DE2 board but the program will execute quickly. The > output comes on the serial port uart0, i.e. the 9-polar D-sub contact. Since the program is running so quickly it can be wise to disconnect the USB-to-serial > adapter from the DE2 (but not from the PC) when the number 2333 has been consumed. > Otherwise the buffer in putty will be full so that the output from the beginning of the run is lost.

Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
  • 1
    You don't really explain what you're doing and what the problem is.. A "Nios II project" is like saying i got a "Haswell project", an you don't "run the project as hardware", you simple run the Nios as hardare and let ir execute compiled code. Is your problem running C-code on the Nios II on an FPGA? Is the problem loading the bitsream onto the FPGA? Is it a C-compiler-target-problem? Is it a VHDL-synthesization problem? I realize this comment is messy, but it's hard to answer your problem w/o a lot more information on what you're doing exactly. – nic Aug 07 '13 at 08:09
  • @nic I got an answer from my engineering instructor who says that it's possible but I must use putty and my USB-to-serial in the way that he mentioned and I updated the original question with the details. – Niklas Rosencrantz Aug 13 '13 at 03:21

1 Answers1

4

I've read your other thread, about Hello World on Nios II and nowhere do you mention that you configure the FPGA for running the NIOS II, so maybe that's the problem?

I quote from Nios II handbook (see page 2-5 and 2-6): "Configuring the FPGA. Before you can run your software, you must ensure that the correct hardware design is running on the FPGA. To configure the FPGA, you use the Quartus® II Programmer. In the Windows operating system, you start the Quartus II Programmer from the Nios II SBT for Eclipse, through the Nios II menu. In the Linux operating system, you start Quartus II Programmer from the Quartus II software. The project directory for your hardware design contains an SRAM Object File (.sof) along with the .sopcinfo file. The .sof file contains the hardware design to be programmed in the FPGA."

Also se the Qartus II FPGA programmer handbook for info on how to program your FPGA.

nic
  • 443
  • 3
  • 12
  • 1
    Please see the updated answer for the comments from my engineering instructor. He says that it will work but I need to use putty and the serial connector to view the output, that's why I don't see any output, the program could be running on the board fine and sending output through the serial port that I should catch with putty. I'm going to try that maneuvre and report back. Thanks for the help. – Niklas Rosencrantz Aug 13 '13 at 03:23
  • 1
    Of course.. I did'nt even think of that.. If SSH don't work (no SSH server), try telnet. You might also have to set the correct speed for the serial port, something like 9600 baud/s is common but it differs (but since you use USB-to-UART I think that's taken care of by some magic in the background). Good luck :D – nic Aug 13 '13 at 05:18
  • I actually found why I didn't get the output - since the output comes on the serial port I had to listen to the serial port where the data came, if I run the program with the hardware. It's actually working but it wasn't easy to understand where the output comes. – Niklas Rosencrantz May 02 '16 at 21:15