============================================================================= SerIFace Protocol Definition ============================================================================= Updates: 14/04/04 - Re-assigned Status Command as Read-Version command 11/03 - This Protocol was born! INTRODUCTION: ============= This is a protocol to interface RS232 to an A16 D32 bus SLOWLY! It has extra 'commands' added to ease address decoding in some circumstances. Serial Port Settings: o 115200 BAUD, no parity, 1 stop bit, no flow control. Protocol: o Data arranged in 8 byte messages. o A message sent always generates a message reply. o To overcome message failures a timeout will reset the serial receiver if it does not recieve all bytes after a "long" time. The software should do the same. o Keep in mind a message sent could be used to reset a module and hence no reply message will be recieved. MESSAGE FORMAT: =============== TX_MSG = TARGET, COMMAND, ADDR(7:0), ADDR(15:8), DATA(7:0), DATA(15:8), DATA(23:16), DATA(31:24) RX_MSG = same as TX_MSG, except with new data (if generated) and COMMAND LSbit = 1 MESSAGE COMPONENT DESCRIPTIONS: =============================== TARGET: ------- 0x00-0x07 = FE module 0-7 0x08 = BE module 0x09 = BE-Trigger module 0x10 = Development board 0x11 = DevBoard 2 (for testing with more than one target) TARGET selects which module acts on the serial bit stream. No routing is done - the data goes to every module. Each module has a hardwired number (TARGET ID) which dictates which messages it should reply to. Unused destinations will be ignored. If 2 modules reply to the same request, we will have garbled data, and a problem! COMMAND: -------- Reply (DATA): 0x00 = Test 0x01 (0xA110A110) 0x02 = Write 0x03 (write data) 0x04 = Read 0x05 (read data) 0x06 = Read_ROM 0x07 (Read-Only-Memory data read) 0x08 = Read_FIFO 0x09 (FIFO Read) 0x0A = Read_FIFO_Stat 0x0B (FIFO depth counter + full/empty flags) 0x0C = Read_Version 0x0D (reports a user part-specifiable module version id) 0x0E = Reset 0x0F (0xDDDDBBBB) 0x10 = Send Trigger 0x11 (0xEEEEAAAA) 0x40 = User Write 0 0x81 (undefined) 0x42 = User Write 1 0x83 (undefined) 0x44 = User Write 2 0x85 (undefined) 0x46 = User Write 3 0x87 (undefined) 0x48 = User Write 4 0x89 (undefined) 0x4a = User Write 5 0x8b (undefined) 0x4c = User Write 6 0x8d (undefined) 0x4e = User Write 7 0x8f (undefined) 0x80 = User Read 0 0x81 (undefined) 0x82 = User Read 1 0x83 (undefined) 0x84 = User Read 2 0x85 (undefined) 0x86 = User Read 3 0x87 (undefined) 0x88 = User Read 4 0x89 (undefined) 0x8a = User Read 5 0x8b (undefined) 0x8c = User Read 6 0x8d (undefined) 0x8e = User Read 7 0x8f (undefined) 0xYY = All others 0xYY+1 (0xDEADD0D0) ADDRESS: -------- Address of the data - maximum 64kBytes ADDR(1:0) is ignored and assumed 00 (due to 4 byte data width) DATA: ----- Always 4 bytes. Examples: --------- For TX=0x0000111104030201 (Test, module = 0) RX=0x0001111110All0Al For TX=0x0002000178563412 (Write, addr=0x100, data=0x12345678) RX=0x0003000178563412 For TX=0x0004000100000000 (Read - addr=0x100, data=0x12345678) RX=0x0005000178563412 Note on Version: ---------------- The version id uses the target id to generate bits 31:16, such: DB - 0x1000 BE - 0x1200 FEs - 0x1300 Bits (15:0) are user specifiable. eg: BE Version ID (User ID = 0x0104) = 0x12000104