Professional Documents
Culture Documents
Design and Development of Fpga Based Digital TTL Trigger Generator For Iuac-Dls PDF
Design and Development of Fpga Based Digital TTL Trigger Generator For Iuac-Dls PDF
t
freq_val
RESET Counter 2 pre_gate T Gate pulse sync with fs
ENA
t
Nx Counted pulses in fx
Ns Counted pulses in fs
Vcc = 3V3
R B0 t
Pulse Gen. CH 0
R Pulse Gen. CH 1
B1 Counter (b)
ENA
Counter Pulse Gen. CH 2
R B2 ENA =5V
Pulse Gen. RL = 1 MΩ
Counter CH 3 5V 5V
ENA
R B3 Counter
GND ENA 0V 0V
74128
1×4 width 0 Delay Generator
SE0 DeMux width 1 RL
BC337
Encoder width 2
Read 2.5 V
width 3 4-Channels 3.3 V
0V
WIDTH, DELAY, FREQUENCY RL = 50 Ω
1×4 0V
DeMux delay 1
SE1
(c) (d)
20 × 4 LCD
Encoder delay 2
Read ASCII Code Binary-to-BCD
delay 3
Converter Converter
SE2 Encoder Frequency
Read
(a) (e)
Figure 2: Complete Logic diagram of Trigger Generator (a), Equal Precision Frequency Measurement (b), 50Ω driver
circuit (c), Finished PCB design (d), Front Panel of 2U×19” box with LCD, buttons, encoders and BNC Output
connectors (e).
channel A always leads channel B in case of forward
De-Multiplexing and Interfacing of Encoders movement or clockwise movement thereby counting in
In order to accept user’s input setting for pulse positive direction whereas, upon anti-clockwise
frequency in Hz, pulse width in μs, and pulse delay in μs, movement channel B pulses lead channel A.
three knobs are provided on the front panel of the Trigger
Generator assembly as per Fig 2(e). These knobs are used Logic implementation of Delay, Width, Period
for all the channels in 1-to-4 de-multiplexed fashion. The Each event in time domain is counted with respect to
selection of width and delay for each channel is achieved the EXT reference signal. For an EXT reference signal of
by reading the state all the 4 push buttons mounted on the typically 10 MHz, in order to produce 10 Hz repetition
front panel. Mutual exclusion is maintained among rate, the counter needs to count 10 MHz/ 10 Hz i.e. 10 6
selection of any one of all the buttons at a particular pulses. It is simply implemented by a comparator and a
instant of time. A RESET button is also provided to zero counter.
all existing settings.
The knobs are mechanical shaft encoders fed with 5V Logic implementation of Pulse Generation
supply, which upon rotary movement of the shaft produce For every rising edge of the EXT Reference Signal, a
quadrature pulses in 2 channels which can then be easily tick is counted in the pulse logic implementation. A
counted inside the VHDL code. Since encoders with counter counts this event and checks it first with the delay
mechanical sensors require switch debouncing, a noise value set for the particular channel from the respective
filter is used to avoid false pulsing and decoding as shown knob. Once counter reaches the delay count value, the
in Fig. 2(a). The pulses received from the encoder in corresponding channel output is put logic ‘1’ or ‘High’
i.e. set to 3.3V. It remains as high until the counter value ps. Sub-microsecond time adjustments are easily possible
reaches the point of (delay + width) count from with error of around 30 ns due to fall time limitation from
beginning. After that channel output voltage is pulled to BC337.
logic ‘0’ or ‘Low’. The cycle is repeated after count
corresponding to Frequency is met.
50Ω - 1MΩ Driving circuit
As most of the devices offer 50 Ω termination or load
which leads to increased current requirements. This
current cannot be provided by the normal GPIO pins of
the FPGA which are rated for around 20 mA current
(a) (b)
source. In order to facilitate driving a 50 Ω termination,
an additional circuitry has been added. Here, a simple Figure 3: Outputs at 50Ω load. TB = 1μs, 2V/div (a), at 1
inverting amplifier circuit is built around BC337 (NPN MΩ load. TB = 2μs, 5V/div (b)
transistor) which can offer high collector current of the
order of 800 mA (DC), high bandwidth of ~ 210 MHz
followed by a TTL IC 74128 (Quad 2-Input NOR 50 Ω
line driver) as shown in Fig. 2 (c). Outputs are thus rated
as 5V/1MΩ and 2.5V/50Ω.
Complete Circuit Assembly and PCB
The design is based around Altera’s Cyclone V-SoC
FPGA board whose GPIO pins are read into main PCB
through two 40-pin FRC cables as shown in Fig. 2(d). All (a) (b)
the buttons, shaft encoder knobs and LCD are controlled
by GPIO pins of FPGA and mounted on the front panel of Figure 4: Rise Time (a), Fall-time Jitter (b) measurements
a 2U×19” rack-mountable box as shown in Fig. 2(e). 3.3V
EXT reference signal and the 4-channel pulse output CONCLUSION
signals are also read into and taken from GPIO pins. The This Trigger Generator with achieved time related
4-channel output signals drive the base of four BC337 parameters like rise time, jitter etc. are found tolerable for
transistors which are wired up in common emitter present requirement and is tested during conditioning
configuration and resulting into inverse pulse voltage process of RF system. In future it is planned to be used in
output. Each of the inverse output of transistor circuit is the operation of high power RF system of DLS with
next fed to inputs of quad 2-input NOR gate IC 74128 variable pulse delay, width and rep. rate. Remote control
which acts as 50 Ω line driver. of device will be helpful during that phase.
Remote Control
32-bit Lightweight HPS-FPGA bridge is used for ACKNOWLEDGEMENTS
Cyclone V HPS to communicate with FPGA via Avalon Authors would like to thank Dr. K. Singh for
AXI bus [5]. A Qsys model of system is developed where suggesting the technique for this development and Dr. S.
all the delay, width and frequency parameters are Ghosh for providing opportunity to work on the project.
modelled as PIOs/32 bit registers and memory mapped to Support from Prof. A.C. Pandey, Director, IUAC is also
variables in VHDL code running under FPGA fabric. A well appreciated.
Remote ON/OFF button state is used to switch between
local and remote control. All the variables are written REFERENCES
using a C program stored in the ARM Cortex 9 HPS and
[1] B.K. Sahu et al., Proceedings of InPAC 2019.
used to communicate between HPS and FPGA.
[2] A.Sharma et al., Technical Report, IUAC/TR/AS/
Ref-22/2018-19.
RESULTS AND DISCUSSIONS [3] S.Ghosh et al., NIM-B, 402(2017)358-36356.
The system has been tested with High Power RF [4] Y.Y. Fang et al., SciRes, 4(2012), 696-700.
system in the configuration shown in Fig. 1 and its [5] Cyclone V HPS Technical Reference Manual, http
performance was found to be satisfactory. All trigger s://www.intel.com/content/dam/www/programmable/
requirements were 50Ω, TTL. Figures below shows the us/en/pdfs/literature/hb/cyclone-v/cv_54005.pdf
actual outputs of trigger generator captured on a 200 MHz
DSO, with 10 MHz EXT reference. Outputs with 50Ω
load are cleaner in comparison to 1MΩ where ringing can
be seen. Rise time of 18 ns is achieved while falling edge
jitter is found to be ~24 ns and rising edge jitter is ~500