pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
DAQ.h
1#ifndef PFLIB_DAQ_H_INCLUDED
2#define PFLIB_DAQ_H_INCLUDED
3
4#include <vector>
5#include "pflib/WishboneInterface.h"
6
7namespace pflib {
8
16class DAQ {
17 public:
23 void reset();
25 void getHeaderOccupancy(int& current, int& maximum);
27 void setIds(int fpga_id);
29 int getFPGAid();
31 void setupLink(int ilink, bool zs, bool zs_all, int l1a_delay, int l1a_capture_width);
33 void getLinkSetup(int ilink, bool& zs, bool& zs_all, int& l1a_delay, int& l1a_capture_width);
35 void bufferStatus(int ilink, bool postfmt, bool& empty, bool& full);
37 void enable(bool enable=true);
39 bool enabled();
41 int nlinks() const { return n_links; }
42 private:
47};
48
49}
50
51#endif // PFLIB_DAQ_H_INCLUDED
Interface with DAQ via a WishboneInterface.
Definition: DAQ.h:16
void enable(bool enable=true)
enable/disable the readout
Definition: DAQ.cxx:98
void bufferStatus(int ilink, bool postfmt, bool &empty, bool &full)
get empty/full status for the given link and stage
Definition: DAQ.cxx:86
int n_links
number of links
Definition: DAQ.h:46
DAQ(WishboneInterface *wb)
attach to our active WishboneInterface
Definition: DAQ.cxx:17
WishboneInterface * wb_
pointer to active wbi
Definition: DAQ.h:44
void setupLink(int ilink, bool zs, bool zs_all, int l1a_delay, int l1a_capture_width)
Setup a link.
Definition: DAQ.cxx:48
void getLinkSetup(int ilink, bool &zs, bool &zs_all, int &l1a_delay, int &l1a_capture_width)
read link parameters into the passed variables
Definition: DAQ.cxx:72
int nlinks() const
number of elinks
Definition: DAQ.h:41
int getFPGAid()
Get the FPGA id.
Definition: DAQ.cxx:39
void setIds(int fpga_id)
Set the FPGA id and the link ids based on the FPGA id.
Definition: DAQ.cxx:32
bool enabled()
is the readout enabled?
Definition: DAQ.cxx:107
Abstract interface for wishbone transactions, used by ~all classes in pflib.
Definition: WishboneInterface.h:15
Polarfire Interaction Library.
Definition: Backend.h:8