Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Nios hardware and software integration

Altera_Forum
Honored Contributor II
2,575 Views

I'm developing a project based on Nios II CPU, and would like to integrate the hardware (.sof) and software (Nios C/C++ application) into a bit stream file. However, I don't know how to do with it. Does anyone have such experience? Thanks a lot!

0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
1,394 Views

I have never done that before, but I wonder why you would want to do such a thing ! Do u want to use the bit-stream to burn the device in one go ??

0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

Yes. I know I can also program the device via Nios Flash Programmer; however, I would like to whether it can also be integrated into one bit-stream, just as Xilinx FPGA. Does anyone have some idea about it?

0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

My understanding is you can only do that if your software is accommodated as mif file so that it is part of firmware. 

 

I believe xilinx can't integrate software and firmware into one bitstream because where is the software stored then?
0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

 

--- Quote Start ---  

Yes. I know I can also program the device via Nios Flash Programmer; however, I would like to whether it can also be integrated into one bit-stream, just as Xilinx FPGA. Does anyone have some idea about it? 

--- Quote End ---  

 

 

I have been trying to do it for quite some time myself and finally I have managed: I have placed the details in the following thread: 

 

http://www.alteraforum.com/forum/showthread.php?p=22783#post22783 

 

Hope it works for you as well !
0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

Hi, Xinjia, 

 

I've tried your way. But I still have a question about this issue. If my software are not all located in on-chip ram, then it seems not work. In my understanding, this way does not fit for the software located off-chip memory. Do I miss something? Thanks
0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

The bit stream can only configure the FPGA itself, not the external components. What you need for that is a bootloader that will recover the software and copy it to the external memory. That is what the EPCS bootcode does from the flash memory.

0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

Thanks, Daxiwen.  

 

I have found some documentation about EPCD bootload, but I did not find how to bootload from a CF card. Do you have some ideas? Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
1,394 Views

Do you mean read a file from a compact flash card, put it in memory and run the software? You'll need a bootloader a bit more complex than the EPCS one, or even the examples in the application note (http://www.altera.com/literature/an/an458.pdf?gsa_pos=1&wt.oss_r=1&wt.oss=nios%20boot). 

Did you have a look at redboot (http://sourceware.org/redboot/)? It could do the trick but I don't know how easy it is to adapt to the design. It seems that you need to set up an Ecos kernel first.
0 Kudos
Reply