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

Public Member Functions

 RogueWishboneInterface (const std::string &host, int port)
 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_clear_run ()
 reset counters for a new run 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)
 read counters from the FC side More...
 
virtual void fc_enables_read (bool &ext_l1a, bool &ext_spill, bool &timer_l1a)
 check the enables for various trigger/spill sources More...
 
virtual void fc_enables (bool ext_l1a, bool ext_spill, bool timer_l1a)
 set the enables for various trigger/spill sources More...
 
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 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 More...
 
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 More...
 
virtual void fc_advance_l1_fifo ()
 advance the FC fifo 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...
 
virtual void daq_setup_event_tag (int run, int day, int month, int hour, int min)
 Set the event tagging information. More...
 
void daq_dma_enable (bool enable)
 specific items related to DMA which are not part of the general interface
 
void daq_dma_setup (uint8_t fpga_id, uint8_t samples_per_event)
 
void daq_get_dma_setup (uint8_t &fpga_id, uint8_t &samples_per_event, bool &enabled)
 
uint32_t daq_dma_status ()
 
void daq_dma_dest (const std::string &fname)
 
void daq_dma_dest (std::shared_ptr<::rogue::interfaces::stream::Slave > sl)
 
void daq_dma_run (const std::string &cmd, int run, int nevents, int rate)
 
void daq_dma_close ()
 

Private Attributes

std::shared_ptr<::rogue::interfaces::memory::TcpClient > client_
 
std::shared_ptr<::rogue::interfaces::memory::Master > intf_
 
std::shared_ptr<::rogue::interfaces::stream::TcpClient > dma_client_
 
std::shared_ptr<::rogue::utilities::fileio::StreamWriter > dma_dest_
 

Member Function Documentation

◆ daq_advance_ptr()

void pflib::rogue::RogueWishboneInterface::daq_advance_ptr ( )
virtual

advance the daq pointer along buffer

Implements pflib::Backend.

◆ daq_read_event()

std::vector< uint32_t > pflib::rogue::RogueWishboneInterface::daq_read_event ( )
virtual

read the aquired event and return it

Implements pflib::Backend.

◆ daq_reset()

void pflib::rogue::RogueWishboneInterface::daq_reset ( )
virtual

reset the daq buffers

Implements pflib::Backend.

◆ daq_setup_event_tag()

void pflib::rogue::RogueWishboneInterface::daq_setup_event_tag ( int  run,
int  day,
int  month,
int  hour,
int  min 
)
virtual

Set the event tagging information.

Reimplemented from pflib::Backend.

◆ daq_status()

void pflib::rogue::RogueWishboneInterface::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::rogue::RogueWishboneInterface::fc_advance_l1_fifo ( )
virtual

advance the FC fifo

Reimplemented from pflib::Backend.

◆ fc_bufferclear()

void pflib::rogue::RogueWishboneInterface::fc_bufferclear ( )
virtual

send a single L1A

Implements pflib::Backend.

◆ fc_calibpulse()

void pflib::rogue::RogueWishboneInterface::fc_calibpulse ( )
virtual

send a single calib pulse

Implements pflib::Backend.

◆ fc_clear_run()

void pflib::rogue::RogueWishboneInterface::fc_clear_run ( )
virtual

reset counters for a new run

Reimplemented from pflib::Backend.

◆ fc_enables()

void pflib::rogue::RogueWishboneInterface::fc_enables ( bool  ext_l1a,
bool  ext_spill,
bool  timer_l1a 
)
virtual

set the enables for various trigger/spill sources

Reimplemented from pflib::Backend.

◆ fc_enables_read()

void pflib::rogue::RogueWishboneInterface::fc_enables_read ( bool &  ext_l1a,
bool &  ext_spill,
bool &  timer_l1a 
)
virtual

check the enables for various trigger/spill sources

Reimplemented from pflib::Backend.

◆ fc_get_setup_calib()

void pflib::rogue::RogueWishboneInterface::fc_get_setup_calib ( int &  pulse_len,
int &  l1a_offset 
)
virtual

calib pulse setup

Implements pflib::Backend.

◆ fc_linkreset()

void pflib::rogue::RogueWishboneInterface::fc_linkreset ( )
virtual

send a link reset

Implements pflib::Backend.

◆ fc_read_counters()

void pflib::rogue::RogueWishboneInterface::fc_read_counters ( int &  spill_count,
int &  header_occ,
int &  header_occ_max,
int &  event_count,
int &  vetoed_counter 
)
virtual

read counters from the FC side

Reimplemented from pflib::Backend.

◆ fc_sendL1A()

void pflib::rogue::RogueWishboneInterface::fc_sendL1A ( )
virtual

Backend implementation.

Implements pflib::Backend.

◆ fc_setup_calib()

void pflib::rogue::RogueWishboneInterface::fc_setup_calib ( int  pulse_len,
int  l1a_offset 
)
virtual

calib pulse setup

Implements pflib::Backend.

◆ fc_timer_setup()

void pflib::rogue::RogueWishboneInterface::fc_timer_setup ( int  usdelay)
virtual

set the period in us for the timer trigger

Reimplemented from pflib::Backend.

◆ fc_timer_setup_read()

int pflib::rogue::RogueWishboneInterface::fc_timer_setup_read ( )
virtual

get the period in us for the timer trigger

Reimplemented from pflib::Backend.

◆ fc_veto_setup()

void pflib::rogue::RogueWishboneInterface::fc_veto_setup ( bool  veto_daq_busy,
bool  veto_l1_occ,
int  l1_occ_busy,
int  l1_occ_ok 
)
virtual

set the enables for various trigger/spill sources

Reimplemented from pflib::Backend.

◆ fc_veto_setup_read()

void pflib::rogue::RogueWishboneInterface::fc_veto_setup_read ( bool &  veto_daq_busy,
bool &  veto_l1_occ,
int &  l1_occ_busy,
int &  l1_occ_ok 
)
virtual

check the setup for various busy/veto

Reimplemented from pflib::Backend.

◆ wb_clear_counters()

void pflib::rogue::RogueWishboneInterface::wb_clear_counters ( )
virtual

Clear the monitoring counters.

Implements pflib::WishboneInterface.

◆ wb_errors()

void pflib::rogue::RogueWishboneInterface::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::rogue::RogueWishboneInterface::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::rogue::RogueWishboneInterface::wb_reset ( )
virtual

reset the wishbone bus (on/off cycle)

Implements pflib::WishboneInterface.

◆ wb_write()

void pflib::rogue::RogueWishboneInterface::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: