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

Instruction simulator exception

Altera_Forum
Honored Contributor II
2,067 Views

When running a simple program (it prints a few things to stdout) in the Nios II instruction simulator, I see the following console output near the end of the expected output: 

 

COSIM: Internal Error (unhandled exception) in file cosim_main.cpp at line 132 

 

Naturally, I don't have access to cosim_main.cpp, but perhaps an Altera person is reading this and has some insight? I can provide more details if it might help track down a bug in the IDE.
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
546 Views

We're taking a look at this right now.

0 Kudos
Altera_Forum
Honored Contributor II
546 Views

I'm trying to replicate this behavior, but the instruction simulator prints everything fine. Right now I'm running the hello_world example application and it runs fine. Could you try running this (hello_world) and see if you get the same error? Or else, is there anyway you could send me your files? 

 

Thanks! 

 

Silvio
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

Thanks for the response. I do see the same error when running the canned hello_world example in the ISS. I see the following warning in the console before the rest of the output, but I wouldn't think it has any relevance: 

 

Warning : SOPC Builder system component user_logic_ImageFilterFlash_arch_module_0 is not supported by the simulator. Simulation may be incorrect if your software attempts to access it 

 

To whom should I email which files? Silvio, I don't see a way to email you directly.
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

please email them to khallbec@altera.com 

 

If you can zip the files (then rename the zip so it doesn't get virussed out), then send them it would be great. We have someone who wants to debug it. 

 

Example false zip name 

 

test.tes 

 

 

 

Thanks 

 

Kerri
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

yossarian, 

 

Running your program appears to be generating an internal error in the ISS, hence the unhandled exception error message. 

 

Could you try running the canned hello-world example using an altera-provided ptf file eg. /altera/kits/nios2/examples/verilog/stratix_1s10/fast/fast_1s10.ptf to see if that works.  

 

It may be the case that your software is inadvertently accessing a peripheral in your system, which is unsupported, thus exposing a bug which is generating the internal error.
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

I've tried running the canned hello_world example in the ISS with my system. All that software does is a single printf and exit. Why would that program need to use any of my custom hardware? 

 

I just tried running hello_world on a standard Altera system (the "standard" system for my particular Stratix board), but a seemingly unrelated error caused that to fail. I started a new thread for this error: 

 

http://www.niosforum.com/forum/index.php?a...t=st&f=17&t=331 (http://www.niosforum.com/forum/index.php?act=st&f=17&t=331)
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

there was a problem with the shutdown code for the iss because it didn't handle the 2 top-level clock ports in the user-logic module correctly.  

For a quick workaround to get rid of the error, remove the 2 top level clocks for the user logic module (sclk and clk). As mentioned above though, this internal error doesn't affect program execution, and can be safely ignored. 

 

Fixed in a future release. Not the next one, but the one after.
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

should have said "should be fixed in a future release". I have no control over what gets fixed and what doesn't. 

 

:_)
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

Thanks for sorting it out, Kerri. 

 

Now if only I could get the N2IDE working again...
0 Kudos
Altera_Forum
Honored Contributor II
546 Views

what isn't working?

0 Kudos
Reply