SFost3
New Contributor
6 years agoBaremetal Application Running Very Slow on Arria 10 ARM
Hello,
I have being trying to run a Baremetal Application on the Arria 10 ARM but it is running very slow. I wrote some test code and ran it on the Arria 10 system and a Xilinx system. The Xilinx system is about 25x faster.
Test Code below:
#include <time.h>
#include <stdio.h>
#include <string.h>
unsigned char testBuffer[500];
void testFunction1(void);
void testFunction2(int m);
int main(void)
{
clock_t start, end, total;
start = clock();
testFunction1();
end = clock();
total = end - start;
printf("Total = %d\r\n", total);
return 0;
}
void testFunction1(void)
{
int i = 0;
int j = 0;
for(i = 0; i < 200; i++)
{
for(j = 0; j < 200; j++)
{
memset(testBuffer, j, 500);
testFunction2(200);
}
}
}
void testFunction2(int m)
{
int i = 0;
for(i = 0; i < m; i++)
{
memset(testBuffer, i, 500);
}
}The scatter file I am using:
OCRAM 0xFFE00000 0x40000
{
APP_CODE +0
{
* (+RO, +RW, +ZI)
}
ARM_LIB_STACKHEAP 0xFFE20000 EMPTY 0x20000 ; Application heap and stack
{ }
}I am using the Arm Compiler 5 (DS-5 built-in) and I have followed the steps in this guide: https://fpgawiki.intel.com/wiki/SoCEDSGettingStarted but I can't get any baremetal applications to run at a reasonable speed.
Thank you.