Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20688 Discussions

Programming EPCS with FPGA config and NIOS II with AS

Altera_Forum
Honored Contributor II
984 Views

Hello, 

 

Please excuse me for this newby question. 

I have configured a NIOS II processor for a FPGA and written a small program. The NIOS II processor has a EPCS-interface for programming the FPGA-configuration and software into the EPCS-flash. 

Is there a way to program this into the EPCS-flash directly (using AS) so that I can remove the EPCS-interface from the NIOS II processor and can use these interface pins for other purposes. 

Can somebody explain to me how I can create a single file which contains the FPGA configuration and my NIOS II program. 

 

Thank and best regards, 

 

Wamor
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
271 Views

If your Nios software image (the .elf) file is in the flash then you need the EPCS controller in the SOPC builder project so that the CPU can boot and load the software from the flash. You can only use the pins for something else if you have other means of loading the software.

0 Kudos
Altera_Forum
Honored Contributor II
271 Views

Hello Daixiwen, 

 

Thank you taking the time to look at my question. 

To see if I understand everything correct could you have a look at the below text and correct it if needed. 

 

I have programmed the EPCS-flash with my fpga-configuration (contains NIOS II processor and some logical gates and my application) 

- After powering up the FPGA it will load its configuration-data from the EPCS-flash. 

- Then the NIOS-processor will be started with its boot-loader. 

- The boot-loader will load my application from the EPCS-flash into the RAM connected to the FPGA and jump to the starting-point of my application. 

 

Thank you and best regards, 

 

Wamor
0 Kudos
Altera_Forum
Honored Contributor II
271 Views

Yes that's it. And you need the epcs controler for two things, first the bootloader itself (which is contained in a small ROM inside the EPCS controller, that's why you need to set the CPU's reset vector to the controller, and connect the instruction master to it) and second to let the CPU access the EPCS when copying the software to memory.

0 Kudos
Reply