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++
12603 Discussions

NIOIS II Register Interrupts "alt_irq_register()" vs ""alt_ic_isr_register()"

WShep1
New Contributor II
1,425 Views

I am porting a Design from a Max 10 FPGA to a C10LP FPGA.  One of the issues that I have run into is that the NIOS II function to register interrupts that I used in the Max 10, "alt_ic_isr_register()", gets an "undefined function" error when I compile the software for the C10LP.  However,  I have found that the older "alt_irq_register()" function does works and when using it the one interrupt in the design does function properly.

My question is the following:  Is it important to use the newer "alt_ic_isr_register()" function or is the "alt_irq_register()" OK to use?  

If it is important to use the newer function how does it get enabled?

Thanks for your attention to this request,

 

0 Kudos
1 Solution
KellyJialin_Goh
Employee
1,368 Views

Hi,

Cyclone 10 LP is an upgrade of the MAX10 therefore Intel has found out this limitation and makes sure EIC/VIC needs to be present now and on the latest devkits to use the enhanced HAL API.


Hope this helps.


Thank you.

Regards,

Kelly




View solution in original post

0 Kudos
6 Replies
KellyJialin_Goh
Employee
1,403 Views

Hi,

Welcome to Intel's forum.

You may refer to the link here which explains the differences of both register interrupts: https://www.intel.com/content/dam/support/us/en/programmable/support-resources/bulk-container/pdfs/literature/an/an595.pdf

under the alt_ic_isr_register() versus alt_irq_register() section.


Kindly also have a look at The NIOS II Software Development Handbook and download it from the link here: https://www.intel.com/content/www/us/en/docs/programmable/683525/21-3/software-developer-s-handbook-revision.html after referring to the differences of both register interrupts:


I have summarized a few sections for your ease from NIOS II Handbook:

9.2.2 HAL ISR Restrictions

9.2.3 Writing an ISR- alt_irq_register() user to enable it by writing an ISR to match a prototype

14.1.46 HAP API references -List of both functions and the usage.


Hope this helps to clear your doubts.


Thank you.

Regards,

Kelly




0 Kudos
WShep1
New Contributor II
1,391 Views

Thanks for the information on the two interrupt registering functions.  It appears from reading the information that you referenced that the alt_ic_isr_register() function is preferred because it is newer and the alt_irq_register() is "deprecated" and that "Intel recommends using the enhanced HAL interrupt API" (NIOS II Software Developers Handbook Section 15.1.46).

 

However when I try to use alt_ic_isr_register(), I get an undefined function error during compilation.  alt_ic_isr_register() works fine with the Max10 Project, but it doesn't work with the C10LP Project using the same software.  However, alt_irq_register() works with the C10LP Project.  Neither Project has an EIC/VIC instantiated in the Qsys System.  If it is preferred to use the alt_ic_isr_register() function, can you tell me how to get past the undefined error problem????

0 Kudos
KellyJialin_Goh
Employee
1,383 Views

Hi,

The alt_ic_isr_register() function cannot be implemented and will return error as the EIC is not present in your qsys design and cannot be implemented by EIC driver.

If you want to enable the alt_ic_isr_register() function you may have to add in the VIC/EIC in your design with the steps from this link: https://www.intel.com/content/dam/support/us/en/programmable/support-resources/bulk-container/pdfs/literature/an/an595.pdf under Vector Interrupt Controller section.


The alt_irq_register() function is still supported by Quartus. If it is working from your end, you could just go ahead with this option.


Hope this clarifies your doubts.


Thank you.

Regards,

Kelly



0 Kudos
WShep1
New Contributor II
1,376 Views

Thank you for your response and I will do as you suggest and use the alt_irq_register() function.  However, out of curisoity I am wondering why the alt_ic_isr_register() function worked when the design was in the Max10 FPGA.  The design in the Max10 did not have a VIC/EIC either.

0 Kudos
KellyJialin_Goh
Employee
1,369 Views

Hi,

Cyclone 10 LP is an upgrade of the MAX10 therefore Intel has found out this limitation and makes sure EIC/VIC needs to be present now and on the latest devkits to use the enhanced HAL API.


Hope this helps.


Thank you.

Regards,

Kelly




0 Kudos
KellyJialin_Goh
Employee
1,329 Views

Hi,

I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


Thank you.

Regards,

Kelly Jialin, GOH


0 Kudos
Reply