[Original] Take the first step of Nios, Hellonios

Source: Internet
Author: User

Altera official launch of the Nios has been a long time, personal feeling c+v code matching will be a mainstream FPGA use, from C to complete some of the timing requirements are not high, high function requirements, such as motion control , the need to complete the high timing requirements by the V and some underlying drivers for C to call, the design structure feels more reasonable and effective, but also more suitable for some large-scale projects. But the downside is that program portability may be a bit bad, after all, using the Eclipse editing environment (I'm not sure, anyway, it's a bit of a hassle to get a transplant).

Well, this article begins with our first routine,Hellonios. The classic HelloWorld in the software language has become hellonios here, and it looks pretty good.

Brief introduction

In fact, there are a lot of tutorials on Nios on the Internet, this article only as my own learning use record. First of all, to use Nios, you must have a matching hardware bar, here first to introduce my own hardware environment.

    • Hardware: Development Board Black Gold AX301
    • Software: quartusii 13.0SP1,NIOS13.0SP1

The most critical factor is these, the Development Board is very common, bought a little bit of resources, but some simple development and use of nios that is enough, make the most of it, get up.

First of all, the reference to some of the information, "Nios's fantasy Drifting" and "nios those things", feeling are very classic information, can be used as a primer.

Quartus Project Establishment

Here and the ordinary hardware Quartus Engineering Establishment no difference, here not much to say, briefly mentioned.

  1. Set up the Quartus project, assign all the parts in the folder (this is the personal habit, now I general framework such as)

    It is used to store the ipcore self-created official IP core, which tcl holds the TCL pin file verilog for storing the personal coded v code.

  2. To create the corresponding PLL, whether or not the PLL is created in its sole discretion, because we are going to use the on-board resource SDRAM, which requires a 100MHz clock, and our input is 50MHz, so we need a PLL here.

  3. After the PLL is established, we establish the qsys. Qsys is the Sopc Builder in the previous version, which is essentially creating a virtual sopc. Tools->qsys can be opened, we can see the following interface after opening.

  4. Add Nios, Sysid, SDRAM, EPCS, JTAG, and then rename the connection after adding. Rename method to select the name and press "2" or "R", I will generally change the names of these parts to uppercase. Some of the warning or error may appear, and some points to note are described below.

    • To add all the parts after the
    • According to a certain rules, you can refer to the form of connection, below still found some of the following error exists.

    • Here it is necessary to set the Nios core, double hit to nios the core, the following settings. After the setup is complete, you can see that the error disappears.
    • Of course, there will be some warning or error about the Address line errors, this is because many parts of the address space is the same, which can be seen on the right, similar to the following.
    • At this point you can click System->assign Base address for the automatic distribution of addresses, here I have a habit is to EPCs module address line fixed to 0x0, from the above wiring diagram can also be seen.
    • After the completion of the above to pay attention to our last list of interrupt IRQ, also remember to connect them together.
    • Then click on the generation in the top tab to generate, this page will remember to check the following sections.
    • At this point, the configuration section in Qsys ends.
  5. Adding PLLs and Qsys to the top of the quartus, and referencing them in the form of schematic diagrams, I usually connect using code, which is a part of people's preferences. Using code to connect portability is better but no schematic form is intuitive.

  6. Then compile and download the SOF to the FPGA Development Board. At this point, all the work in Quartus is complete.

Nios Project Establishment

This section according to the reference manual can be, very simple, abbreviated as follows.

      1. Choose a space to store the project, I usually put it in the Qsys directory
      2. File->new->nios II application and BSP Template
      3. Select the Sopcinfo file under Quartus, and then name the project, all the way next.
      4. After the project is generated, select the left folder, right-Nios ii->generate BSP
      5. After the build, the Ctrl+b is compiled
      6. When the compilation is complete, open run-configuation, download the configuration, Apply,run
      7. Finally, you can wait for the result in the Debug box.
      8. Finally put the results of success

[Original] Take the first step of Nios, Hellonios

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.