pflib v3.0.0-rc1-29-g3a901ac
Pretty Fine HGCROC Interaction Library
All Classes Namespaces Files Functions Variables Typedefs Pages
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
 
virtual uint32_t wb_read (int target, uint32_t addr)
 read a 32-bit word from the given target and address
 
virtual void wb_reset ()
 reset the wishbone bus (on/off cycle)
 
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.
 
virtual void wb_clear_counters ()
 Clear the monitoring counters.
 
virtual void fc_sendL1A ()
 Backend implementation.
 
virtual void fc_linkreset ()
 send a link reset
 
virtual void fc_bufferclear ()
 send a single L1A
 
virtual void fc_calibpulse ()
 send a single calib pulse
 
virtual void fc_clear_run ()
 reset counters for a new run
 
virtual void fc_setup_calib (int pulse_len, int l1a_offset)
 calib pulse setup
 
virtual void fc_get_setup_calib (int &pulse_len, int &l1a_offset)
 calib pulse setup
 
virtual void fc_read_counters (int &spill_count, int &header_occ, int &event_count, int &vetoed)
 read counters from the FC side
 
virtual void fc_enables_read (bool &ext_l1a, bool &ext_spill, bool &timer_l1a)
 check the enables for various trigger/spill sources
 
virtual void fc_enables (bool ext_l1a, bool ext_spill, bool timer_l1a)
 set the enables for various trigger/spill sources
 
virtual int fc_timer_setup_read ()
 get the period in us for the timer trigger
 
virtual void fc_timer_setup (int usdelay)
 set the period in us for the timer trigger
 
virtual void daq_reset ()
 reset the daq buffers
 
virtual void daq_advance_ptr ()
 advance the daq pointer along buffer
 
virtual void daq_status (bool &full, bool &empty, int &nevents, int &next_event_size)
 readout the daq status into the passed variables
 
virtual std::vector< uint32_t > daq_read_event ()
 read the aquired event and return it
 
virtual void daq_setup_event_tag (int run, int day, int month, int hour, int min)
 Set the event tagging information.
 
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 ()
 
- Public Member Functions inherited from pflib::Backend

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_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 & 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.

◆ 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

◆ 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

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