I'm new to FPGA and nios2. I want to add two integers using niosII. When I going to add two integers I wrote a C code like this.
#include "stdio.h"
#include "io.h"
#include "system.h"
int main()
{
unsigned int a = 24,b=56,c,ans;
c=a+b;
printf("%d\n",c);
while(1);
return 0;
}
this code gave me correct answer. Now my question is which processor did the a+b
operation? computer or FPGA board?. and is here essential to use custom component to do this operation? are there any inbuilt arithmetic operations in niosII?. Please anyone can give me answer. Thanks in advance.