pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
pflib::uhal::uhalWishboneInterface Class Reference
Inheritance diagram for pflib::uhal::uhalWishboneInterface:
[legend]
Collaboration diagram for pflib::uhal::uhalWishboneInterface:
[legend]

Public Member Functions

 uhalWishboneInterface (const std::string &target, const std::string &ipbus_map_path)
 Construct a TCP bridge.
 
virtual void wb_write (int target, uint32_t addr, uint32_t data)
 write a 32-bit word to the given target and address More...
 
virtual uint32_t wb_read (int target, uint32_t addr)
 read a 32-bit word from the given target and address More...
 
virtual void wb_reset ()
 reset the wishbone bus (on/off cycle) More...
 
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 – CRC errors from the downlink reported on the uplink (wraps) wb_errors – Wishbone errors indicated by the Polarfire. More...
 
virtual void wb_clear_counters ()
 Clear the monitoring counters. More...
 
virtual void fc_sendL1A ()
 Backend implementation. More...
 
virtual void fc_linkreset ()
 send a link reset More...
 
virtual void fc_bufferclear ()
 send a single L1A More...
 
virtual void fc_calibpulse ()
 send a single calib pulse More...
 
virtual void fc_setup_calib (int pulse_len, int l1a_offset)
 calib pulse setup More...
 
virtual void fc_get_setup_calib (int &pulse_len, int &l1a_offset)
 calib pulse setup More...
 
virtual void fc_read_counters (int &spill_count, int &header_occ, int &header_occ_max, int &event_count, int &vetoed_counter) override
 read counters from the FC side More...
 
virtual void fc_clear_run () override
 reset counters for a new run More...
 
virtual void fc_advance_l1_fifo () override
 advance the FC fifo More...
 
virtual void fc_enables_read (bool &ext_l1a, bool &ext_spill, bool &timer_l1a) override
 check the enables for various trigger/spill sources More...
 
virtual void fc_enables (bool ext_l1a, bool ext_spill, bool timer_l1a) override
 set the enables for various trigger/spill sources More...
 
virtual void fc_veto_setup_read (bool &veto_daq_busy, bool &veto_l1_occ, int &l1_occ_busy, int &l1_occ_ok) override
 check the setup for various busy/veto More...
 
virtual void fc_veto_setup (bool veto_daq_busy, bool veto_l1_occ, int l1_occ_busy, int l1_occ_ok) override
 set the enables for various trigger/spill sources More...
 
virtual void daq_reset ()
 reset the daq buffers More...
 
virtual void daq_advance_ptr ()
 advance the daq pointer along buffer More...
 
virtual void daq_status (bool &full, bool &empty, int &nevents, int &next_event_size)
 readout the daq status into the passed variables More...
 
virtual std::vector< uint32_t > daq_read_event ()
 read the aquired event and return it More...
 
- Public Member Functions inherited from pflib::Backend
virtual int fc_timer_setup_read ()
 get the period in us for the timer trigger More...
 
virtual void fc_timer_setup (int usdelay)
 set the period in us for the timer trigger More...
 
virtual void daq_setup_event_tag (int run, int day, int month, int hour, int min)
 Set the event tagging information. More...
 

Private Member Functions

void dispatch ()
 

Private Attributes

std::unique_ptr<::uhal::HwInterface > hw_
 

Member Function Documentation

◆ daq_advance_ptr()

void pflib::uhal::uhalWishboneInterface::daq_advance_ptr ( )
virtual

advance the daq pointer along buffer

Implements pflib::Backend.

◆ daq_read_event()

std::vector< uint32_t > pflib::uhal::uhalWishboneInterface::daq_read_event ( )
virtual

read the aquired event and return it

Implements pflib::Backend.

◆ daq_reset()

void pflib::uhal::uhalWishboneInterface::daq_reset ( )
virtual

reset the daq buffers

Implements pflib::Backend.

◆ daq_status()

void pflib::uhal::uhalWishboneInterface::daq_status ( bool &  full,
bool &  empty,
int &  nevents,
int &  next_event_size 
)
virtual

readout the daq status into the passed variables

Implements pflib::Backend.

◆ fc_advance_l1_fifo()

void pflib::uhal::uhalWishboneInterface::fc_advance_l1_fifo ( )
overridevirtual

advance the FC fifo

Reimplemented from pflib::Backend.

◆ fc_bufferclear()

void pflib::uhal::uhalWishboneInterface::fc_bufferclear ( )
virtual

send a single L1A

Implements pflib::Backend.

◆ fc_calibpulse()

void pflib::uhal::uhalWishboneInterface::fc_calibpulse ( )
virtual

send a single calib pulse

Implements pflib::Backend.

◆ fc_clear_run()

void pflib::uhal::uhalWishboneInterface::fc_clear_run ( )
overridevirtual

reset counters for a new run

Reimplemented from pflib::Backend.

◆ fc_enables()

void pflib::uhal::uhalWishboneInterface::fc_enables ( bool  ext_l1a,
bool  ext_spill,
bool  timer_l1a 
)
overridevirtual

set the enables for various trigger/spill sources

Reimplemented from pflib::Backend.

◆ fc_enables_read()

void pflib::uhal::uhalWishboneInterface::fc_enables_read ( bool &  ext_l1a,
bool &  ext_spill,
bool &  timer_l1a 
)
overridevirtual

check the enables for various trigger/spill sources

Reimplemented from pflib::Backend.

◆ fc_get_setup_calib()

void pflib::uhal::uhalWishboneInterface::fc_get_setup_calib ( int &  pulse_len,
int &  l1a_offset 
)
virtual

calib pulse setup

Implements pflib::Backend.

◆ fc_linkreset()

void pflib::uhal::uhalWishboneInterface::fc_linkreset ( )
virtual

send a link reset

Implements pflib::Backend.

◆ fc_read_counters()

void pflib::uhal::uhalWishboneInterface::fc_read_counters ( int &  spill_count,
int &  header_occ,
int &  header_occ_max,
int &  event_count,
int &  vetoed_counter 
)
overridevirtual

read counters from the FC side

Reimplemented from pflib::Backend.

◆ fc_sendL1A()

void pflib::uhal::uhalWishboneInterface::fc_sendL1A ( )
virtual

Backend implementation.

Implements pflib::Backend.

◆ fc_setup_calib()

void pflib::uhal::uhalWishboneInterface::fc_setup_calib ( int  pulse_len,
int  l1a_offset 
)
virtual

calib pulse setup

Implements pflib::Backend.

◆ fc_veto_setup()

void pflib::uhal::uhalWishboneInterface::fc_veto_setup ( bool  veto_daq_busy,
bool  veto_l1_occ,
int  l1_occ_busy,
int  l1_occ_ok 
)
overridevirtual

set the enables for various trigger/spill sources

Reimplemented from pflib::Backend.

◆ fc_veto_setup_read()

void pflib::uhal::uhalWishboneInterface::fc_veto_setup_read ( bool &  veto_daq_busy,
bool &  veto_l1_occ,
int &  l1_occ_busy,
int &  l1_occ_ok 
)
overridevirtual

check the setup for various busy/veto

Reimplemented from pflib::Backend.

◆ wb_clear_counters()

void pflib::uhal::uhalWishboneInterface::wb_clear_counters ( )
virtual

Clear the monitoring counters.

Implements pflib::WishboneInterface.

◆ wb_errors()

void pflib::uhal::uhalWishboneInterface::wb_errors ( uint32_t &  crcup_errors,
uint32_t &  crcdn_errors,
uint32_t &  wb_errors 
)
virtual

Read the monitoring counters crcup_errors – CRC errors observed on the uplink (wraps) crcdn_errors – CRC errors from the downlink reported on the uplink (wraps) wb_errors – Wishbone errors indicated by the Polarfire.

Implements pflib::WishboneInterface.

◆ wb_read()

uint32_t pflib::uhal::uhalWishboneInterface::wb_read ( int  target,
uint32_t  addr 
)
virtual

read a 32-bit word from the given target and address

Exceptions
pflib::Exceptionin the case of a timeout or wishbone error

Implements pflib::WishboneInterface.

◆ wb_reset()

void pflib::uhal::uhalWishboneInterface::wb_reset ( )
virtual

reset the wishbone bus (on/off cycle)

Implements pflib::WishboneInterface.

◆ wb_write()

void pflib::uhal::uhalWishboneInterface::wb_write ( int  target,
uint32_t  addr,
uint32_t  data 
)
virtual

write a 32-bit word to the given target and address

Exceptions
pflib::Exceptionin the case of a timeout or wishbone error

Implements pflib::WishboneInterface.


The documentation for this class was generated from the following files: