stipcores library
Collection of Software Drivers for Hardware IP Cores for the Panoradio SDR
Public Member Functions | List of all members
Signal_Scaler Class Reference

Driver for the Signal_Scaler IP core. More...

#include <Signal_Scaler.h>

Public Member Functions

 Signal_Scaler (int base_address, int size_in_k, int max_scaling_value_db)
 class constructor More...
 
 ~Signal_Scaler ()
 class deconstructor
 
int set_scaling (int scaling_in_db)
 sets scaling, <0dB: attenuation, >0dB: -> amplification (in 6 dB steps (shifting)) More...
 
int get_max_value ()
 reads maximum occured absolute value at the module's input since last call of reset_max_value() More...
 
int reset_max_value ()
 resets the maximum abs value More...
 

Detailed Description

Driver for the Signal_Scaler IP core.

Constructor & Destructor Documentation

Signal_Scaler::Signal_Scaler ( int  base_address,
int  size_in_k,
int  max_scaling_value_db 
)

class constructor

Parameters
base_adressaddress of the spi core (from Vivado), e.g. 0x44C00000
size_in_ksize of the required adress space in k (from Vivado)
max_scaling_value_dbmaximum scaling value in dB (e.g. 48 means -48 dB to +48 dB)

Member Function Documentation

int Signal_Scaler::get_max_value ( )

reads maximum occured absolute value at the module's input since last call of reset_max_value()

Returns
maximum abs value
int Signal_Scaler::reset_max_value ( )

resets the maximum abs value

Returns
error code (0=successful, 1=could not reset)
int Signal_Scaler::set_scaling ( int  scaling_in_db)

sets scaling, <0dB: attenuation, >0dB: -> amplification (in 6 dB steps (shifting))

Returns
error code (0=successful)

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