otsdaq_components  v2_02_00
VIPICFirmware.h
1 //#ifndef _ots_VIPICFirmware_h_
2 //#define _ots_VIPICFirmware_h_
3 //
4 //#include "otsdaq-components/DAQHardware/VIPICFirmwareDefinitions.h"
5 //#include "otsdaq-components/DAQHardware/FrontEndFirmwareBase.h"
7 //#include "otsdaq-components/DetectorConfiguration/ROCStream.h"
8 //
9 //#include <string>
10 //
11 //namespace ots
12 //{
13 //
14 //class VIPICFirmware : public FrontEndFirmwareBase/*, public PurdueFirmwareCore*/
15 //{
16 //
17 //private:
18 // uint32_t pixelCSRRegisterValue_; //CSR
19 // uint32_t pixelDCMRegisterValue_; //DCM
20 // uint32_t pixelClockRegisterValue_; //RegisterClock (does not handle the clock, it is the name Matthew uses)
21 // uint32_t pixelTestInjectRegisterValue_; //TestInject
22 //
23 // uint32_t setBuffer_ [PIXELS_SIDE * PIXELS_SIDE / 32]; //S Buffer (one bit per pixel)
24 // uint32_t resetBuffer_ [PIXELS_SIDE * PIXELS_SIDE / 32]; //R Buffer (one bit per pixel)
25 // uint32_t configureBuffer_ [PIXELS_SIDE * PIXELS_SIDE / 2 ]; //D Buffer (12 bits per pixel, extended to 16)
26 //
27 //
28 //public:
29 // VIPICFirmware (unsigned int version, std::string type);
30 // virtual ~VIPICFirmware();
31 // int init();
32 //
33 // std::string resetTimeStamp (void);
34 // std::string configureClocks (std::string source, double frequency);
35 // std::string resetDetector (void);
36 // std::string enableTrigger (bool enable);
37 // std::string enableTrigger (void){return enableTrigger(true);}
38 // std::string resetDetector (int reset);
39 // std::string resetBCO (void);
40 //
41 // void setFrequencyFromClockState (std::string& buffer, double inputedFrequency);
42 // bool isClockStateExternal (void);
43 // bool isClockLocked (void);
44 //
45 // std::string resetTriggerCounter (void);
46 // std::string stopStream (void);
47 // std::string startStream (void);
48 // std::string setUp (void);
49 //
50 // std::string prepareResetTimeStamp (void);
51 //
52 // void makeMaskBuffer (std::string& buffer, unsigned int channel, const ROCStream& rocStream);
53 //
54 //
55 //protected:
56 // FrontEndFirmwareBase* protocolInstance_;
57 // void setTimeStampClockSourceCSR (std::string clockSource);
58 // void flushBuffersPixelCSR (void);//FIXME:waiting for M
59 //
60 // //Set values for Masks buffers
61 // void maskSetPixel (int index, bool force);
62 // void maskOffPixel (int index, bool kill);
63 // void configurePixel (int index, uint16_t configure);
64 // void maskSetPixel (int column, int row, bool force);
65 // void maskOffPixel (int column, int row, bool kill);
66 // void configurePixel (int column, int row, uint16_t configure);
67 //
68 //
69 // bool getSetMaskPixel (int column, int row);
70 // bool getResetMaskPixel (int column, int row);
71 // bool getConfigurationPixel (int column, int row);
72 //
73 // //Set values for register PIXEL_DCM (Pixel Clock Manager)
74 // void setTimeStampClockSource (std::string clockSource);
75 // void setFrequencyRatio (std::string& buffer, int numerator, int denominator);
76 //
77 // //Reset local register values
78 // void resetPixelCSRRegisterValue (void);
79 // void resetPixelDCMRegisterValue (void);
80 // void resetPixelClockRegisterValue (void);
81 // void resetPixelTestInjectRegisterValue (void);
82 //
83 //
84 // //Register layer manipulation (must be issued a write after these functions)
85 //
86 // //CSR
87 // void setPacketSizePixelCSR (uint32_t size);
88 // void issueClearFIFOCSR (int delay);
89 // void setTimeStampClockSourcePixelCSR (bool externalClockSource);
90 // void prepareResetTimeStampCSR (void);
91 // void enableTimeStampCounterPixelCSR (bool enable);
92 // void clearTriggerCounterPixelCSR (void);
93 // void immediateResetTimeStampCSR (void);
94 // void enableStreamPixelCSR (bool enable);
95 // void enableTriggerDataStreamPixelCSR (bool enable);
96 // void resetNetworkPixelCSR (bool reset);
97 // void resetDCMCSR (bool reset);
98 // bool isClockLockedCSR (void);
99 // bool isClockStateExternalCSR (void);
100 //
101 // //"Clock" Register
102 // void waitTimeStampToReadCLK (uint8_t delay);
103 // void setReadsPerCycleCLK (uint8_t readsPerCycle);
104 // void setWaitingPerCycleCLK (uint8_t delay);
105 // void assertCleanEndCLK (bool clean);
106 // void assertTimeStampEndCLK (bool timestamp);
107 // void shiftBufferSetCLK (bool shift);
108 // void shiftBufferResetCLK (bool shift);
109 // void shiftBufferConfigurationCLK (bool shift);
110 // void assertLoadCLK (bool load);
111 // void assertRestartCLK (bool restart);
112 // void stepTimeStampCLK (bool shift);
113 // void stepReadCycleCLK (bool shift);
114 //
115 // //Mask functions
116 //
117 // int pixelIndex (int column, int row);
118 // int pixelColumn (int index);
119 // int pixelRow (int index);
120 //
121 //};
122 //
123 //}
124 //
125 //#endif