各位好, 小弟是个新手,刚刚接触,NIOS II 不久!我在网上下载了一个,PWM的IP核!驱动程序也有,用户测试程序也有!硬件部分已经综合编译成功了,现在我就是想在 NIOS IDE当中加入驱动程序,好让用户测试程序在编译的时候能够调用驱动!但是我不知道该怎样做!看书上说把系统集成到 HAL系统库那一部分,看了很多遍还是不明白到底是怎么做!这个问题已经困扰我好几天了,哪位大哥大姐能够告诉我详细的操作步骤啊,万分感激!!!!
So please read related document such as: SOPC Builder Component Development Walkthrough
SOPC Builder Component
Development Walkthrough
can download from:http://www.altera.com/literature/hb/qts/qts_qii54007.pdf
An SOPC Builder component is usually composed of the following four
types of files:
■ HDL files—define the component’s functionality as hardware.
HDL files—define the component’s functionality as hardware.■ _hw.tcl file—describes the SOPC Builder related characteristics, such as interface behaviors. This file is created by the component editor.
such as interface behaviors. This file is created by the component
editor.
■ C-language files—define the component register map and driver software to allow programs to control the component.
software to allow programs to control the component.
■ _sw.tcl file—used by the software build tools to use and compile the component driver code. The component editor guides you through the creation of your component. You can then instantiate the component in an SOPC Builder system and make connections in the same manner as other SOPC Builder components. You can also share your component with other designers.
component driver code.
The component editor guides you through the creation of your
component. You can then instantiate the component in an SOPC Builder
system and make connections in the same manner as other SOPC Builder
components. You can also share your component with other designers.
Software drivers abstract hardware details of the component so that
software can access the component at a high level. The driver functions
provide the software an API to access the hardware. The software
requirements vary according to the needs of the component. The most
common types of routines initialize the hardware, read data, and write
data.
When developing software drivers, you should review the software files
provided for other ready-made components. The IP installer provides
many components you can use as reference. You can also view the
<Nios II EDS install path>/components/ directory for examples.
Nios II EDS install path>/components/ directory for examples.其实不用,集成到 HAL系统库。
我用的是IDE 7.1。(据说8.0里有BSP工程可以生成驱动)
找到PWM的头文件。包含入工程里,里面用宏写的读写,这些直接可以用啊。
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |