geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Public Types | Public Member Functions | List of all members
geopm::SSTControl Class Reference

#include <SSTControl.hpp>

Inheritance diagram for geopm::SSTControl:
Inheritance graph
[legend]
Collaboration diagram for geopm::SSTControl:
Collaboration graph
[legend]

Public Types

enum  ControlType { M_MBOX , M_MMIO }
 

Public Member Functions

 SSTControl (std::shared_ptr< SSTIO > sstio, ControlType control_type, int cpu_idx, uint32_t command, uint32_t subcommand, uint32_t interface_parameter, uint32_t write_value, uint32_t begin_bit, uint32_t end_bit, double scale, uint32_t rmw_subcommand, uint32_t rmw_interface_parameter, uint32_t rmw_read_mask)
 Create an SSTIO Control. More...
 
virtual ~SSTControl ()=default
 
void setup_batch (void) override
 Prepare the control for being written through side effects by the owner's write_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call. More...
 
void adjust (double value) override
 Store values to be written by the owner's write_batch step. More...
 
void write (double value) override
 Write the value of the control without affecting any pushed batch controls. More...
 
void save (void) override
 Store the current setting of the control for use by a future call to restore(). More...
 
void restore (void) override
 Restore the setting stored by save(). More...
 
void set_write_dependency (uint64_t trigger_value, std::weak_ptr< geopm::Control > dependency, uint64_t dependency_write_value)
 
- Public Member Functions inherited from geopm::Control
virtual ~Control ()=default
 

Detailed Description

This is the abstraction layer that exposes GEOPM controls from the SSTIO object.

Member Enumeration Documentation

◆ ControlType

Enumerator
M_MBOX 
M_MMIO 

Constructor & Destructor Documentation

◆ SSTControl()

geopm::SSTControl::SSTControl ( std::shared_ptr< SSTIO sstio,
ControlType  control_type,
int  cpu_idx,
uint32_t  command,
uint32_t  subcommand,
uint32_t  interface_parameter,
uint32_t  write_value,
uint32_t  begin_bit,
uint32_t  end_bit,
double  scale,
uint32_t  rmw_subcommand,
uint32_t  rmw_interface_parameter,
uint32_t  rmw_read_mask 
)

Create an SSTIO Control.

Parameters
[in]sstioInterface through which SST interactions are handled.
[in]control_typeWhich SST interface to use.
[in]cpu_indexIndex of the CPU to which the interface write is being issued.
[in]commandWhich SST interface command to issue.
[in]subcommandWhich SST interface subcommand to issue.
[in]interface_parameterWhich SST mailbox parameter to use.
[in]write_valueThe value to write to the interface.
[in]begin_bitThe first (least-significant) bit to include in the write mask.
[in]end_bitThe last bit to include in the write mask.
[in]scaleThe scaling factor to apply to written values.
[in]rmw_subcommandWhich subcommand to use for read as part of read-modify-write. This is not always the same as the write subcommand.
[in]rmw_interface_parameterWhich interface parameter to use for read as part of read-modify-write. This is not always the same as the write interface parameter.
[in]rmw_read_maskWhich mask to use for read as part of read-modify-write. This is not always the same as the write mask.

◆ ~SSTControl()

virtual geopm::SSTControl::~SSTControl ( )
virtualdefault

Member Function Documentation

◆ adjust()

void geopm::SSTControl::adjust ( double  value)
overridevirtual

Store values to be written by the owner's write_batch step.

Implements geopm::Control.

◆ restore()

void geopm::SSTControl::restore ( void  )
overridevirtual

Restore the setting stored by save().

Implements geopm::Control.

◆ save()

void geopm::SSTControl::save ( void  )
overridevirtual

Store the current setting of the control for use by a future call to restore().

Implements geopm::Control.

◆ set_write_dependency()

void geopm::SSTControl::set_write_dependency ( uint64_t  trigger_value,
std::weak_ptr< geopm::Control dependency,
uint64_t  dependency_write_value 
)

◆ setup_batch()

void geopm::SSTControl::setup_batch ( void  )
overridevirtual

Prepare the control for being written through side effects by the owner's write_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call.

Implements geopm::Control.

◆ write()

void geopm::SSTControl::write ( double  value)
overridevirtual

Write the value of the control without affecting any pushed batch controls.

Implements geopm::Control.


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