samna.afe2.configuration

Contents

samna.afe2.configuration#

Submodules#

Module content#

class samna.afe2.configuration.Aer2SaerConfig#

Bases: pybind11_object

The AER2SAER block converts AER events to SAER events.

The following features are supported:

16 independent channels

10 bit counter with configurable threshold for each channel to fine tune the event rate

property calibration#

A module that calibrates leakage and gain, an instance of CalibrationConfig.

property channel_thresholds#

Counter Threshold

property clock#

Divided clock related configuration, an instance of ClockConfig.

property dn#

A module that reduces noise, an instance of DnConfig.

from_json(self: samna.afe2.configuration.Aer2SaerConfig, arg0: str) None#
property hibernation#

This block controls the output saer signal sent out from aer2saer module according to the spike number during detecting timing window, an instance of HibernationConfig.

to_json(self: samna.afe2.configuration.Aer2SaerConfig) str#
class samna.afe2.configuration.AfeConfiguration#

Bases: pybind11_object

The overall configuration of AFE2.

property aer_2_saer#

The AER2SAER block converts AER event to SAER event, it’s an instance of Aer2SaerConfig.

property analog_top#

The main control part of afe, an instance of AnalogTopConfig.

from_json(self: samna.afe2.configuration.AfeConfiguration, arg0: str) None#
to_json(self: samna.afe2.configuration.AfeConfiguration) str#
class samna.afe2.configuration.AnalogTopConfig#

Bases: pybind11_object

The main control part of AFE2.

property analog_top_control#

Analog top control:

  • <0>: test enable for ch_out_ackB, ch_out_reqB, ch_out_data<3:0>

  • <2:1>: FWR_CAS_CTL, FWR output current mirror cascode votage control

  • <3>:enable of tst_sqd

  • <4>:path_sel of tst_bufp

  • <5>:enble of tst_bufp

  • <6>:path_sel of tst_bufn

  • <7>:enable of tst_bufn

property bpf#

Band Pass Filter Bank. An instance of BpfConfig.

property channels#

16 independent channels in AER2SAER converter, they are all enabled by default. Each of them is an instance of ChannelConfig.

property enable#

Enable analog top

property external_bias_current#

Choose the bias current source:

  • 0: constant gm module

  • 1: off chip

from_json(self: samna.afe2.configuration.AnalogTopConfig, arg0: str) None#
property fwr#

Full Wave Rectifier. An instance of FwrConfig.

property iaf#

Integrate and Fire. An instance of IafConfig.

property ldo#

Ldo configuration. An instance of LdoConfig.

property lna#

Low Noice Amplifiler. An instance of LnaConfig.

property mgm#

Master gm configuration. An instance of MgmConfig.

property sqdl#

Squlech detector configuration. An instance of SqdlConfig.

to_json(self: samna.afe2.configuration.AnalogTopConfig) str#
class samna.afe2.configuration.BpfConfig#

Bases: pybind11_object

The band pass filter bank consists of 16 band pass filters.

property base_frequency#

reserved

property bias#

master gm cell bias select:

<2>:160n; <1>:80n; <0>:40n

property c1#

bpf V2 C1 ctrl

property c3#

bpf V2 C3 ctrl

from_json(self: samna.afe2.configuration.BpfConfig, arg0: str) None#
property q_value#

q value select:

4*sqrt(C2/C1)

4’b0000:q=4 f0=380Hz; 4b’0001:q=5.6 f0=275Hz; 4b’0010:q=5.6 f0=275Hz; 4b’0011: q=6.8 f0=223Hz; 4’b0100:q=5.6 f0=275Hz; 4b’0101:q=6.8 f0=223Hz; b’0110:q=6.8 f0=223Hz; 4b’0111: q=8 f0=200Hz; 4’b1000:q=2.8 f0=269Hz; 4b’1001:q=4 f0=194Hz; 4b’1011:q=4.8 f0=162Hz; 4b’1100: q=4 f0=194Hz; 4’b1101:q=4 .8 f0=162Hz; 4b’1110:q=4.8 f0= 162Hz; 4b’1111:q=5.6 f0=141Hz

property scale#

k of space between channels:

0: 1.35; 1: 1.5

to_json(self: samna.afe2.configuration.BpfConfig) str#
property vcm#

bpf vcm modification:

2’b00 402mV; 2’b01 455mV; 2’b10 550mV; 2’b11 493mV

class samna.afe2.configuration.CalibrationConfig#

Bases: pybind11_object

Reduce input spike signals caused by leakage of each channel.

Reduce the gain variation between each channel.

This block auto-calibrates the DAC values of analog circuit, 4 working modes are supported and 2 trigger modes:

Mode 0: no calibration

Mode 1: leakage calibration

Mode 2: gain calibration

Mode 3: whole calibration

Trig 1: restart the whole calibration

Trig 2: restart the calibration based on latest results

The calibration module is going to calibrate all 16 channels.

property afe_stable_time#

Stable time for AFE After Power On

from_json(self: samna.afe2.configuration.CalibrationConfig, arg0: str) None#
property gain_ratio#

multiple ratio for gain calibration

ratio=gain_tw/leak_tw

property gain_target_spike_number#

Target Spike Number for Gain Calibration

property gain_td#

Td For Gain Calibration

property gain_timing_window#

Timing Window Setting for Gain Calibration

property leak_target_spike_number#

Target Spike Number for Leakage Calibration

property leak_td#

Td For Leakage Calibration

property leak_timing_window#

Timing Window Setting for Leakage Calibration

property mode#

Select For Calibration Mode:

  • 00:manual mode

  • 01:leak-only auto mode

  • 10:gain-only auto mode

  • 11:all auto mode

property reset#

reset signal for calibration mode

to_json(self: samna.afe2.configuration.CalibrationConfig) str#
class samna.afe2.configuration.ChannelConfig#

Bases: pybind11_object

The configuration for each channel.

from_json(self: samna.afe2.configuration.ChannelConfig, arg0: str) None#
property iaf_comp_vref#

comparator threshold voltage control for this channel:

  • 0: 100 mV

  • 1: 200 mV

  • 2: 300 mV

  • 3: 400 mV

  • 4: 500 mV

  • 5: 600 mV

  • 6: 700 mV

  • 7: 800 mV

property iaf_leak_bias#

channel fwr leakage bias source:

  • 0:10n

  • 1: 20n

property iaf_leak_current#

leakage current control for this channel:

  • 0: 100 mV

  • 1: 200 mV

  • 2: 300 mV

  • 3: 400 mV

  • 4: 500 mV

  • 5: 600 mV

  • 6: 700 mV

  • 7: 800 mV

property ib#

bpf gm calibration current set(gm scale ) for this channel:

  • I_BPF_SE<0>:0.25

  • I_BPF_SE<1>:0.5

  • I_BPF_SE<2>:1

  • I_BPF_SE<3>:2

property leak#

channel leak sel

to_json(self: samna.afe2.configuration.ChannelConfig) str#
class samna.afe2.configuration.ClockConfig#

Bases: pybind11_object

Divided clock related configuration.

property divide_times#

Div_times for divided clk

property enable#

Enable signal for divided clk

from_json(self: samna.afe2.configuration.ClockConfig, arg0: str) None#
property reset#

Reset signal for divided clk

to_json(self: samna.afe2.configuration.ClockConfig) str#
class samna.afe2.configuration.DnConfig#

Bases: pybind11_object

A module that reduces noise.

property enable#

Enable signal for DN module

property feame_th#

Number of clock periods for each DN frame

from_json(self: samna.afe2.configuration.DnConfig, arg0: str) None#
property iaf_bias#

IAF_BIAS

property loc_div_times#

Div_times for dn_loc_clk

property p_param#

P parameter

property s_param#

S parameter

property sys_div_times#

Div_times for dn_sys_clk

to_json(self: samna.afe2.configuration.DnConfig) str#
class samna.afe2.configuration.FwrConfig#

Bases: pybind11_object

The full wave rectifier rectifies the output of band pass filter bank.

property bias#

master gm cell bias select:

<2>:20n; <1>:10n; <0>:5n

property bias_current#

select bias current:

0: 5 nA; 1: 3 nA; 2: 7 nA; 3: 10 nA

from_json(self: samna.afe2.configuration.FwrConfig, arg0: str) None#
property ota_bias_current#

select OTA bias current:

0: 20 nA; 1: 12 nA; 2: 28 nA; 3: 40 nA

property ota_gm#

OTA OF FWR GM modification:

<2>:resvered; <1:0>2’b00:953ns; 2’b01:506ns; 2’b10:506ns; 2’b11:348ns

property ota_vcm#

select OTA VCM:

2’b00 493mV; 2’b01 531mV; 2’b10 569mV; 2’b11 606mV

property switch_resistance#

FWR SWITCH RES modification:

FWR_RES_SEL<3>:reserved; FWR_RES_SEL<2>:double res; FWR_RES_SEL<1>:1/2 rectifier res; FWR_RES_SEL<0>:1/4 rectifier res

to_json(self: samna.afe2.configuration.FwrConfig) str#
property vcm#

select FWR bias VCM:

2’b00 493mV; 2’b01 531mV; 2’b10 569mV; 2’b11 606mV

property vref_down#

select FWR VREF DN bias:

2’b00 113mV; 2’b01 227mV; 2’b10 341mV; 2’b11 455mV

property vref_up#

select FWR VREF UP bias:

2’b00 986mV; 2’b01 872mV; 2’b10 758mV; 2’b11 644mV

class samna.afe2.configuration.HibernationConfig#

Bases: pybind11_object

This block controls the output saer signal sent out from aer2saer module according to the spike number during detecting timing window.

This block instances 16 cntr_ch blocks for 16 channels

For getting more key information, signal in last de-active timing window will be saved and sent out at the begining of first active timing window.

3 working modes are supported:

  • Mode 0: no calibration;

  • Mode 1: status judged by analog circuit;

  • Mode 2: status judged by digital circuit;

  • Mode 3: not used

property active_mode_spike_threshold#

Spike number threshold for active mode

property active_status_detection_timing_window#

Timing window for active status detection

property deactive_mode_spike_threshold#

Spike number threshold for deactive mode

property deactive_status_detection_timing_window#

Timing window for deactive status detection

from_json(self: samna.afe2.configuration.HibernationConfig, arg0: str) None#
property mode#

Select for hibernation mode:

  • 00: Not used

  • 01: Analog mode

  • 10: Digital mode

property reset#

Reset signal for hibernation

to_json(self: samna.afe2.configuration.HibernationConfig) str#
class samna.afe2.configuration.IafConfig#

Bases: pybind11_object

The IAF module converts output of FWR into spikes.

property bias_current#

bias current control:

0: 50 nA; 1: 30 nA; 2: 70 nA; 3: 100 nA

property comparator_current#

comparator current control:

0: 50 nA; 1: 75 nA; 2: 100 nA; 3: 125 nA; 4: 150 nA; 5: 175 nA; 6: 200 nA; 7: 225 nA

property comparator_threshold#

comparator output trigger point control

from_json(self: samna.afe2.configuration.IafConfig, arg0: str) None#
property ignore_signal_pulse_width#

iaf vref2 s<2>increase:

<1:0>decrease; 011:200mV; 100:278mV

property reset_signal_pulse_delay#

select reset signal pulse delay path select

property reset_signal_pulse_width#

iaf verf1 select:

<2>increase; <1:0>decrease; 011:206mV; 100:333mV

to_json(self: samna.afe2.configuration.IafConfig) str#
class samna.afe2.configuration.LdoConfig#

Bases: pybind11_object

Ldo configuration.

property ana_vsel#

Output Voltage control for Analog LDO(V):

000: 1.1 001: 1.05 010: 1.0 011: 0.95 100: 1.3 101: 1.25 110: 1.2 111: 1.15

property dig_vsel#

Output Voltage control for Digital LDO(V):

000: 1.1 001: 1.05 010: 1.0 011: 0.95 100: 1.3 101: 1.25 110: 1.2 111: 1.15

from_json(self: samna.afe2.configuration.LdoConfig, arg0: str) None#
to_json(self: samna.afe2.configuration.LdoConfig) str#
class samna.afe2.configuration.LnaConfig#

Bases: pybind11_object

The low noise amplifier amplifies the input with given gain.

property cf_tune#

extra 1p cap witch low active config cap:

LNA_CF_TUNE<0>:1p; LNA_CF_TUNE<1>:2p; LNA_CF_TUNE<2>:4p; LNA_CF_TUNE<3>:4P

property ci_tune#

Extra 0.25p cap witch low active config cap:

LNA_CI_TUNE<0>:0.5p; LNA_CI_TUNE<1>:1p; LNA_CI_TUNE<2>:2p; LNA_CI_TUNE<3>:4P

property feedback_cap_config_disable#

LNA Feedback cap config disable.

from_json(self: samna.afe2.configuration.LnaConfig, arg0: str) None#
property front_cap_config_disable#

LNA front cap config disable.

property select_current#

lna current select:

60n+ <2>:80n; <1>:40n; <0>:20n

for test path: <3>:120n; <2>:60n; <1>:140n

property select_vref_lna_h#

lna vcm_h modification:

2’b00 758mV; 2’b01 645mV; 2’b10 599mV; 2’b11 576mV

property select_vref_lna_l#

lna vcm_l modification:

2’b00 341mV; 2’b01 402mV; 2’b10 455mV; 2’b11 493mV

to_json(self: samna.afe2.configuration.LnaConfig) str#
property vcm#

select LNA VCM:

2’b00 493mV; 2’b01 531mV; 2’b10 569mV; 2’b11 606mV

class samna.afe2.configuration.MgmConfig#

Bases: pybind11_object

Master gm configuration.

property bias_select#

80n+

master gm cell bias select:

  • <2>:160n

  • <1>:80n

  • <0>:40n

property enable#

Enable master gm

property enable_bias#

Enable master gm cell bias for bandpass filter

from_json(self: samna.afe2.configuration.MgmConfig, arg0: str) None#
property ibpf_select#

bpf mgm mode Ibias ctrl:

  • MGM_IBPF_SEL<0>:0.25

  • MGM_IBPF_SEL<1>:0.5

  • MGM_IBPF_SEL<2>:1

  • MGM_IBPF_SEL<3>:2

property ifwr_select#

fwr mgm mode Ibias ctrl:

  • MGM_IFWR_SEL<0>:0.25

  • MGM_IFWR_SEL<1>:0.5

  • MGM_IFWR_SEL<2>:1

property mgm_select#

maser gm set:

  • 2’b00=920nS

  • 2’b01=1.37uS

  • 2’b10=1.37uS

  • 2’b11=1.81uS

to_json(self: samna.afe2.configuration.MgmConfig) str#
class samna.afe2.configuration.SqdlConfig#

Bases: pybind11_object

Squlech detector configuration.

property bias_select#

source follwer verf bias select <2-0> 30n+

  • <2>:120n

  • <1>:60n

  • <0>:30n

sd comparator bias select <5-3> 70n+

  • <2>:92n

  • <1>:46n

  • <0>:23n

property enable#

Enable squlech detector

property enable_detector_bias#

Enable squlech detector bias

property enable_detector_counter#

Enable squlech detector counter rst

from_json(self: samna.afe2.configuration.SqdlConfig, arg0: str) None#
property response_time#

sd response time select

to_json(self: samna.afe2.configuration.SqdlConfig) str#
property vth_signal#

Select signal for the Vth of SQD module