20-JUN-1994 Definition of the Status Returned by a DSP to TCC ------------------------------------------- Each DSP uses a block of 8 longwords to communicate its status back to TCC. There are 12 separate blocks, one of each Local and Global DSP. This status passing mechanisms is used in two different occasions and in two different ways. 1) When a DSP is just booted from TCC using Dual Port Memory Boot loading, it writes a special status value in the first word of its status block to TCC. bits Usage 0..23 reserved, written as 0 24..31 Hex value of the DSP ID (e.g. DSP A1 writes %XA1000000) 2) After the DSP has been told by TCC to load its parameters, it reports on its success. - If the DSP was successful in reading its parameters and getting ready for processing the first event, it returns %X00000000 in the first word of its status block to TCC. - If the DSP found a problem with the parameters, or can detect a problem with the Comm Ports that will prevent to process any event, it returns an error code and additional information to describe the problem it detected. Following is the list of all possible DSP Error Codes. Note that all error codes except code #0 (i.e. Status OK) and code #241 (CRC Port Token Error) are fatal. Any DSP reporting a fatal error code will not continue processing (i.e. it will not progress to Step D0 and it will not be able to perform its Level 1.5 processing), but instead will halt itself (by waiting in a "do nothing" loop). Error Code Actual Range Error Code Meaning ---------- ------- ------- 0 0 OK (can be returned by any module) In this case the Status response is composed of only one longword, (the first longword), which will be $00000000. 1 - 20 Local Tool Initialization Error 1 Invalid Local Tool Number (Tool ID) (also return Tool ID found) 2 Incorrect Number of Local Tool Parameters (also return number of params found and number of parameters expected) 3 Local Tool Parameter Out of Range (can also indicate that Tool ID in the Parameter Block did not match Tool ID of the Tool. Tool ID is Parameter Number 0). (also return parameter number and value of bad parameter) 4 Parameter Block Type Flag Mismatch in Local Tool Parameter Block Header 5 Term Number Mismatch in Local Tool Parameter Block Header 6 Reference Set Type Mismatch in Local Tool Parameter Block Header The Status response to the TCC is composed of 3 longwords: The first longword looks like: Bits Description ----- ----------- 7:0 Error Code (in the range 1-20, as described above) 15:8 Reserved 23:16 Term Number (expected) 31:24 Number of Parameters expected (if error code = 2) Which Parameter is bad (if error code = 3) Parameter Type Flag expected (if error code = 4) Reference Set Type expected (if error code = 6) Undefined (if error code = 1) The second longword looks like: Bits Description ----- ----------- 31:0 Tool Number found (if error code = 1) Number of Parameters found (if error code = 2) Value of bad Parameter (if error code = 3) Parameter Type Flag found (if error code = 4) Term Number found (if error code = 5) Reference Set Type found (if error code = 6) The third longword looks like: Bits Description ----- ----------- 31:0 Tool Number of Tool mapped to this Term 21 - 40 Local Tool Processing Error 21 * Local Tool Internal Memory Overflow * This error code is not currently generated by the DSP code. 41 - 60 Global Tool Candidate List Processing Error 41 * Local Tool Internal Memory Overflow * This error code is not currently generated by the DSP code. 61 - 80 Global Tool Answer Setting Error 61 * Global Tool Internal Memory Overflow * This error code is not currently generated by the DSP code. 81 - 100 Global Tool End Event Error 81 * Global Tool "Get Ready for next Event" Error * This error code is not currently generated by the DSP code. 101 - 120 Global Tool Initialization Error 101 Global Tool ID Mismatch (also return Tool ID found) 102 Incorrect Number of Global Tool Parameters (also return number of params found and number of parameters expected) 103 Global Tool Parameter Out of Range (also return parameter number and value of bad parameter) 104 Parameter Block Type Flag Mismatch in Global Tool Parameter Block Header 105 Term Number Mismatch in Global Tool Parameter Block Header The Status response to the TCC is composed of 3 longwords: The first longword looks like: Bits Description ----- ----------- 7:0 Error Code (in the range 101-120, as described above) 15:8 Reserved 23:16 Term Number (expected) 31:24 Number of Parameters expected (if error code = 102) Which Parameter is bad (if error code = 103) Parameter Type Flag expected (if error code = 104) Undefined (if error code = 101 or 105) The second longword looks like: Bits Description ----- ----------- 31:0 Tool Number found (if error code = 101) Number of Parameters found (if error code = 102) Value of bad Parameter (if error code = 103) Parameter Type Flag found (if error code = 104) Term Number found (if error code = 105) The third longword looks like: Bits Description ----- ----------- 31:0 Tool Number of Tool mapped to this Term 121 - 140 Frame Initialization Error 121 * Incorrect Number of Frame Parameters (also return number of params found and number of parameters expected) 122 * Frame Parameter Out of Range (also return parameter number and value of bad parameter) 123 * Parameter Block Type Flag Mismatch in Frame Parameter Block Header 124 * Term Number Mismatch in Frame Parameter Block Header * This error code is not currently generated by the DSP code. The Status response to the TCC is composed of 2 longwords: The first longword looks like: Bits Description ----- ----------- 7:0 Error Code (in the range 121-140, as described above) 15:8 Reserved 23:16 Term Number (expected) 31:24 Number of Parameters expected (if error code = 121) Which Parameter is bad (if error code = 122) Parameter Type Flag expected (if error code = 123) Undefined (if error code = 124) The second longword looks like: Bits Description ----- ----------- 31:0 Number of Parameters found (if error code = 121) Value of bad Parameter (if error code = 122) Parameter Type Flag found (if error code = 123) Term Number found (if error code = 124) 141-160 Universal Parameter Error 141 Memory Map Version Mismatch (also return Map Version found and Map Version expected) 142 Incorrect Number of Terms Defined (also return number of Terms found and number of Terms expected) 143 * Incorrect Number of Universal Parameters (also return number of params found and number of parameters expected) 144 * Universal Parameter Out of Range (also return parameter number and value of bad parameter) * This error code is not currently generated by the DSP code. The Status response to the TCC is composed of 2 longwords: The first longword looks like: Bits Description ----- ----------- 7:0 Error Code (in the range 141-160, as described above) 23:8 Reserved 31:24 Memory Map Version expected (if error code = 141) Number of Terms expected (if error code = 142) Number of Parameters expected (if error code = 143) Which Parameter is bad (if error code = 144) The second longword looks like: Bits Description ----- ----------- 31:0 Memory Map Version found (if error code = 141) Number of Terms found (if error code = 142) Number of Parameters found (if error code = 143) Value of bad Parameter (if error code = 144) 241-255 DSP Comm Port Error Codes 241 A CRC Port has not given up its Token to CRC 242 A CRC Port has non-empty FIFOs 243 The LG-from-Prev Port has non-empty FIFOs 244 The LG-to-Next Port has non-empty FIFO Note that Error Code 241 (CRC Port Token Error) is not necessarily fatal. If for example a Local DSP does not have a CRC channel attached to a Comm Port, it is possible for the Comm Port to keep its Token. If the L1.5 Cal Trig were configured to not require the missing ERPB data (i.e. it is running without the full eta coverage) then the system could continue operation. For only this Error Code, the DSP will NOT halt itself. The TCC needs to decide whether this error is fatal (and try to recover), or whether processing can continue. The Status response to the TCC is composed of 1 longword: The first longword looks like: Bits Description ----- ----------- 7:0 Error Code (in the range 241-255, as described above) 23:8 Reserved 31:24 ID of Comm Port with error condition (if error code = 241-244) ------------------------------------------------------- Summary of the Status Blocks in the Dual-Port Memory ------------------------------------------------------- Address range in Dual Port Memory DSP Address 68K Address Status Block Description (in HEX) (in HEX) --------------------------- ------------------ ------------------- Local DSP A2 Status to TCC 8000 1f90 - 8000 1f97 00a0 7e40 - 00a0 7e5f Local DSP A3 Status to TCC 8000 1f98 - 8000 1f9f 00a0 7e60 - 00a0 7e7f Local DSP A4 Status to TCC 8000 1fa0 - 8000 1fa7 00a0 7e80 - 00a0 7e9f Local DSP A1 Status to TCC 8000 1fa8 - 8000 1faf 00a0 7ea0 - 00a0 7ebf Local DSP B3 Status to TCC 8000 1fb0 - 8000 1fb7 00b0 7ec0 - 00b0 7edf Local DSP B4 Status to TCC 8000 1fb8 - 8000 1fbf 00b0 7ee0 - 00b0 7eff Local DSP B1 Status to TCC 8000 1fc0 - 8000 1fc7 00b0 7f00 - 00b0 7f1f Local DSP C3 Status to TCC 8000 1fc8 - 8000 1fcf 00c0 7f20 - 00c0 7f3f Local DSP C4 Status to TCC 8000 1fd0 - 8000 1fd7 00c0 7f40 - 00c0 7f5f Local DSP C1 Status to TCC 8000 1fd8 - 8000 1fdf 00c0 7f60 - 00c0 7f7f Local DSP C2 Status to TCC 8000 1fe0 - 8000 1fe7 00c0 7f80 - 00c0 7f9f Global DSP B2 Status to TCC 8000 1fe8 - 8000 1fef 00b0 7fa0 - 00b0 7fbf TCC Status to all DSPs 8000 1ff0 - 8000 1fff 00*0 7fc0 - 00*0 7fff * Recall that the "TCC Status to all DSP" block must appear in the Dual Port Memory of each Hydra card. Therefore this block appears three times in the 68K VME Memory Map: at 00a0 7fc0, 00b0 7fb0, and 00c0 7fb0.