DIY Auto-Correlator 1.0
Auto-Correlator Card implementation using Teensy 4.x microcontrollers.
global.hpp
Go to the documentation of this file.
1#include "./../code/software/multi_tau.hpp"
2#include "./../code/software/histogram.hpp"
3
4#include "./../code/hardware/pit.hpp"
5#include "./../code/hardware/qtmr1.hpp"
6#include "./../code/hardware/interarrival.hpp"
7#include "./../code/hardware/perf_counter.hpp"
8
9
10
11//#ifdef FEATURE_BRANCH1_GATECOUNTING
12// The template parameters are defined in the build system
14
15#if ENABLE_COUNT_RATE == 1
16 extern RTCoarseGrainer count_rate_mon;
17#endif
18
19#if ENABLE_PC_HISTOGRAM == 1
21#endif
22
23//Hardware Resource
25extern TMR1Controller TTL_c;
26
27
28
29//Global volatile variables
30extern volatile counter_t Counter_val;
31extern volatile bool Update_flag;
32extern volatile unsigned int Update_count;
33
34//Time Values
35extern uint32_t SerialOut_After;
36extern const double Gate_time_us;
37extern const double Allowed_period_error_us;
38extern const int32_t sync_code;
39
40extern float array[CHANNEL_SIZE];
41
42//Performance Counters
43#if ENABLE_PERFORMANCE_COUNTERS == 1
44 extern PerfCounter ACFpf;
45 extern PerfCounter Serialpf;
46#endif
47
48//#endif Feature Branch
49//extern InterArrivalTime<uint16_t, uint32_t> IATimer(&IMXRT_TMR1.CH[0].CNTR); //!< Interarrival Counter
50//#ifdef FEATURE_BRANCH2_TIGHTPOLLING
51
52
53//#endif
MultiTau Auto-Correlator object that is composed of multiple linear - autocorrelators....
Definition: multi_tau.hpp:22
Photon Counting Histogram module for Real time calculation on Teensy 4.1 microcontrollers.
Definition: histogram.hpp:23
Interface for PIT timers on Teensy 4.x microcontrollers.
Definition: pit.hpp:8
Performance Counter class for teensy 4.1 microcontrollers.
Definition: perf_counter.hpp:13
An object that can accumulate data into a fixed size bin before changing its output value.
Definition: monitor_channel.hpp:108
Templated interface for Quad Timer 1 channels for Gate Counting. The module uses the macro _TMR1_CONT...
Definition: qtmr1.hpp:8
const double Gate_time_us
Serial output is done after these many updates (default → overriden in the setup function).
Definition: global.cpp:29
TMR1Controller TTL_c
TTL_c Resource.
Definition: global.cpp:19
uint32_t SerialOut_After
Definition: global.cpp:28
const int32_t sync_code
Gate time precision error due to finite precision of timers.
Definition: global.cpp:31
float array[CHANNEL_SIZE]
Definition: global.cpp:33
MultiTauACorrRTTeensy< LIN_CORRS, SERIES_SIZE, BIN_RATIO > multitau
Definition: global.cpp:6
const double Allowed_period_error_us
The gate time of TTL_C in microseconds (us)
Definition: global.cpp:30
volatile unsigned int Update_count
Stores the number of updates made on the correlator channels since the last serialout.
Definition: global.cpp:25
PITController< PIT_CHANNEL_IN_USE > PI_t
PI_t Resource.
Definition: global.cpp:18
volatile bool Update_flag
Indicates if a new value has arrived from the counting module.
Definition: global.cpp:24
volatile counter_t Counter_val
Stores the value read from the counter.
Definition: global.cpp:23
uint32_t counter_t
Data type received from the pulse counter. It is the fundamental type used for representing series da...
Definition: types.hpp:7