/*
 * This is a simple program to test multi-core microblaze SoC
 */

#include <stdio.h>
//#include "xuartlite_l.h"
#include "xparameters.h"
#include "xil_cache.h"

void print(char *str);

void enable_caches()
{
#if XPAR_MICROBLAZE_USE_ICACHE
	microblaze_enable_icache();
#endif
#if XPAR_MICROBLAZE_USE_DCACHE
	microblaze_enable_dcache();
#endif
}

void disable_caches()
{
#if XPAR_MICROBLAZE_USE_ICACHE
	microblaze_disable_icache();
#endif
#if XPAR_MICROBLAZE_USE_DCACHE
	microblaze_disable_dcache();
#endif
}

int main()
{
    enable_caches();

    print("Core 0: Hello World!\n\r");

    disable_caches();

    return 0;
}
