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++
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.
12748 Discussions

Functions are not getting called even if they are called in Nios II S/W Design/Code

Altera_Forum
Honored Contributor II
1,551 Views

Hi all, 

 

I am new to NIOS but I am trying to learn it. I have written a code, which is having multiple functions, some of the functions are calling other functions. Now here the problem starts, as I am calling other functions from inside of another function, many times the called functions are not getting called or executed. This I have completely verified by observation in the Signal Tap(I am Using PIOs). 

 

For Example: There is a Write Function, One Read Function and a Delay Function. Whenever I am calling Delay Function inside a Write/Read Function, it is not getting called. I don't know the reasons of it but I am attributing it to Stack Overflow or Usage of 100MHz clock in NIOS. 

 

Please help me in finding the reasons for it and a possible solution. 

 

Regards, 

Dindayal
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
743 Views

could you please post some code?! 

 

Does your NIOS II is configured with data-cache?
0 Kudos
Altera_Forum
Honored Contributor II
743 Views

Yes NIOS is configured with 2k of Data Cache and 4k of Instruction Cache. I am attaching the code. 

 

The problem which I am facing is that whenever I am calling the delay_1us() function, it is not getting called and this is leading to incorrect writing/reading from Single Wire Interface. I don't know the reason of this, it might be because of Stack issues.
0 Kudos
Altera_Forum
Honored Contributor II
743 Views

How do you notice the function not been called? you print something or breakpoint in that function?

0 Kudos
Reply