Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

User Peripheral in Nios II

Altera_Forum
Honored Contributor II
767 Views

Hello everyone, 

 

I started a quadcopter project with DE0-Nano development board some time ago, after some difficulties, i got some VHDL blocks doing the peripheral communication such as PWM outputs, accelerometer and gyroscope I2C interface returning XYZ axes and the serial communication getting the setpoint from a Java application. But i realized that for me to fuse the accelerometer and gyro data and make the PID control i'd need to implement some algorithms that would exceed to much my actual knowledge in VHDL, and thats when i came up with the idea in implementing a NIOS II doing the math part of the project, the problem is: 

I dont have any experience with NIOS II and i'd like to know if is it possible(and what should i start to study) for me to use NIOS to get the data from the blocks that i've already built, make the calculations and set the PWMs to drive the motors. 

 

Thanks, 

Renato Massi 

São Paulo - Brazil
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
80 Views

Yes. It is possible for you to control your custom VHDL components. There are two possible solutions; 

 

1. Use the Altera-provided programmable I/O component (PIO) to control your logic. 

 

2. Re-design your components to add Avalon-MM slave register interfaces to them. 

 

From a software perspective, both methods could be made to look identical. 

 

Since you are just beginning, I would go with option (1). 

 

Go through one of the many NIOS tutorials, and you'll find that they use a PIO component to control a set of LEDs, and possibly read back switch states. 

 

Take that design, and change the connections from the LEDs and switches to connect to the control and status ports on your components. 

 

Cheers, 

Dave
Reply