88 lines
2.3 KiB
C
88 lines
2.3 KiB
C
#ifndef _DEF_V2MEMTEST_H_
|
|
#define _DEF_V2MEMTEST_H_
|
|
|
|
#define V2MEMTEST__VERSION__MAJOR 0
|
|
#define V2MEMTEST__VERSION__MINOR 1
|
|
#define V2MEMTEST__VERSION__PATCH 0
|
|
|
|
typedef enum _def_eTestType {
|
|
E_TESTTYPE__ADDRESS,
|
|
E_TESTTYPE__DATA__BITMOVE,
|
|
E_TESTTYPE__DATA__RANDOM,
|
|
E_TESTTYPE__DATA__HUGE,
|
|
E_TESTTYPE__DATA__ALL,
|
|
}def_eTestType;
|
|
|
|
typedef enum _def_eTMUTarget {
|
|
E_TMUTARGET__0,
|
|
E_TMUTARGET__1,
|
|
E_TMUTARGET__BOTH,
|
|
}def_eTMUTarget;
|
|
|
|
typedef enum _def_eTMURamLimit {
|
|
E_TMUTARGET__1MB,
|
|
E_TMUTARGET__2MB,
|
|
E_TMUTARGET__3MB,
|
|
E_TMUTARGET__4MB,
|
|
}def_eTMURamLimit;
|
|
|
|
typedef enum _def_eLogLevel {
|
|
E_LOGLEVEL__ERROR,
|
|
E_LOGLEVEL__WARNING,
|
|
E_LOGLEVEL__INFO,
|
|
E_LOGLEVEL__DEBUG,
|
|
E_LOGLEVEL__TRACE,
|
|
}def_eLogLevel;
|
|
|
|
typedef struct _def_sOptions
|
|
{
|
|
def_eLogLevel ucLogLevel;
|
|
unsigned char bLogStdOut;
|
|
char szLogFileName[2048];
|
|
char szTSVFile[2048];
|
|
unsigned short usNbLoops;
|
|
def_eTestType eTestType;
|
|
def_eTMUTarget eTMUTarget;
|
|
def_eLogLevel eLogLevel;
|
|
def_eTMURamLimit eTMURamLimit;
|
|
}
|
|
|
|
const char szTitle[] = \
|
|
"V2MemTest-%d.%d.%d - A CLI Tool to test & fix Voodoo² TMU System\n" \
|
|
"Copyright (C) 2026 ChaCha\n";
|
|
|
|
const char szLicence[] = \
|
|
"This program is free software : you can redistribute it and/or modify it under\n" \
|
|
"the terms of the GNU General Public License as published by the Free Software\n" \
|
|
"Foundation either version 3 of the License, or (at your option) any later version.\n" \
|
|
"This program is distributed in the hope that it will be useful, but WITHOUT ANY\n" \
|
|
"WARRANTY !\n";
|
|
|
|
const char szHelp[] = \
|
|
"Usage ./v2memtest <options>\n" \
|
|
"\n"
|
|
"options:\n"
|
|
"\t-h :\tthis output\n"
|
|
"\n"
|
|
"\t-v <level> :\tset log level to the specified value.\n"
|
|
"\t\t 0: ERR, 1: INFO, 2: WARN, 3: DEBUG, 4: TRACE\n"
|
|
"\n"
|
|
"\t-fl <file> :\tset a log file path & name.\n"
|
|
"\n"
|
|
"\t-fd <file> :\tset a failure report path & base name.\n"
|
|
"\t\t Note that the test name will be appended to the file name.\n"
|
|
"\t\t eg: file name is 'foo' running 'data-bitmove' :\n"
|
|
"\t\t foo_data-bitmove.tsv\n"
|
|
"\n"
|
|
"\t :\t\n"
|
|
"\n"
|
|
"\t :\t\n"
|
|
"\n"
|
|
"\n"
|
|
|
|
"( -h | -v <level> | -fl <file> | -fd <file> |"
|
|
|
|
|
|
extern def_sOptions sOptions;
|
|
|
|
#endif //_DEF_V2MEMTEST_H_
|