Forum Discussion
Altera_Forum
Honored Contributor
22 years agoNios II
I have been evaluating the Nios core for the past month now. I started with the Nios I and the sdk environment. I was extreemly impressed! I was able to fit a fairly equiped Nios I into a Cyclone ...
Altera_Forum
Honored Contributor
22 years ago --- Quote Start --- originally posted by rppolicy@Jul 2 2004, 01:06 PM does nios2 support the s part? --- Quote End --- I am asssuming you're asking if the legacy SDK supports Nios II/s ?? If so, the answer is yes. Only the /f (with data cache) isn't officially supported with the legacy SDK mode. The issue of support revolves around calling pre-compiled C libraries from code under the legacy SDK; a volatile pointer can "lose" its volatility with certain C library calls, and since the legacy SDK meaning of "volatile" is "do not cache", it can lead to cache coherency problems.... in the HAL/IDE world, we volatile means "do not optimize" (which is really the true ANSI C meaning of the keyword). In the legacy SDK, when you run nios2-build, we throw in a compiler switch "-mno-cache-volatile" which tells the compiler to treat 'volatile' as it did in the Nios I SDK... so for this reason volatile pointers and structs will bypass the cache... until a C library is called that messes-up this declaration for something passed in! Also, thank you for the feedback. Just so you know, I prefer the struct-method of accessing peripheral registers myself; I too think its much cleaner. The problem is that this struct-method relies on the above definition of volatile... sadly its hard to make everyone happy...