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