Go to the documentation of this file.00001 #ifndef DEFINES_H
00002 #define DEFINES_H
00003
00004 #define ROC_PASSWORD 832226211
00005
00006 #define ROC_SUCCESS 0 //Success
00007 #define ROC_READBACK_ERROR 1 //Readback failed (different value)
00008 #define ROC_ADDRESS_ERROR 2 //Wrong / unexisting address
00009 #define ROC_VALUE_ERROR 3 //Wrong value
00010 #define ROC_PERMISSION_ERROR 4 //Permission denied (to low level addresses)
00011 #define ROC_ANSWER_DELAYED 5 //The called function needs longer to run.
00012 #define ROC_NETWORK_TRANSMISSION_ERROR 6 //Some slow control udp-data packets got lost.
00013 #define ROC_I2C_ERROR 7 //No Response (No Ack) Error on I2C bus.
00014
00015
00016
00017
00018
00019
00020 #define ROC_ROCID 0x000010 // r/w roc id
00021
00022 #define ROC_CMD_LST_NR 0x020000 // w
00023 #define ROC_CMD_LST_ACTIVE 0x020004 // w
00024 #define ROC_CMD_LST_MEM 0x021000 // w
00025 #define ROC_CMD_LST_SIZE 0x000800 // size of memory for commands lists
00026 #define ROC_CMD_LST_NUMBER 0x000008 // number of commands lists
00027 #define ROC_CMD_LST_PUT 0x02000000 // PUT command in commands list
00028 #define ROC_CMD_LST_ADDRMASK 0x00ffffff // address mask for operations lists
00029
00030
00031 #define OPB_ADDRESS_RANGE 0x1000000
00032
00033
00034 #define ROC_ETH_HWV 0x100000 // r Hardware-Version
00035 #define ROC_ETH_SWV 0x100004 // r Software-Version
00036 #define ROC_ETH_OCM 0x110090 // r/w activate OPB-2-OCM-Prefetcher ==> PREFETCH
00037
00038
00039 #define ROC_ETH_CFG_READ 0x110060 // w Beim Schreiben einer 1 werden die Konfigurationsdaten (IP, MAC, Delays) von der SD-Karte gelesen
00040 #define ROC_ETH_CFG_WRITE 0x110064 // w Beim Schreiben einer 1 werden die Konfigurationsdaten (IP, MAC, Delays) auf der SD-Karte gespeichert
00041 #define ROC_ETH_OVERWRITE_SD_FILE 0x110068 // w
00042
00043
00044
00045 #define ROC_ETH_SWITCHCONSOLE 0x110100 // r/w
00046 #define ROC_ETH_START_DAQ 0x100100 // w
00047 #define ROC_ETH_STOP_DAQ 0x100104 // w
00048 #define ROC_ETH_SUSPEND_DAQ 0x100108 // w go into suspend state
00049 #define ROC_ETH_IP_ADDRESS 0x110000 // r/w
00050 #define ROC_ETH_MAC_ADDRESS_UPPER 0x110008 // r/w upper two bytes
00051 #define ROC_ETH_MAC_ADDRESS_LOWER 0x11000C // r/w lower four bytes
00052 #define ROC_ETH_MASTER_LOGIN 0x110010 // r/w
00053 #define ROC_ETH_MASTER_DATAPORT 0x110014 // r/w data port of master node
00054 #define ROC_ETH_MASTER_CTRLPORT 0x110018 // r/w
00055 #define ROC_ETH_BUFFER_FLUSH_TIMER 0x11001C // r/w
00056 #define ROC_ETH_MASTER_LOGOUT 0x110020 // w
00057 #define ROC_ETH_MASTER_IP 0x110024 // r
00058 #define ROC_ETH_RESTART_NETWORK 0x110028 // w
00059 #define ROC_ETH_CONSOLE_OUTPUT 0x11002C // w
00060 #define ROC_ETH_LOST_ETHER_FRAMES 0x110030 // r ethernet frames lost
00061 #define ROC_ETH_UKNOWN_ETHER_FRAMES 0x110034 // r number of ethernet frames with tag other than IP and ARP
00062 #define ROC_ETH_TEMAC_PRINT 0x11003C // w - just print some Temac registers and config
00063 #define ROC_ETH_TEMAC_REG0 0x110040 // r/w - set or read Remac config register
00064 #define ROC_ETH_CTRLPORT 0x110044 // r/w - control port number
00065 #define ROC_ETH_DATAPORT 0x110048 // r/w - data port number
00066 #define ROC_ETH_BURST_LOOPCNT 0x11004C // r/w - number of readout in burst loops
00067 #define ROC_ETH_OCM_LOOPCNT 0x110050 // r/w - number of readout in ocm loops
00068 #define ROC_ETH_CONSOLE_CMD 0x11006C // w - executes provided console command
00069 #define ROC_ETH_STATBLOCK 0x110070 // r - block with sc_statistic
00070 #define ROC_ETH_DEBUGMSG 0x110074 // r - last output of sc_printf command
00071 #define ROC_ETH_HIGHWATER 0x110080 // r/w - value of high water marker (in number of UDP buffers, maximum is about 78000 buffers or 112 MB)
00072 #define ROC_ETH_LOWWATER 0x110084 // r/w - value of low water marker (in number of UDP buffers, default is 10% of highwater)
00073 #define ROC_ETH_NUMBUFALLOC 0x110088 // r - number of allocated UDP buffers
00074
00075 #define ROC_ETH_DLM 0x130000 // w - emulate a DLM message
00076
00077
00078 #define ROC_ETH_FLASH_KIBFILE_FROM_DDR 0x120000 // w position value is parsed right now only 0 is supported
00079 #define ROC_ETH_FLASH_ADDR 0x120004 // first address of file buffer
00080 #define ROC_ETH_FLASH_DATA 0x120008 // size of file buffer (4MB)
00081 #define ROC_ETH_FLASH_CLEAR_FILEBUFFER 0x12000C // w
00082 #define ROC_ETH_CHECK_BITFILEBUFFER 0x120010 // r
00083 #define ROC_ETH_CHECK_BITFILEFLASH0 0x120014 // r
00084 #define ROC_ETH_CHECK_BITFILEFLASH1 0x120018 // r
00085 #define ROC_ETH_CHECK_FILEBUFFER 0x120020 // r
00086
00087 #define ROC_ETH_FBUF_SIZE 0x400000 // PPC internal use
00088
00089 #define ETH_REG_HWV 0x0
00090 #define ETH_REG_DLM 0x4
00091 #define ETH_REG_OPB_ERROR 0x8
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 #define ROC_DEFAULT_CTRLPORT 13132
00106 #define ROC_DEFAULT_DATAPORT 13131
00107
00108
00109 #define ROC_PEEK 111
00110 #define ROC_POKE 112
00111 #define ROC_CONSOLE 113
00112 #define ROC_NOPER 114
00113
00114 #define NOPER_PUT 0x80000000 // to write address, one should set high LSB
00115 #define NOPER_GET 0x0 // if address not modified, just do get operation
00116 #define NOPER_OPER_MASK 0x80000000
00117 #define NOPER_ADDR_MASK 0x7fffffff
00118
00119 #endif