202 lines
4.0 KiB
C
202 lines
4.0 KiB
C
/****************************************************************/
|
|
/* TMS320C32 */
|
|
/* ====== BIOS, ÊËÀÈÍ, ÊËÂÑÏ ====== */
|
|
/* ÖÍÈÈ ÑÝÒ (ñ) 1998-2001ã. */
|
|
/****************************************************************/
|
|
/* log_to_mem.h
|
|
****************************************************************
|
|
* Çàïèñü ëîãîâ â ïàìyòü *
|
|
****************************************************************/
|
|
|
|
#ifndef _LOG_TO_MEM
|
|
#define _LOG_TO_MEM
|
|
|
|
|
|
#define SLOW_LOG 1
|
|
#define FAST_LOG 0
|
|
|
|
#define SIZE_LOGS_ARRAY 90
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
int stop_log_level_1;
|
|
int stop_log_level_2;
|
|
int stop_log_level_3;
|
|
|
|
int stop_log_slow_level_1;
|
|
int stop_log_slow_level_2;
|
|
int stop_log_slow_level_3;
|
|
|
|
int logs[SIZE_LOGS_ARRAY];
|
|
|
|
// int log1;
|
|
// int log2;
|
|
// int log3;
|
|
// int log4;
|
|
// int log5;
|
|
// int log6;
|
|
// int log7;
|
|
// int log8;
|
|
// int log9;
|
|
// int log10;
|
|
// int log11;
|
|
// int log12;
|
|
// int log13;
|
|
// int log14;
|
|
// int log15;
|
|
// int log16;
|
|
// int log17;
|
|
// int log18;
|
|
// int log19;
|
|
// int log20;
|
|
//
|
|
// int log21;
|
|
// int log22;
|
|
// int log23;
|
|
// int log24;
|
|
// int log25;
|
|
// int log26;
|
|
// int log27;
|
|
// int log28;
|
|
// int log29;
|
|
// int log30;
|
|
//
|
|
// int log31;
|
|
// int log32;
|
|
// int log33;
|
|
// int log34;
|
|
// int log35;
|
|
// int log36;
|
|
// int log37;
|
|
// int log38;
|
|
// int log39;
|
|
// int log40;
|
|
//
|
|
// int log41;
|
|
// int log42;
|
|
// int log43;
|
|
// int log44;
|
|
// int log45;
|
|
// int log46;
|
|
// int log47;
|
|
// int log48;
|
|
// int log49;
|
|
// int log50;
|
|
//
|
|
// int log51;
|
|
// int log52;
|
|
// int log53;
|
|
// int log54;
|
|
// int log55;
|
|
// int log56;
|
|
// int log57;
|
|
// int log58;
|
|
// int log59;
|
|
// int log60;
|
|
//
|
|
// int log61;
|
|
// int log62;
|
|
// int log63;
|
|
// int log64;
|
|
// int log65;
|
|
// int log66;
|
|
// int log67;
|
|
// int log68;
|
|
// int log69;
|
|
// int log70;
|
|
//
|
|
// int log71;
|
|
// int log72;
|
|
// int log73;
|
|
// int log74;
|
|
// int log75;
|
|
//
|
|
// int log76;
|
|
// int log77;
|
|
// int log78;
|
|
// int log79;
|
|
// int log80;
|
|
// int log81;
|
|
// int log82;
|
|
// int log83;
|
|
// int log84;
|
|
// int log85;
|
|
//
|
|
// int log86;
|
|
// int log87;
|
|
// int log88;
|
|
// int log89;
|
|
// int log90;
|
|
|
|
// long addres_mem; //Àäðåñ ïàìyòè äëy çàïèñè ëîãîâ
|
|
//
|
|
// int count_log_params_fast_log; //Êîëè÷åñòâî çàïèñûâàåìûõ â ëîã ïàðàìåòðîâ
|
|
// int start_write_fast_log; //Íà÷àëî çàïèñè ëîãà, äëÿ îïðåäåëåíèÿ count_log_params_fast_log
|
|
// long real_finish_addres_mem; //Àäðåñ ïàìyòè äëy çàïèñè ëîãîâ
|
|
} LOGSPARAMS;
|
|
|
|
#define LOGSPARAMS_DEFAULTS { 0,0,0, 0,0,0, \
|
|
{0} \
|
|
}
|
|
|
|
|
|
|
|
/* Îïðåäåëåíèy äëy ðàáîòû ëîããåðà */
|
|
#define START_ADDRESS_LOG 0x0a0000
|
|
#define END_ADDRESS_LOG 0x0bf000
|
|
|
|
//#define START_ADDRESS_LOG 0xa0000 /* 0x904000 */
|
|
//#define END_ADDRESS_LOG 0x0cf000 /* 0x90a000 */
|
|
|
|
|
|
#define END_ADDRESS_LOG_LEVEL_2 0xa8000
|
|
#define END_ADDRESS_LOG_LEVEL_3 0xb0000
|
|
|
|
#define START_ADDRESS_LOG_SLOW 0x0d0000 /* 0x904000 */
|
|
#define END_ADDRESS_LOG_SLOW 0x0ef000 /* 0x90a000 */
|
|
#define END_ADDRESS_LOG_SLOW_LEVEL_2 0xdb000
|
|
#define END_ADDRESS_LOG_SLOW_LEVEL_3 0xe5000
|
|
|
|
|
|
|
|
#define LENGTH_HAZARD 100
|
|
#define COUNT_SAVE_LOG_OFF 500
|
|
|
|
|
|
/* íå ïðîâîäèòü ðîòàöèþ ëîãîâ */
|
|
#define NO_ROTATE_LOG 0
|
|
|
|
extern int no_write; // Ôëàã, ÷òîáû íå ïèñàòü (åñëè ÷òî)
|
|
extern int stop_log; // Ëîãè îñòàíîâèëèñü
|
|
|
|
|
|
/* Çàïèñü äâóõ ìëàäøèõ áàéòîâ àðãóìåíòà â ïàìyòü, ãäå ëîãè ëåæàò */
|
|
void write_to_mem(int tlog,int DataM);
|
|
void write_to_mem_a(int DataM);
|
|
|
|
void start_write_acp(int Data1, int Data2, int Data3, int Data4, int Data5);
|
|
|
|
/* Ïðîâåðêà ãðàíèöû ïàìyòè äëy ëîãîâ */
|
|
void test_mem_limit(int tlog,int ciclelog);
|
|
void test_mem_limit_a(void);
|
|
void set_start_mem(int tlog);
|
|
void get_log_params_count(void);
|
|
|
|
/* Î÷èñòêà ïàìyòè (îáíóëåíèå) */
|
|
void clear_mem(int tlog);
|
|
|
|
//Î÷èñòêà ïîëåé logpar.logNN
|
|
void clear_logpar();
|
|
|
|
extern LOGSPARAMS logpar;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _LOG_TO_MEM */
|