Nios ii--Experiment 2--led Hardware part

Source: Internet
Author: User

LED hardware development new schematic diagram

1. Open Quartus II 11.0, create a new project, File--New project Wizard ..., ignore introduction, click between? Next> go to the next step. Set up engineering working directory, project name respectively. It is important to note that in the engineering work directory, please use English, do not include spaces, etc., or you may have problems when using the Nios II IDE later. Set as shown in 1. Then proceed to the next step. This project is named Lab2_led .

2, add the existing files, there is no need to add files, directly click? Next> go to the next step. For device setup. What's the use? The Cyclone IV family? EP4CE6E22C8 chip, select OK and go to the next step directly. EDA tool Setup, because the project does not carry out simulation, and so on, so do not set up, if you need to Modelsim simulation, in the simulation line, select tool Name? For Modelsim-altera (this is selected based on the version of Modelsim installed), Format (s) is selected as Verilog HDL (this is also selected based on the hardware description language mastered). Click? Next>?, go to the Summary (summary) page, and then click? Finish.

3, New? Block Diagram/schematic File? (Block diagram/schematic). Click? FILE-New: Select the Block diagram/schematic File in design files and click OK.

Qsys Calling Module
    1. Start the Qsys tool and make an IP module call. Click? Tools--Qsys, go to the Qsys Setup screen. The system has already added the clock module by default, the name is Clk_0?, here, select Clk_0, right-click, select Rename, change its name to CLK. The following add any module, make a similar name change, change the name of the method is similar, do not repeat the narrative.

    1. Add parts of the soft core processor module. Total need to add

Nios II Processor,

JTAG UART,

System ID Peripheral

EPCS Serial Flash Controller

Sdram Controller

Pio

These 6 modules. First familiar? Qsys's interface. To the left component library, is a system-provided component libraries, there are some common modules that make up the processor. The right side is the module that has been added to the system, that is, the Nios II soft core processor can be customized according to the specific needs. In the component library search Nios II Processor, double click to configure. The first thing to choose is the type of Nios II core. The core of Nios II Soft core is divided into three types, E-type, S-type and F-type. The e-core occupies the least amount of resources and functions the simplest and slowest. S-type core occupancy resources Secondly, the function and speed are higher than the former, the F-core has the most functions, the fastest, the corresponding occupation of the most resources, select the time according to demand and chip resources to decide, here Select S core. And then click? Finish to end the current configuration.

?

?

    1. Add SDRAM controller, the SDRAM chip used here, the size of 64M?????? B = 1M x 16Bit x 4Banks, specific other content you can view its datesheet.

renamed to SDRAM;

?

    1. Add epcs/epcqx1 Serial Flash Controller, where no setup is required, click Finish to finish.

    2. Add the JTAG download Debug interface. Search for the JTAG UART in the component library. Double-click to set. Because the system has no special requirements, the default configuration is selected here. Click? Finish? End the current configuration.

    1. Add the System ID module. The system ID is the unique identifier of the system that distinguishes it from other systems. Search in the component library? System ID peripheral, double-click to set. This is done casually, as set to 123. Click? Finish to end the current configuration.

    1. Add Pio. When you double-click Open, select the bit width (width) and direction (Direction), depending on the actual need, 4 LEDs are used here, so Width is set to 4,direction set to output. Click Finish to complete the setup.

      Rename as follows:

    2. Wired, coming right? The related lines in the Connections column are connected by setting up a node. First, the CLK of all modules is connected together.

The S1 of the on-chip memory SDRAM is then connected to the Data_master and Instruction_master of the processor Nios2.

The Jtag Debug Module Jtag_uart avalon_jtag_slave is connected to the data_master of the processor Nios2.

The System ID module Sysid_qsys Control_slave is connected to the data_master of the processor Nios2.

?

    1. The S1 of the Led_pio module connects the data_master of the processor nios2;

      Set the output port of the Led_pio and rename the port name;

    2. Set the reset signal.

    1. Interrupts of the processor Nios2 are connected to interrupts of the Jtag_uart, Epcs_flash interrupts.

?

    1. Click the small lock behind the Epcs_flash to lock it.

    2. Make the relevant settings for the soft core. First double-click Nios2 to enter the processor Setup module. Under the Core Nios II tab, reset vector memory is set to Epcs_flash.epcs_control_port,exception vector Memory is set to SDRAM.S1, then click Finish to complete the setup.

    1. Click? System-Assign Base Addresses, this time will find the lower messages window of the original error all gone, changed to 0 errors,0 Warnings. If this is not the result, go back and follow the steps to check.

    1. Click? Save the file, save it here with the name lab2_led.
    2. Finally, select the Generation tab, set the Create simulation model to none, and then click Generate below to build. The time is long, everybody waits patiently.

    3. When you are finished, click Close, and then close Qsys back to the Quartus II interface.
Schematic Add IP module
  1. Adding niosii Cores

    Double-click the empty space in BLOCK1.BDF to open the Symbol dialog box. Select Project

  2. Add PLL

    Click Megawizard Plug-in Manager ... in the lower right corner to enter the macro module call interface.

    Select Creat a new custom megafunction variation, click? Next> go to the next step and add the name of the output file to the PLL after the "What name does want for the". Then search for ALTPLL in the search box on the right, select it, this step mainly for the system Add clock module, and then click? Next> into the next step.

    Popup altpll Settings dialog box, where? Where is the frequency of the inclk0 input? In the General section, change the clock to 50MHz.

    Then follow these procedures to set up:

    Then always set the default, always next to the window, click Finish.

    A quartus II IP Files dialog box pops up, click Yes to complete and no action is required. Then click OK in the Symbol dialog box and place the module in BLOCK1.BDF.

  3. connecting, adding pins

    Double-click the Open Symbol dialog box, and2 in Name, and add the door.

    Click Select Module to add Pin, right click, select Generate pins for symbol ports.

    ?

    Rename the pin as follows:

  4. Click? Project-add/remove files in Project ..., click the Browse button after the file name, select the. qsys file, click Add, and then click OK.
  5. Configuration Pins

    First, compile, and then use the script file to configure, toolsàtcl scripts;

  6. Set up engineering parameters

    Set as configuration device EPCS4

    Set dual-use pins;

  7. In general, please be patient for a long time.

?

Nios ii--Experiment 2--led Hardware part

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.