otsdaq_components  v2_04_02
VIPICFirmwareDefinitions.h
1 #ifndef _ots_VIPICFirmwareDefinitions_h_
2 #define _ots_VIPICFirmwareDefinitions_h_
3 
4 #include <stdint.h>
5 
6 namespace ots
7 {
8 const uint32_t ETHIO_DESTINATION_PORT = 0xc1000018;
9 const uint32_t DATA_DESTINATION_IP = 0xc10000a4;
10 const uint32_t DATA_SOURCE_DESTINATION_PORT = 0xc10000a8;
11 
12 const double EXTERNAL_CLOCK_FREQUENCY = 54; // base freq: 54MHz
13 const double INTERNAL_CLOCK_FREQUENCY = 66.667; // base freq: 66.667MHz
14 
15 const uint8_t WRITE = 1;
16 const uint8_t SET = 2;
17 const uint8_t READ = 4;
18 const uint8_t RESET = 5;
19 const uint8_t CLEAR = 5;
20 const uint8_t DEFAULT = 6;
21 const uint8_t WAITCLR = 7;
22 const uint8_t WAITSET = 8;
23 
24 const int PIXELS_SIDE = 64;
25 
26 const unsigned int VIPIC_CLOCK = 0xc9000004; // Still undefined
27 const unsigned int VIPIC_CSR = 0xc9000000; // Command/status register
28 const unsigned int VIPIC_LINK = 0xc9000010; // Serial link status
29 const unsigned int VIPIC_TEST_INJECT = 0xc9000020; // Drives test data on connector J3
30 const unsigned int VIPIC_SPY_FIFO_STATUS = 0xc9000024; // Spy FIFO status register
31 const unsigned int VIPIC_SPY_FIFO_DATA = 0xc9000028; // Spy FIFO data register
32 const unsigned int VIPIC_TS_COUNTER_LOW = 0xc9000040; // TS counter low 32 bits
33 const unsigned int VIPIC_TS_COUNTER_HIGH = 0xc9000044; // TS counter high 16 bits
34 const unsigned int VIPIC_DCM_DATA = 0xc9000048; // DCM configuration (old BCO data)
35 const unsigned int VIPIC_STREAMER = 0xc900004c; // Data stream status register
36 
37 const unsigned int VIPIC_SET_WRITE_BASE = 0xc9001000; // Set write buffer
38 const unsigned int VIPIC_SET_WRITE_END = 0xc90011ff; //
39 const unsigned int VIPIC_SET_READ_BASE = 0xc9001200; // Set readback buffer
40 const unsigned int VIPIC_SET_READ_END = 0xc90013ff; //
41 const unsigned int VIPIC_RESET_WRITE_BASE = 0xc9001400; // Reset write buffer
42 const unsigned int VIPIC_RESET_WRITE_END = 0xc90015ff; //
43 const unsigned int VIPIC_RESET_READ_BASE = 0xc9001600; // Reset readback buffer
44 const unsigned int VIPIC_RESET_READ_END = 0xc90017ff; //
45 const unsigned int VIPIC_DATA_WRITE_BASE = 0xc9002000; // Data write buffer
46 const unsigned int VIPIC_DATA_WRITE_END = 0xc90037ff; //
47 const unsigned int VIPIC_DATA_READ_BASE = 0xc9004000; // Data readback buffer
48 const unsigned int VIPIC_DATA_READ_END = 0xc90057ff; //
49 }
50 
51 #endif