Hi,
In Leon3's testbench, I am putting some C program in PROM (i.e. replacing PROM.srec with my C program lets say add.srec).
The code of C prog is follows
---------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a=2,b=3,c;
c=a+b;
printf("Sum=%d",c);
printf("c address =%p",&c);
return 0;
------------------------------------------------------
After compilation in BCC(TSIM) i am getting correct output.
Means c's value 5 and address for c is something 0x4000af60.
Now I am compiling this C program in testbench with the help of ModelSim.
I want to see the same address or value of C in ModelSim also.
Please tell me how to do this?
Please also tell how to validate the result in BCC and ModelSim?