Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12747 Discussions

Feed in data into PIO, or other Interface

Altera_Forum
Honored Contributor II
1,565 Views

Hi, dear all, I'm new to NIOS. 

I have a question: May I feed data into PIO  

without writing a nios program to acquire data? 

 

I wish that I write a nios software and flash it to EPCS and run. 

And other program feed data in, and change PIO. 

How can I do this? Is there any example? 

 

THX
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
644 Views

Hello, 

 

first i like to know what kind of Programm you want to write! 

 

There are a few posibilities to access a PIO 

- You can write a *.c Project in the NIOS II IDE but it is nessesary that your PIOS are included and generated in your NIOS II SoPC Builder. 

- The other way is to write a Hardware description either in VHDL or Verilog. You have to read and understand the Avalon Bus Specifications because you build a Avalon Bus Slave Component and NIOS acceses to your Component over the Avalon Bus. 

 

To your Question with the EPCS pleas read the Handbook to the NIOS SDK. You can use the NIOS Shell to generate a *.flash code from your *.edif code. This is nessesary to programm your flash. 

 

Hope this was helpful. 

 

Regards Bailand
0 Kudos
Altera_Forum
Honored Contributor II
644 Views

^^ 

 

Think about this simple case. 

Here is a project build by SOPC, 

main components in the system are NIOS II and JPEG HW Decoder. 

I write a program to tell nios read data from 8-bits input PIO or read data from SPI slave, and decode input stream as jpeg image with HW JPEG decoder. 

 

Now there is a full system simulator called Simics. Simics is like VMWare, but more than VMWare.[and weak than VMWare] I can write a C interface with DML, a device modeling language. The c interface is normal without any special API, but should be compiled with host's compiler.[Not altera's one] 

 

From simics viewpoint, this interface should describe what the device does. 

From NIOS viewpoint, the interface should feed data into PIO or SPI and other signal hint NIOS should start processing data stream. 

 

Question is I don't connect PIO or SPI to a real master hardware device. 

All I need is write a program in C, and feed data into NIOS by JTAG or other reasonable communication channel. 

How can I do this? Or anything I should read. 

 

Thank all you again.
0 Kudos
Reply