sopc入门-Hello from nios II

一、Quartus部分。

1、新建工程。

    注意,工程名不能和Quartus关键字和宏功能块名字相同,否则会出问题(**** is too large)。

2、启动sopc builder,创建一个系统,包含如下组建

sopc入门-Hello from nios II

自动分配地址,配置reset和exception的地址,然后点击generate。等到生产完毕,OK,next。

3、file->new->block design/schimatic file.

    双击原理图空白处,project,添加刚才生成的系统。

    ctrl+A全选文件,右键选中的文件,自动添加引脚,更改引脚名称为csv格式引脚分配文件中的名称(方便使用引脚分配文件)。

    保存。

4、添加管脚分配文件。assignments->import assignment file,添加csv格式的引脚分配文件。

5、编译工程。

二、Nios软件部分。

1、sopc builder system file:选择刚才生成的ptf文件

     select builder system template:选择Hello World模板文件

     finish。

2、右键左侧窗口中的hello_world文件夹图标,选择preperties,选中C/C++ Build,对Configuration选择Release.

     右键左侧窗口中的hello_world文件夹图标,选择System Library preperties,选中C/C++ Build,对Configuration选择Release.

     System Library,勾选Program never exits,Clean exit,Reduced device driver,Lightweight device driver API,Small C library.其他不选。

     OK。

3、右键左侧窗口中的Hello_world文件夹图标,build project。

4、用Quartus将生成的sof文件下载到fpga中,或者用Nios IDE的tools->Quartus programmer下载。

5、右键左侧窗口中的Hello_world文件夹图标,run as->Nios hardware。

you will see "Hello from nios II" in the Console window which is in the down-middle of your screen.

转载于:https://www.cnblogs.com/derhuisir/archive/2011/02/28/1967452.html