1#ifndef ROGUE_WISHBONE_INTERFACE_H_
2#define ROGUE_WISHBONE_INTERFACE_H_ 1
4#include "pflib/WishboneInterface.h"
5#include "pflib/Backend.h"
41 virtual void wb_write(
int target, uint32_t addr, uint32_t data);
47 virtual uint32_t
wb_read(
int target, uint32_t addr);
60 virtual void wb_errors(uint32_t& crcup_errors, uint32_t& crcdn_errors, uint32_t&
wb_errors);
76 virtual void fc_read_counters(
int& spill_count,
int& header_occ,
int& header_occ_max,
int& event_count,
int& vetoed);
77 virtual void fc_enables_read(
bool& ext_l1a,
bool& ext_spill,
bool& timer_l1a);
78 virtual void fc_enables(
bool ext_l1a,
bool ext_spill,
bool timer_l1a);
81 virtual void fc_veto_setup_read(
bool& veto_daq_busy,
bool& veto_l1_occ,
int& l1_occ_busy,
int& l1_occ_ok);
82 virtual void fc_veto_setup(
bool veto_daq_busy,
bool veto_l1_occ,
int l1_occ_busy,
int l1_occ_ok);
87 virtual void daq_status(
bool& full,
bool& empty,
int& nevents,
int& next_event_size);
93 void daq_dma_setup(uint8_t fpga_id, uint8_t samples_per_event);
94 void daq_get_dma_setup(uint8_t& fpga_id, uint8_t& samples_per_event,
bool& enabled);
95 uint32_t daq_dma_status();
98 void daq_dma_run(
const std::string& cmd,
int run,
int nevents,
int rate);
Abstract interface for various backend manipulations.
Definition: Backend.h:16
Abstract interface for wishbone transactions, used by ~all classes in pflib.
Definition: WishboneInterface.h:15
Definition: RogueWishboneInterface.h:30
virtual void daq_advance_ptr()
advance the daq pointer along buffer
Definition: RogueWishboneInterface.cxx:238
virtual void fc_calibpulse()
send a single calib pulse
Definition: RogueWishboneInterface.cxx:127
virtual void fc_enables(bool ext_l1a, bool ext_spill, bool timer_l1a)
set the enables for various trigger/spill sources
Definition: RogueWishboneInterface.cxx:198
virtual void wb_reset()
reset the wishbone bus (on/off cycle)
Definition: RogueWishboneInterface.cxx:62
virtual void fc_bufferclear()
send a single L1A
Definition: RogueWishboneInterface.cxx:121
virtual void fc_setup_calib(int pulse_len, int l1a_offset)
calib pulse setup
Definition: RogueWishboneInterface.cxx:133
virtual void fc_get_setup_calib(int &pulse_len, int &l1a_offset)
calib pulse setup
Definition: RogueWishboneInterface.cxx:143
virtual void wb_errors(uint32_t &crcup_errors, uint32_t &crcdn_errors, uint32_t &wb_errors)
Read the monitoring counters crcup_errors – CRC errors observed on the uplink (wraps) crcdn_errors – ...
Definition: RogueWishboneInterface.cxx:65
virtual void daq_setup_event_tag(int run, int day, int month, int hour, int min)
Set the event tagging information.
Definition: RogueWishboneInterface.cxx:304
virtual void fc_sendL1A()
Backend implementation.
Definition: RogueWishboneInterface.cxx:115
virtual void wb_clear_counters()
Clear the monitoring counters.
Definition: RogueWishboneInterface.cxx:71
RogueWishboneInterface(const std::string &host, int port)
Construct a TCP bridge.
Definition: RogueWishboneInterface.cxx:14
virtual void fc_linkreset()
send a link reset
Definition: RogueWishboneInterface.cxx:118
virtual void fc_timer_setup(int usdelay)
set the period in us for the timer trigger
Definition: RogueWishboneInterface.cxx:186
virtual uint32_t wb_read(int target, uint32_t addr)
read a 32-bit word from the given target and address
Definition: RogueWishboneInterface.cxx:50
virtual void fc_enables_read(bool &ext_l1a, bool &ext_spill, bool &timer_l1a)
check the enables for various trigger/spill sources
Definition: RogueWishboneInterface.cxx:192
virtual void fc_advance_l1_fifo()
advance the FC fifo
Definition: RogueWishboneInterface.cxx:130
virtual void daq_status(bool &full, bool &empty, int &nevents, int &next_event_size)
readout the daq status into the passed variables
Definition: RogueWishboneInterface.cxx:241
virtual void wb_write(int target, uint32_t addr, uint32_t data)
write a 32-bit word to the given target and address
Definition: RogueWishboneInterface.cxx:39
virtual void daq_reset()
reset the daq buffers
Definition: RogueWishboneInterface.cxx:235
void daq_dma_enable(bool enable)
specific items related to DMA which are not part of the general interface
Definition: RogueWishboneInterface.cxx:271
virtual void fc_read_counters(int &spill_count, int &header_occ, int &header_occ_max, int &event_count, int &vetoed)
read counters from the FC side
Definition: RogueWishboneInterface.cxx:167
virtual std::vector< uint32_t > daq_read_event()
read the aquired event and return it
Definition: RogueWishboneInterface.cxx:248
virtual int fc_timer_setup_read()
get the period in us for the timer trigger
Definition: RogueWishboneInterface.cxx:183
virtual void fc_clear_run()
reset counters for a new run
Definition: RogueWishboneInterface.cxx:124
virtual void fc_veto_setup(bool veto_daq_busy, bool veto_l1_occ, int l1_occ_busy, int l1_occ_ok)
set the enables for various trigger/spill sources
Definition: RogueWishboneInterface.cxx:156
virtual void fc_veto_setup_read(bool &veto_daq_busy, bool &veto_l1_occ, int &l1_occ_busy, int &l1_occ_ok)
check the setup for various busy/veto
Definition: RogueWishboneInterface.cxx:148
Polarfire Interaction Library.
Definition: Backend.h:8