HALDLS
|
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_words > | addresses (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_words > | encode () 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 |
typedef halco::hicann_dls::vx::MADCConfigOnDLS haldls::vx::MADCConfig::coordinate_type |
typedef halco::common::typed_array<bool, halco::hicann_dls::vx::HemisphereOnDLS> haldls::vx::MADCConfig::hemisphere_type |
typedef halco::hicann_dls::vx::SourceMultiplexerOnReadoutSourceSelection haldls::vx::MADCConfig::input_selection_type |
typedef std::true_type haldls::vx::MADCConfig::is_leaf_node |
typedef halco::common::typed_array<bool, halco::hicann_dls::vx::SynapticInputOnNeuron> haldls::vx::MADCConfig::synapse_target_type |
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.
std::array<AddressT, config_size_in_words> haldls::vx::MADCConfig::addresses | ( | coordinate_type const & | coord | ) | const |
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:
madc_base_frequency | Base frequency of the madc, which can be obtained from the ADPLL settings and PLLClockOutputBlock. |
void haldls::vx::MADCConfig::decode | ( | std::array< WordT, config_size_in_words > const & | data | ) |
std::array<WordT, config_size_in_words> haldls::vx::MADCConfig::encode | ( | ) | const |
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.
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.
CalibrationWaitValue haldls::vx::MADCConfig::get_calibration_wait_value | ( | ) | const |
Accessors for the built-in calibration's timing of the MADC.
bool haldls::vx::MADCConfig::get_connect_pads_to_madc | ( | ) | const |
bool haldls::vx::MADCConfig::get_connect_preamp_to_madc | ( | ) | const |
bool haldls::vx::MADCConfig::get_connect_preamp_to_pads | ( | ) | const |
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!
bool haldls::vx::MADCConfig::get_enable_active_mux_amplifiers | ( | ) | const |
bool haldls::vx::MADCConfig::get_enable_calibration | ( | ) | const |
Accessors for the built-in self-calibration.
bool haldls::vx::MADCConfig::get_enable_dummy_data | ( | ) | const |
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.
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.
bool haldls::vx::MADCConfig::get_enable_sar_reset_on_fall | ( | ) | const |
Configuration of the MADC's SAR reset timing.
SamplingWindowTiming haldls::vx::MADCConfig::get_iconv_sampling_window_end | ( | ) | const |
SamplingWindowTiming haldls::vx::MADCConfig::get_iconv_sampling_window_start | ( | ) | const |
MADCClockScaleValue haldls::vx::MADCConfig::get_madc_clock_scale_value | ( | ) | const |
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.
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
).
PreampGainCapacitorSize haldls::vx::MADCConfig::get_preamp_gain_capacitor_size | ( | ) | const |
Accessors for the preamplifier's gain selection capacitor.
SamplingWindowTiming haldls::vx::MADCConfig::get_preamp_sampling_window_end | ( | ) | const |
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.
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!
bool haldls::vx::MADCConfig::get_sample_on_positive_edge | ( | ) | const |
SARResetLength haldls::vx::MADCConfig::get_sar_reset_length | ( | ) | const |
SARResetWait haldls::vx::MADCConfig::get_sar_reset_wait | ( | ) | const |
bool haldls::vx::MADCConfig::get_signal_selection_connect_active_mux | ( | ) | const |
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
.
bool haldls::vx::MADCConfig::get_signal_selection_connect_debug | ( | ) | const |
bool haldls::vx::MADCConfig::get_signal_selection_connect_preamp | ( | ) | const |
bool haldls::vx::MADCConfig::operator!= | ( | MADCConfig const & | other | ) | const |
bool haldls::vx::MADCConfig::operator== | ( | MADCConfig const & | other | ) | const |
haldls::vx::MADCConfig::return_value_policy | ( | reference_internal | ) | const & |
haldls::vx::MADCConfig::return_value_policy | ( | reference_internal | ) | const & |
haldls::vx::MADCConfig::return_value_policy | ( | reference_internal | ) | const & |
void haldls::vx::MADCConfig::set_active_mux_initially_selected_input | ( | input_selection_type const & | value | ) |
void haldls::vx::MADCConfig::set_active_mux_input_select_length | ( | ActiveMuxInputSelectLength const & | value | ) |
void haldls::vx::MADCConfig::set_calibration_wait_value | ( | CalibrationWaitValue const & | value | ) |
void haldls::vx::MADCConfig::set_connect_iconv_neuron | ( | hemisphere_type const & | value | ) |
void haldls::vx::MADCConfig::set_connect_iconv_synapse | ( | synapse_target_type const & | value | ) |
void haldls::vx::MADCConfig::set_connect_pads_to_madc | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_connect_preamp_to_madc | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_connect_preamp_to_pads | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_conversion_cycles_offset | ( | ConversionCyclesOffset const & | value | ) |
void haldls::vx::MADCConfig::set_enable_active_mux_amplifiers | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_enable_calibration | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_enable_dummy_data | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_enable_iconv_amplifier | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_enable_madc_clock_scaling | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_enable_pseudo_differential_reference | ( | hemisphere_type const & | value | ) |
void haldls::vx::MADCConfig::set_enable_sar_reset_on_fall | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_iconv_sampling_window_end | ( | SamplingWindowTiming const & | value | ) |
void haldls::vx::MADCConfig::set_iconv_sampling_window_start | ( | SamplingWindowTiming const & | value | ) |
void haldls::vx::MADCConfig::set_madc_clock_scale_value | ( | MADCClockScaleValue const & | value | ) |
void haldls::vx::MADCConfig::set_number_of_samples | ( | NumberOfSamples const & | value | ) |
void haldls::vx::MADCConfig::set_powerup_wait_value | ( | PowerupWaitValue const & | value | ) |
void haldls::vx::MADCConfig::set_preamp_gain_capacitor_size | ( | PreampGainCapacitorSize const & | value | ) |
void haldls::vx::MADCConfig::set_preamp_sampling_window_end | ( | SamplingWindowTiming const & | value | ) |
void haldls::vx::MADCConfig::set_preamp_sampling_window_start | ( | SamplingWindowTiming const & | value | ) |
void haldls::vx::MADCConfig::set_sample_duration_adjust | ( | SampleDurationAdjust const & | value | ) |
void haldls::vx::MADCConfig::set_sample_on_positive_edge | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_sar_reset_length | ( | SARResetLength const & | value | ) |
void haldls::vx::MADCConfig::set_sar_reset_wait | ( | SARResetWait const & | value | ) |
void haldls::vx::MADCConfig::set_signal_selection_connect_active_mux | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_signal_selection_connect_current_meter | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_signal_selection_connect_debug | ( | bool const | value | ) |
void haldls::vx::MADCConfig::set_signal_selection_connect_preamp | ( | bool const | value | ) |
|
friend |
|
staticconstexpr |