00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef ERROR_CODES
00020 #define ERROR_CODES
00021
00022 #include "processor.h"
00023
00024
00025
00026
00027
00028
00029 #define SUCCESS 0x0
00030
00031
00032 #ifdef I_AM_MASTER_DSP
00033 #define CODE_EXCEEDS_ROM 0x100
00034 #define CODE_LENGTH_MISMATCH 0x101
00035 #define CODE_LOAD_ERROR 0x102
00036 #endif
00037
00038
00039 #define EMIF_INIT_ERROR 0x200
00040
00041
00042 #define PRIM_LIST_REV_MISMATCH 0x300
00043 #define MSG_LIST_TOO_LONG 0x301
00044 #define MSG_LIST_LENGTH_MISMATCH 0x302
00045 #define CHECKSUM_ERROR 0x303
00046 #define END_OF_LIST_ADDR_ERR 0x304
00047 #define SLV_REPLY_ERR 0x305
00048
00049
00050 #define PRIM_REV_NOT_SET 0x400
00051 #define PRIM_REV_MISMATCH 0x401
00052 #define ILLEGAL_PRIM_ID 0x402
00053 #define PRIM_FNCT_PTR_ERROR 0x403
00054 #define MSG_EXCEEDS_LIST_BOUND 0x404
00055
00056
00057 #define MEMORY_EXCEEDED 0x500
00058 #define SLAVE_DSP_DNE 0x501
00059 #define SLAVE_DSP_OFF 0x502
00060 #define TRAP_PARAM_ERROR 0x503
00061 #define SLAVE_TXT_BUFF_DNE 0x504
00062 #define ROD_REG_DNE 0x505
00063 #define FIFO_DNE 0x506
00064 #define FIFO_BANK_DNE 0x507
00065 #define FRAME_SZ_LIMIT_ERR 0x508
00066 #define TRAP_CONFIG_ERROR 0x509
00067 #define BAD_EVENT_TRAP_PARAMS 0x50a
00068 #define BACK_PRESSURE_ILLEGAL 0x50b
00069 #define SERIAL_DATA_ILLEGAL 0x50c
00070 #define HISTOGRAM_SETUP_ERROR 0x50d
00071 #define PRIM_PARAMETER_ERROR 0x50e
00072 #define TASK_INSERTION_ERROR 0x50f
00073 #define TASK_REMOVAL_ERROR 0x510
00074 #define INVALID_CONFIG_SET 0x511
00075 #define INVALID_MODULE_NUM 0x512
00076 #define INVALID_CMD_STREAM_BUF 0x513
00077 #define LIMIT_EXCEEDED 0x514
00078
00079
00080 #define TASK_PRIORITY_MAX_ERROR 0x580
00081 #define TASK_DUPLICATE_ERROR 0x581
00082 #define TASK_PRIORITY_ERROR 0x582
00083 #define TASK_NONEXISTANT_ERROR 0x583
00084 #define TASK_REVISION_ERROR 0x584
00085 #define TASK_NOTRUNNING_ERROR 0x585
00086 #define TASK_INCOMPLETE_ERROR 0x586
00087 #define TASK_NOTRUN_ERROR 0x587
00088 #define TASK_CODING_ERROR 0x588
00089
00090
00091 #define NO_HISTOGRAMS_ERROR 0x5c0
00092 #define HISTOGRAMMING_ERROR_EVT 0x5c1
00093 #define UNEXPECTED_EVENT 0x5c2
00094 #define EVENT_DISCARDED 0x5c3
00095 #define TIMING_ERROR 0x5c4
00096 #define ACCUM_ERROR 0x5c5
00097 #define HEADER_TIME_OUT_ERR 0x5c6
00098 #define HEADER_ERR 0x5c7
00099 #define TRANSMIT_ERR 0x5c8
00100 #define EVENT_ERR 0x5c9
00101 #define EVENT_RETRANSMIT_ERR 0x5ca
00102 #define TRIGGER_ERR 0x5cb
00103
00104
00105 #ifdef I_AM_SLAVE_DSP
00106 #define MISPLACED_EVFRAG_HDR 0x5d0
00107 #define NOT_PKT_HEADER 0x5d1
00108 #endif
00109
00110
00111 #define TIME_OUT_ERR 0x600
00112 #define NO_TIMER_CHAN_AVAIL 0x601
00113 #define NO_CNT_RLD_REG_AVAIL 0x602
00114 #define NO_GBL_ADDR_REG_AVAIL 0x603
00115 #define ARRAY_INDEX_ERR 0x604
00116 #define BAD_ADDRESS 0x605
00117 #define SET_MEMORY_ERROR 0x606
00118 #define COPY_MEMORY_ERROR 0x607
00119 #define BOC_INITIALLY_BUSY 0x608
00120 #define BOC_CONT_BUSY 0x609
00121 #define SLAVE_NOT_READY 0x60a
00122 #define NON_WORD_BOUNDARY 0x60b
00123 #define WRONG_COMMAND_ID 0x60c
00124 #define CMD_BUFFER_OVERFLOW 0x60d
00125 #define CMD_STREAM_BUF_RSVD 0x60e
00126 #define BUFFER_NOT_READY 0x60f
00127 #define NO_SLAVES_ERROR 0x610
00128 #define PARAM_ERROR 0x611
00129 #define DSP_CMD_LINE_ERROR 0x612
00130 #define ROD_BUSY_ERR 0x613
00131 #define DATA_ERR 0x614
00132 #define LINKMASK_ERR 0x615
00133 #define CONFIG_ERROR 0x616
00134
00135
00136 #define MEMORY_TEST_ADDR_ERROR 0x701
00137 #define MEMORY_TEST_CB1_ERROR 0x702
00138 #define MEMORY_TEST_CB2_ERROR 0x704
00139 #define MEMORY_TEST_FLT0_ERROR 0x708
00140 #define MEMORY_TEST_FLT1_ERROR 0x710
00141 #define MEMORY_TEST_RAND_ERROR 0x720
00142
00143
00144
00145
00146
00147 #define REPEAT_PRIMITIVE 0x1000
00148 #define REPEAT_TASK 0x1001
00149 #define TASK_HALTED 0x1002
00150 #define TASK_QUERIED 0x1003
00151 #define TASK_INITIALIZED 0x1004
00152
00153
00154
00155
00156
00157
00158 #define ERROR_0 28
00159 #define ERROR_1 29
00160 #define FATAL_ERR 30
00161
00162
00163 #define SEVERITY_BITS ((FATAL_BIT) | (1 << (ERROR_1)) | 1 << (ERROR_0))
00164
00165
00166 #define FATAL_BIT (1 << (FATAL_ERR))
00167
00168
00169 #define FATAL(x) (abs(x) & FATAL_BIT)
00170
00171
00172
00173
00174
00175
00176
00177
00178 #define ADD_SEVERITY(x,y,z) (x = -((abs(x) & SEVERITY_BITS) | (abs(y) | (1 << (z)))))
00179
00180
00181
00182
00183
00184
00185
00186 #define MERGE_ERROR(x,y) (x = -((abs(x) & SEVERITY_BITS) | abs(y)))
00187
00188 #endif