pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
pflib::WishboneTarget Class Reference

Parent class for standard wishbone targets providing some utilities. More...

#include <WishboneTarget.h>

Inheritance diagram for pflib::WishboneTarget:
[legend]
Collaboration diagram for pflib::WishboneTarget:
[legend]

Public Member Functions

 WishboneTarget (WishboneInterface *wb, int target)
 simply store pointer to interface and target we will interact with
 
int target_type ()
 Get the Wishbone target type/flavor by number.
 
std::string target_type_str ()
 Get the Wishbone target type/flavor by name if known.
 
int firmware_version ()
 Get the subblock firmware version.
 

Protected Member Functions

void wb_write (uint32_t addr, uint32_t data)
 Write data to an address on the target stored within us. More...
 
uint32_t wb_read (uint32_t addr)
 Read data from address on the target stored within us. More...
 
void wb_rmw (uint32_t addr, uint32_t data, uint32_t mask)
 Read the word at the address and then put our data bits into that address using the provided mask. More...
 

Protected Attributes

WishboneInterfacewb_
 Handle to the interface.
 
int target_
 Target id.
 

Detailed Description

Parent class for standard wishbone targets providing some utilities.

Simply wrap the wishbone target integer so that we can call addr/data read/writes without having to always provide the target.

Member Function Documentation

◆ wb_read()

uint32_t pflib::WishboneTarget::wb_read ( uint32_t  addr)
inlineprotected

Read data from address on the target stored within us.

See also
WishboneInterface::wb_read for reading via interface
Parameters
[in]addraddress of data to read
Returns
data word at that address

◆ wb_rmw()

void pflib::WishboneTarget::wb_rmw ( uint32_t  addr,
uint32_t  data,
uint32_t  mask 
)
protected

Read the word at the address and then put our data bits into that address using the provided mask.

Parameters
[in]addraddress to insert data into
[in]datadata we want to put
[in]maskmask for data

◆ wb_write()

void pflib::WishboneTarget::wb_write ( uint32_t  addr,
uint32_t  data 
)
inlineprotected

Write data to an address on the target stored within us.

See also
WishboneInterface::wb_write for writing data via interface
Parameters
[in]addraddress of data to write
[in]datadata to write

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