HALDLS
haldls::vx::MADCConfig Class Reference

Configuration container for MADC and related circuitry. More...

#include <madc.h>

Classes

struct  ActiveMuxInputSelectLength
 
struct  CalibrationWaitValue
 
struct  ConversionCyclesOffset
 
struct  MADCClockScaleValue
 
struct  NumberOfSamples
 
struct  PowerupWaitValue
 
struct  PreampGainCapacitorSize
 
struct  SampleDurationAdjust
 
struct  SamplingWindowTiming
 
struct  SARResetLength
 
struct  SARResetWait
 

Public Types

typedef halco::hicann_dls::vx::MADCConfigOnDLS coordinate_type
 
typedef halco::common::typed_array< bool, halco::hicann_dls::vx::HemisphereOnDLS > hemisphere_type
 
typedef halco::hicann_dls::vx::SourceMultiplexerOnReadoutSourceSelection input_selection_type
 
typedef std::true_type is_leaf_node
 
typedef halco::common::typed_array< bool, halco::hicann_dls::vx::SynapticInputOnNeuron > synapse_target_type
 

Public Member Functions

 MADCConfig () SYMBOL_VISIBLE
 Default constructor for the MADC config. More...
 
template<typename AddressT >
std::array< AddressT, config_size_in_wordsaddresses (coordinate_type const &coord) const
 
double calculate_sample_rate (double const &madc_base_frequency) const SYMBOL_VISIBLE
 Accessors for the sampling rate of the madc in Hz. More...
 
template<typename WordT >
void decode (std::array< WordT, config_size_in_words > const &data)
 
template<typename WordT >
std::array< WordT, config_size_in_wordsencode () const
 
input_selection_type get_active_mux_initially_selected_input () const SYMBOL_VISIBLE
 Set the initially selected input of the active mux. More...
 
ActiveMuxInputSelectLength get_active_mux_input_select_length () const SYMBOL_VISIBLE
 Set the number of samples the mux's inputs are selected for in direct succession. More...
 
CalibrationWaitValue get_calibration_wait_value () const SYMBOL_VISIBLE
 Accessors for the built-in calibration's timing of the MADC. More...
 
bool get_connect_pads_to_madc () const SYMBOL_VISIBLE
 
bool get_connect_preamp_to_madc () const SYMBOL_VISIBLE
 
bool get_connect_preamp_to_pads () const SYMBOL_VISIBLE
 
ConversionCyclesOffset get_conversion_cycles_offset () const SYMBOL_VISIBLE
 Configuration for the conversion cycles offset. More...
 
bool get_enable_active_mux_amplifiers () const SYMBOL_VISIBLE
 
bool get_enable_calibration () const SYMBOL_VISIBLE
 Accessors for the built-in self-calibration. More...
 
bool get_enable_dummy_data () const SYMBOL_VISIBLE
 
bool get_enable_iconv_amplifier () const SYMBOL_VISIBLE
 Accessors for the configuration of the current conversion circuit. More...
 
bool get_enable_madc_clock_scaling () const SYMBOL_VISIBLE
 Accessors for the clock scaling configuration. More...
 
bool get_enable_sar_reset_on_fall () const SYMBOL_VISIBLE
 Configuration of the MADC's SAR reset timing. More...
 
SamplingWindowTiming get_iconv_sampling_window_end () const SYMBOL_VISIBLE
 
SamplingWindowTiming get_iconv_sampling_window_start () const SYMBOL_VISIBLE
 
MADCClockScaleValue get_madc_clock_scale_value () const SYMBOL_VISIBLE
 
NumberOfSamples get_number_of_samples () const SYMBOL_VISIBLE
 Accessors for the number of samples recorded by the MADC. More...
 
PowerupWaitValue get_powerup_wait_value () const SYMBOL_VISIBLE
 Configuration of the powerup wait value. More...
 
PreampGainCapacitorSize get_preamp_gain_capacitor_size () const SYMBOL_VISIBLE
 Accessors for the preamplifier's gain selection capacitor. More...
 
SamplingWindowTiming get_preamp_sampling_window_end () const SYMBOL_VISIBLE
 
SamplingWindowTiming get_preamp_sampling_window_start () const SYMBOL_VISIBLE
 Accessors for the timing of the sampling phase for both, the (voltage recording) preamp and the current conversion circuit. More...
 
SampleDurationAdjust get_sample_duration_adjust () const SYMBOL_VISIBLE
 Accessors for the sample duration adjustment. More...
 
bool get_sample_on_positive_edge () const SYMBOL_VISIBLE
 
SARResetLength get_sar_reset_length () const SYMBOL_VISIBLE
 
SARResetWait get_sar_reset_wait () const SYMBOL_VISIBLE
 
bool get_signal_selection_connect_active_mux () const SYMBOL_VISIBLE
 
bool get_signal_selection_connect_current_meter () const SYMBOL_VISIBLE
 Accessors for the preamp mux located before the preamplifier. More...
 
bool get_signal_selection_connect_debug () const SYMBOL_VISIBLE
 
bool get_signal_selection_connect_preamp () const SYMBOL_VISIBLE
 
bool operator!= (MADCConfig const &other) const SYMBOL_VISIBLE
 
bool operator== (MADCConfig const &other) const SYMBOL_VISIBLE
 
 return_value_policy (reference_internal)) hemisphere_type const &get_connect_iconv_neuron() const SYMBOL_VISIBLE
 
 return_value_policy (reference_internal)) hemisphere_type const &get_enable_pseudo_differential_reference() const SYMBOL_VISIBLE
 
 return_value_policy (reference_internal)) synapse_target_type const &get_connect_iconv_synapse() const SYMBOL_VISIBLE
 
void set_active_mux_initially_selected_input (input_selection_type const &value) SYMBOL_VISIBLE
 
void set_active_mux_input_select_length (ActiveMuxInputSelectLength const &value) SYMBOL_VISIBLE
 
void set_calibration_wait_value (CalibrationWaitValue const &value) SYMBOL_VISIBLE
 
void set_connect_iconv_neuron (hemisphere_type const &value) SYMBOL_VISIBLE
 
void set_connect_iconv_synapse (synapse_target_type const &value) SYMBOL_VISIBLE
 
void set_connect_pads_to_madc (bool const value) SYMBOL_VISIBLE
 
void set_connect_preamp_to_madc (bool const value) SYMBOL_VISIBLE
 
void set_connect_preamp_to_pads (bool const value) SYMBOL_VISIBLE
 
void set_conversion_cycles_offset (ConversionCyclesOffset const &value) SYMBOL_VISIBLE
 
void set_enable_active_mux_amplifiers (bool const value) SYMBOL_VISIBLE
 
void set_enable_calibration (bool const value) SYMBOL_VISIBLE
 
void set_enable_dummy_data (bool const value) SYMBOL_VISIBLE
 
void set_enable_iconv_amplifier (bool const value) SYMBOL_VISIBLE
 
void set_enable_madc_clock_scaling (bool const value) SYMBOL_VISIBLE
 
void set_enable_pseudo_differential_reference (hemisphere_type const &value) SYMBOL_VISIBLE
 
void set_enable_sar_reset_on_fall (bool const value) SYMBOL_VISIBLE
 
void set_iconv_sampling_window_end (SamplingWindowTiming const &value) SYMBOL_VISIBLE
 
void set_iconv_sampling_window_start (SamplingWindowTiming const &value) SYMBOL_VISIBLE
 
void set_madc_clock_scale_value (MADCClockScaleValue const &value) SYMBOL_VISIBLE
 
void set_number_of_samples (NumberOfSamples const &value) SYMBOL_VISIBLE
 
void set_powerup_wait_value (PowerupWaitValue const &value) SYMBOL_VISIBLE
 
void set_preamp_gain_capacitor_size (PreampGainCapacitorSize const &value) SYMBOL_VISIBLE
 
void set_preamp_sampling_window_end (SamplingWindowTiming const &value) SYMBOL_VISIBLE
 
void set_preamp_sampling_window_start (SamplingWindowTiming const &value) SYMBOL_VISIBLE
 
void set_sample_duration_adjust (SampleDurationAdjust const &value) SYMBOL_VISIBLE
 
void set_sample_on_positive_edge (bool const value) SYMBOL_VISIBLE
 
void set_sar_reset_length (SARResetLength const &value) SYMBOL_VISIBLE
 
void set_sar_reset_wait (SARResetWait const &value) SYMBOL_VISIBLE
 
void set_signal_selection_connect_active_mux (bool const value) SYMBOL_VISIBLE
 
void set_signal_selection_connect_current_meter (bool const value) SYMBOL_VISIBLE
 
void set_signal_selection_connect_debug (bool const value) SYMBOL_VISIBLE
 
void set_signal_selection_connect_preamp (bool const value) SYMBOL_VISIBLE
 

Static Public Attributes

static constexpr size_t config_size_in_words = 10
 

Friends

class cereal::access
 
std::ostream & operator<< (std::ostream &os, MADCConfig const &config) SYMBOL_VISIBLE
 

Detailed Description

Configuration container for MADC and related circuitry.

Definition at line 134 of file madc.h.

Member Typedef Documentation

◆ coordinate_type

typedef halco::hicann_dls::vx::MADCConfigOnDLS haldls::vx::MADCConfig::coordinate_type

Definition at line 137 of file madc.h.

◆ hemisphere_type

typedef halco::common::typed_array<bool, halco::hicann_dls::vx::HemisphereOnDLS> haldls::vx::MADCConfig::hemisphere_type

Definition at line 229 of file madc.h.

◆ input_selection_type

typedef halco::hicann_dls::vx::SourceMultiplexerOnReadoutSourceSelection haldls::vx::MADCConfig::input_selection_type

Definition at line 138 of file madc.h.

◆ is_leaf_node

typedef std::true_type haldls::vx::MADCConfig::is_leaf_node

Definition at line 139 of file madc.h.

◆ synapse_target_type

typedef halco::common::typed_array<bool, halco::hicann_dls::vx::SynapticInputOnNeuron> haldls::vx::MADCConfig::synapse_target_type

Definition at line 233 of file madc.h.

Constructor & Destructor Documentation

◆ MADCConfig()

haldls::vx::MADCConfig::MADCConfig ( )

Default constructor for the MADC config.

The default values are in a usable state, the MADC is connected to the SourceMultiplexerOnReadoutSourceSelection(0). Only the number of samples to record is required to be set.

Member Function Documentation

◆ addresses()

template<typename AddressT >
std::array<AddressT, config_size_in_words> haldls::vx::MADCConfig::addresses ( coordinate_type const &  coord) const

◆ calculate_sample_rate()

double haldls::vx::MADCConfig::calculate_sample_rate ( double const &  madc_base_frequency) const

Accessors for the sampling rate of the madc in Hz.

The calculation considers the following settings of the MADC state:

  • m_sample_duration_adjust
  • m_enable_madc_clock_scaling
  • m_madc_clock_scale_value
    Parameters
    madc_base_frequencyBase frequency of the madc, which can be obtained from the ADPLL settings and PLLClockOutputBlock.
    Returns
    Double describing the madc sample rate

◆ decode()

template<typename WordT >
void haldls::vx::MADCConfig::decode ( std::array< WordT, config_size_in_words > const &  data)

◆ encode()

template<typename WordT >
std::array<WordT, config_size_in_words> haldls::vx::MADCConfig::encode ( ) const

◆ get_active_mux_initially_selected_input()

input_selection_type haldls::vx::MADCConfig::get_active_mux_initially_selected_input ( ) const

Set the initially selected input of the active mux.

Caution: the property is called initially_selected_amp in RTL.

◆ get_active_mux_input_select_length()

ActiveMuxInputSelectLength haldls::vx::MADCConfig::get_active_mux_input_select_length ( ) const

Set the number of samples the mux's inputs are selected for in direct succession.

In the following example the MADC would record four samples on one input, before the mux switches to the other one: input 0: |||| |||| … input 1: |||| |||| …

Caution: the property is called amp_select_length in RTL.

◆ get_calibration_wait_value()

CalibrationWaitValue haldls::vx::MADCConfig::get_calibration_wait_value ( ) const

Accessors for the built-in calibration's timing of the MADC.

◆ get_connect_pads_to_madc()

bool haldls::vx::MADCConfig::get_connect_pads_to_madc ( ) const

◆ get_connect_preamp_to_madc()

bool haldls::vx::MADCConfig::get_connect_preamp_to_madc ( ) const

◆ get_connect_preamp_to_pads()

bool haldls::vx::MADCConfig::get_connect_preamp_to_pads ( ) const

◆ get_conversion_cycles_offset()

ConversionCyclesOffset haldls::vx::MADCConfig::get_conversion_cycles_offset ( ) const

Configuration for the conversion cycles offset.

This seems to be redundant to sample_duration_adjust. Both settings are summed up in hardware.

Caution: the meaning of this setting was reverse engineered due to a lack of documentation!

◆ get_enable_active_mux_amplifiers()

bool haldls::vx::MADCConfig::get_enable_active_mux_amplifiers ( ) const

◆ get_enable_calibration()

bool haldls::vx::MADCConfig::get_enable_calibration ( ) const

Accessors for the built-in self-calibration.

◆ get_enable_dummy_data()

bool haldls::vx::MADCConfig::get_enable_dummy_data ( ) const

◆ get_enable_iconv_amplifier()

bool haldls::vx::MADCConfig::get_enable_iconv_amplifier ( ) const

Accessors for the configuration of the current conversion circuit.

The first property enables the internal amplifier of the circuit. The other properties allow to connect either the direct neuron access or the synaptic debug lines.

◆ get_enable_madc_clock_scaling()

bool haldls::vx::MADCConfig::get_enable_madc_clock_scaling ( ) const

Accessors for the clock scaling configuration.

The clock is derived from a PLL madc_clk output.

◆ get_enable_sar_reset_on_fall()

bool haldls::vx::MADCConfig::get_enable_sar_reset_on_fall ( ) const

Configuration of the MADC's SAR reset timing.

◆ get_iconv_sampling_window_end()

SamplingWindowTiming haldls::vx::MADCConfig::get_iconv_sampling_window_end ( ) const

◆ get_iconv_sampling_window_start()

SamplingWindowTiming haldls::vx::MADCConfig::get_iconv_sampling_window_start ( ) const

◆ get_madc_clock_scale_value()

MADCClockScaleValue haldls::vx::MADCConfig::get_madc_clock_scale_value ( ) const

◆ get_number_of_samples()

NumberOfSamples haldls::vx::MADCConfig::get_number_of_samples ( ) const

Accessors for the number of samples recorded by the MADC.

The MADC records a fixed number of samples as long as it is not configured to sample continuously (c.f. enable_sample_continously).

Caution: this property is called num_samples in the RTL description.

◆ get_powerup_wait_value()

PowerupWaitValue haldls::vx::MADCConfig::get_powerup_wait_value ( ) const

Configuration of the powerup wait value.

This MADC remains in the wake up state for a number of MADC clock cycles determined by this property before transitioning to the READY state (via ENABLE).

◆ get_preamp_gain_capacitor_size()

PreampGainCapacitorSize haldls::vx::MADCConfig::get_preamp_gain_capacitor_size ( ) const

Accessors for the preamplifier's gain selection capacitor.

◆ get_preamp_sampling_window_end()

SamplingWindowTiming haldls::vx::MADCConfig::get_preamp_sampling_window_end ( ) const

◆ get_preamp_sampling_window_start()

SamplingWindowTiming haldls::vx::MADCConfig::get_preamp_sampling_window_start ( ) const

Accessors for the timing of the sampling phase for both, the (voltage recording) preamp and the current conversion circuit.

The sampling window is determined by the timing of its rising and falling edge.

Caution: these properties are called phi_vga_toggle[0,1] and phi_2quadrant_toggle[0,1] for the preamp and current conversion, respectively.

◆ get_sample_duration_adjust()

SampleDurationAdjust haldls::vx::MADCConfig::get_sample_duration_adjust ( ) const

Accessors for the sample duration adjustment.

This seems to be redundant to conversion_cycles_offset. Both settings are summed up in hardware.

Caution: the property is called sample_adjust in RTL. Caution: the meaning of this setting was reverse engineered due to a lack of documentation!

◆ get_sample_on_positive_edge()

bool haldls::vx::MADCConfig::get_sample_on_positive_edge ( ) const

◆ get_sar_reset_length()

SARResetLength haldls::vx::MADCConfig::get_sar_reset_length ( ) const

◆ get_sar_reset_wait()

SARResetWait haldls::vx::MADCConfig::get_sar_reset_wait ( ) const

◆ get_signal_selection_connect_active_mux()

bool haldls::vx::MADCConfig::get_signal_selection_connect_active_mux ( ) const

◆ get_signal_selection_connect_current_meter()

bool haldls::vx::MADCConfig::get_signal_selection_connect_current_meter ( ) const

Accessors for the preamp mux located before the preamplifier.

This mux has four (pairs of) inputs: the active mux (for voltage measurements), the current conversion circuit, two debug lines (which might be applied to the chip's pads), and the preamplifier. The first two serve as signal sources, the latter as a sink. The pads may serve as either. To connect two (or more) sources/sinks, the user must connect any of them.

Caution: the respective properties are called fmc_2_quadrant, fmc_act_mux, fmc_debug, and fmc_to_vga.

◆ get_signal_selection_connect_debug()

bool haldls::vx::MADCConfig::get_signal_selection_connect_debug ( ) const

◆ get_signal_selection_connect_preamp()

bool haldls::vx::MADCConfig::get_signal_selection_connect_preamp ( ) const

◆ operator!=()

bool haldls::vx::MADCConfig::operator!= ( MADCConfig const &  other) const

◆ operator==()

bool haldls::vx::MADCConfig::operator== ( MADCConfig const &  other) const

◆ return_value_policy() [1/3]

haldls::vx::MADCConfig::return_value_policy ( reference_internal  ) const &

◆ return_value_policy() [2/3]

haldls::vx::MADCConfig::return_value_policy ( reference_internal  ) const &

◆ return_value_policy() [3/3]

haldls::vx::MADCConfig::return_value_policy ( reference_internal  ) const &

◆ set_active_mux_initially_selected_input()

void haldls::vx::MADCConfig::set_active_mux_initially_selected_input ( input_selection_type const &  value)

◆ set_active_mux_input_select_length()

void haldls::vx::MADCConfig::set_active_mux_input_select_length ( ActiveMuxInputSelectLength const &  value)

◆ set_calibration_wait_value()

void haldls::vx::MADCConfig::set_calibration_wait_value ( CalibrationWaitValue const &  value)

◆ set_connect_iconv_neuron()

void haldls::vx::MADCConfig::set_connect_iconv_neuron ( hemisphere_type const &  value)

◆ set_connect_iconv_synapse()

void haldls::vx::MADCConfig::set_connect_iconv_synapse ( synapse_target_type const &  value)

◆ set_connect_pads_to_madc()

void haldls::vx::MADCConfig::set_connect_pads_to_madc ( bool const  value)

◆ set_connect_preamp_to_madc()

void haldls::vx::MADCConfig::set_connect_preamp_to_madc ( bool const  value)

◆ set_connect_preamp_to_pads()

void haldls::vx::MADCConfig::set_connect_preamp_to_pads ( bool const  value)

◆ set_conversion_cycles_offset()

void haldls::vx::MADCConfig::set_conversion_cycles_offset ( ConversionCyclesOffset const &  value)

◆ set_enable_active_mux_amplifiers()

void haldls::vx::MADCConfig::set_enable_active_mux_amplifiers ( bool const  value)

◆ set_enable_calibration()

void haldls::vx::MADCConfig::set_enable_calibration ( bool const  value)

◆ set_enable_dummy_data()

void haldls::vx::MADCConfig::set_enable_dummy_data ( bool const  value)

◆ set_enable_iconv_amplifier()

void haldls::vx::MADCConfig::set_enable_iconv_amplifier ( bool const  value)

◆ set_enable_madc_clock_scaling()

void haldls::vx::MADCConfig::set_enable_madc_clock_scaling ( bool const  value)

◆ set_enable_pseudo_differential_reference()

void haldls::vx::MADCConfig::set_enable_pseudo_differential_reference ( hemisphere_type const &  value)

◆ set_enable_sar_reset_on_fall()

void haldls::vx::MADCConfig::set_enable_sar_reset_on_fall ( bool const  value)

◆ set_iconv_sampling_window_end()

void haldls::vx::MADCConfig::set_iconv_sampling_window_end ( SamplingWindowTiming const &  value)

◆ set_iconv_sampling_window_start()

void haldls::vx::MADCConfig::set_iconv_sampling_window_start ( SamplingWindowTiming const &  value)

◆ set_madc_clock_scale_value()

void haldls::vx::MADCConfig::set_madc_clock_scale_value ( MADCClockScaleValue const &  value)

◆ set_number_of_samples()

void haldls::vx::MADCConfig::set_number_of_samples ( NumberOfSamples const &  value)

◆ set_powerup_wait_value()

void haldls::vx::MADCConfig::set_powerup_wait_value ( PowerupWaitValue const &  value)

◆ set_preamp_gain_capacitor_size()

void haldls::vx::MADCConfig::set_preamp_gain_capacitor_size ( PreampGainCapacitorSize const &  value)

◆ set_preamp_sampling_window_end()

void haldls::vx::MADCConfig::set_preamp_sampling_window_end ( SamplingWindowTiming const &  value)

◆ set_preamp_sampling_window_start()

void haldls::vx::MADCConfig::set_preamp_sampling_window_start ( SamplingWindowTiming const &  value)

◆ set_sample_duration_adjust()

void haldls::vx::MADCConfig::set_sample_duration_adjust ( SampleDurationAdjust const &  value)

◆ set_sample_on_positive_edge()

void haldls::vx::MADCConfig::set_sample_on_positive_edge ( bool const  value)

◆ set_sar_reset_length()

void haldls::vx::MADCConfig::set_sar_reset_length ( SARResetLength const &  value)

◆ set_sar_reset_wait()

void haldls::vx::MADCConfig::set_sar_reset_wait ( SARResetWait const &  value)

◆ set_signal_selection_connect_active_mux()

void haldls::vx::MADCConfig::set_signal_selection_connect_active_mux ( bool const  value)

◆ set_signal_selection_connect_current_meter()

void haldls::vx::MADCConfig::set_signal_selection_connect_current_meter ( bool const  value)

◆ set_signal_selection_connect_debug()

void haldls::vx::MADCConfig::set_signal_selection_connect_debug ( bool const  value)

◆ set_signal_selection_connect_preamp()

void haldls::vx::MADCConfig::set_signal_selection_connect_preamp ( bool const  value)

Friends And Related Function Documentation

◆ cereal::access

friend class cereal::access
friend

Definition at line 557 of file madc.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
MADCConfig const &  config 
)
friend

Member Data Documentation

◆ config_size_in_words

constexpr size_t haldls::vx::MADCConfig::config_size_in_words = 10
staticconstexpr

Definition at line 544 of file madc.h.


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