FPGARelated.com
Forums

NIOS - newbie

Started by Nahid February 10, 2005
I'm trying to implement the following C++ code using NIOS processor's native 
instruction set.

int A;
int B;
for (int i = 0; i < B; i++)
  A = (A<<1)+4;

Could some1 step out to point me in the right direction of how I am supposed 
to do this?

Thanks... 


Hi Nahid,

If you want to cheat, you can compile it with the Nios tools and look
at the *.out file - I think that's the right file (don't have a Nios
environment here with me). This file has the C code interspersed with
the generated assembly. I'll bet you can do a better job at assembly
that Nios I's compiler.

-- Pete

[ p s o m m e r f e l d (at) gmail.com ]

Nahid wrote:
> I'm trying to implement the following C++ code using NIOS processor's
native
> instruction set. > > int A; > int B; > for (int i = 0; i < B; i++) > A = (A<<1)+4; > > Could some1 step out to point me in the right direction of how I am
supposed
> to do this? > > Thanks...