Exemplo n.º 1
0
int main (int argc, char ** argv)
{
	printf ("   VALIDATION   TESTS\n");
	printf ("====================\n\n");

	init (argc, argv);

	test_lookupre ();
	test_extended ();

	word_test ();
	line_test ();
	icase_test ();
	invert_test ();
	print_result ("testmod_validation");

	return nbError;
}
Exemplo n.º 2
0
void menu ()
{
	int cmd;

	for (;;) {
		printf (&uart, "\33[H\33[2J");
		printf (&uart, "\nTesting memory on LDE-Vega board\n");
		printf (&uart, "Generator %d.%d MHz, CPU clock %d.%d MHz, bus clock %d.%d MHz\n",
			ELVEES_CLKIN/1000, ELVEES_CLKIN/100%10, KHZ/1000, KHZ/100%10,
			MPORT_KHZ/1000, MPORT_KHZ/100%10);

#ifdef ENABLE_ICACHE
		puts (&uart, "Instruction cache enabled\n");
#else
		puts (&uart, "Instruction cache disabled\n");
#endif
#ifdef ENABLE_DCACHE
		puts (&uart, "Data cache enabled\n");
#else
		puts (&uart, "Data cache disabled\n");
#endif
		printf (&uart, "  CRPLL  = %08X\n", MC_CRPLL);
		printf (&uart, "  CSCON0 = %08X\n", MC_CSCON0);
		printf (&uart, "  CSCON3 = %08X\n", MC_CSCON3);
		printf (&uart, "  SDRCON = %08X\n", MC_SDRCON);
		printf (&uart, "  SDRTMR = %08X\n", MC_SDRTMR);
		printf (&uart, "  SRTMR  = %08X\n", MC_SRTMR);

		printf(&uart, "\n  1. Test SDRAM address signals");
		printf(&uart, "\n  2. Test SDRAM address %08X", SDRAM_START + 0x02aaaaa8);
		printf(&uart, "\n  3. Test SDRAM address %08X", SDRAM_START + 0x02555554);
		printf(&uart, "\n  4. Test all SDRAM (%d Mbytes)", SDRAM_SIZE/1024/1024);
		printf(&uart, "\n  5. Test CRAMS address signals");
		printf(&uart, "\n  6. Test CRAMS address %08X", CRAMS_START + 0x001aaaa8);
		printf(&uart, "\n  7. Test CRAMS address %08X", CRAMS_START + 0x00155554);
		printf(&uart, "\n  8. Test all CRAMS (%d Mbytes)", CRAMS_SIZE/1024/1024);
		puts (&uart, "\n\n");

		/* Ввод команды. */
		puts (&uart, "Command: ");
		cmd = getchar (&uart);
		putchar (&uart, '\n');

		if (cmd == '\n' || cmd == '\r')
			break;

		if (cmd == '1') {
			sdram_test_address_bus ();
		}
		if (cmd == '2') {
			word_test (SDRAM_START + 0x02aaaaa8);
		}
		if (cmd == '3') {
			word_test (SDRAM_START + 0x02555554);
		}
		if (cmd == '4') {
			sdram_test ();
		}
		if (cmd == '5') {
			crams_test_address_bus ();
		}
		if (cmd == '6') {
			word_test (CRAMS_START + 0x001aaaa8);
		}
		if (cmd == '7') {
			word_test (CRAMS_START + 0x00155554);
		}
		if (cmd == '8') {
			crams_test ();
		}
		puts (&uart, "Press any key");
		getchar (&uart);
	}
}