Applied Radiation and Isotopes 147 (2019) 129–135
Contents lists available at ScienceDirect
Applied Radiation and Isotopes journal homepage: www.elsevier.com/locate/apradiso
Nuclear pulse generator embedded in FPGA a,∗
T
a,b,c
a,b
Ángel García-Durán , Víctor Martin Hernandez-Davila , Hector Rene Vega-Carrillo , Oscar Osvaldo Ordaz Garciab,c, Claudia Angélica Márquez-Mataa, Sergio Sarmiento-Rosalesa, Guillermo Eduardo Campillo Riveraa, Joel Vázquez-Bañuelosa a
Unidad Académica de Estudios Nucleares de la Universidad Autonomía de Zacatecas, Ciprés 10; Frac. La Peñuela. 98060 Zacatecas, Zac. Mexico Unidad Académica de Ingeniería Eléctrica de la Universidad Autonomía de Zacatecas, Av. López Velarde 801, Col. Centro. 98000 Zacatecas, Zac, Mexico c Departamento de Arquitectura de Computadores Electrónica y Tecnología Electrónica de la UCO, Ctra. N-IVa km. 396. 14071 Cordoba, Spain b
H I GH L IG H T S
Nuclear Pulse Generator embedded into a FPGA was designed, built and evaluated. • An manipulate the amplitude and the period of the pulses generated, a VI was designed. • To • The pulses generated are detected by the spectrometric systems.
A R T I C LE I N FO
A B S T R A C T
Keywords: Multichannel Nuclear pulse generator Zynq Vivado FPGA LabVIEW
This manuscript presents the design and implementation of an intellectual property core, which acts as a generator of nuclear pulses. The design is embedded in a Field programmable gate array. It is capable of forming pulses with an exponential shape such as those from a radiation detector or Gaussian-shaped pulses such as those provided by a spectroscopy amplifier. Its characteristic is that the amplitude and period of these pulses can be configured by the user through a Virtual instrument generated in graphic language through the LabVIEW development platform. This can greatly reduce the volume, cost and energy consumption in relation to commercial analog nuclear electronics pulse generators.
1. Introduction The radioactive decay is random, therefore, the counting of particles and photons is subject to chance, therefore, the response of the electronics used to measure the radiation is evaluated by pulse generators that emulate the radioactive decay. By having a random pulse generator with a known probability distribution function, it is a very useful tool for a large number of experimental laboratory tests and verifications of nuclear spectroscopy systems without having a detector and a radiation source present, to avoid experimental errors and reduce exposure doses. The pulses generated are used to emulate the conditions that occur when a detector is connected to a spectroscopy system and exposed to a radiation source (Arkani et al., 2013; Pechousek et al., 2016; Ponikvar, 2018). The programmable gate arrays (FPGAs) are covering almost all fields of electronics, from medical instruments to low-consumption electronic products (Begum et al., 2015). For the design of nuclear instrumentation, FPGAs and microcontrollers have become key ∗
components. Due to its great flexibility and abundance of available hardware resources allow for customized design and the possibility of implementing the entire system on a chip, called SoC for its acronym in English system on chip (Rahman, 2014; Tsao and Chou, 2008). There are SoC systems that are made up of an FPGA and a microcontroller that are used in digital signal processing and electrical diagnosis. One of the commercial forms of these systems is from the Zynq family of the company Xilinx (Wang et al., 2017). In these systems it combines low power consumption, a small volume and a combination of hardware and software, however, its use in the nuclear sciences is very precarious. Previously, other solutions have been implemented for the generation of nuclear pulses, such as a pulse emulator software programmed in Mathematica® from Wolfram (Pechousek et al., 2016), in addition to a circuit that uses analog electronics (Vegas et al., 2017), using the hardware description to be embedded in development cards. with FPGA technology (Ponikvar, 2018; Ziegler et al., 2012), among others. The solutions mentioned above all have as their main objective is to
Corresponding author. UaEN-UAZ Calle, Ciprés 10, Fracc. La Peñuela 98060 Zacatecas, Zac., Mexico. E-mail address:
[email protected] (Á. García-Durán).
https://doi.org/10.1016/j.apradiso.2019.03.003 Received 19 November 2018; Received in revised form 1 March 2019; Accepted 1 March 2019 Available online 06 March 2019 0969-8043/ © 2019 Elsevier Ltd. All rights reserved.
Applied Radiation and Isotopes 147 (2019) 129–135
Á. García-Durán, et al.
generate or emulate exponential pulses similar to those generated by a radiation detector. The objective of this work is to design and implement a nuclear pulse generator embedded in an FPGA, which can generate exponential and Gaussian pulses with amplitude and variable periods, using one of the most economical development plates of the Zynq SoC family, which is used to control a digital to analog converter with a conversion speed of 2 million samples per second, with this you can reduce the cost and volume in relation to the conventional nuclear pulse generators.
Table 1 Description of the blocks of the nuclear pulse generator in Vivado. Block Name
Block Description
top_Generador rst_processing_system7_0 processing_system7_0 processing_system7_0_axi_periph
IPcore of the Nuclear Pulse Generator Restore the default values Logical connection between the PS and the PL Communicate the peripherals with the PS using the AXI protocol Data that make up the pulse Reading or writing of memory Start of the conversion process
axi_gpio_0 axi_gpio_1 axi_gpio_2
2. Materials and Methods The work is divided into three sections, the part of the design of an intellectual property core (IPcore) to be embedded in the FPGA contained in the Zynq chip that operates as a nuclear pulse generator, the part of programming an application for the ARM processor contained in the Zynq chip that interconnects the software with the hardware and the part of the virtual instrument designed in graphic language in the LabVIEW development tool which manipulates the amplitudes and the periods of the generated pulses.
Table 2 Description of the designed IPcore blocks.
2.1. Design and description of the architecture for the FPGA
Block Name
Block Description
Acoplador_0 Selector_0 Inicio_0 Memoria_0 DAC_0
Adapts the signal coming from software to hardware Select between read or write mode Start the conversion process Stores the data that make up the pulse Converts each of the data that make up the pulse to voltage
to be implemented on the Zybo development board. The main entity of the same consists of 7 blocks as shown in Fig. 1. The named top_Generador was created by the hardware description in VHDL language and the other blocks were provided by the development environment. Table 1 briefly shows the operation of each block.
The Zybo Zynq-7000 SoC Z-7010 development board was used to synthesize the architecture of the project design described in hardware description language (VHDL). The main features of the development board are an XC7Z010 chip which has an FPGA and two central processing units (CPU) architecture ARM Cortex-A9, 28000 LUTs (Look Up Tables), 128 Mb for the serial interface QSPI, peripherals SPI, UART and I2C, Ethernet ports, USB 2.0, HDMI and VGA, 6 Pmod ports, 140 I/O pins, 32 BUFG (global buffers), 240 kB blocks of RAM, 80 digital signal processors (DSPs) among others. As indicated by the manufacturer is low power consumption since it only consumes between 0.2 A and 0.5 A when using the USB port (Digilent, 2017). In addition, we used a digital-analog converter from the Texas Instruments company, this assembly in a peripheral module (Pmod) of Digilent said converter of about 2 MSPS (millions of samples per second), is two parallel sampling channels with one resolution of 12 bits each, with an output operation interval from 0 to VCC which in this case is from 0 to 3.3 V (Digilent, 2016). The design for the nuclear pulse emulator was described in the development software Vivado (2015.4),
2.1.1. IPcore for the nuclear pulse generator The entity top_Generador was developed, with the objective of carrying out the process of a nuclear pulse generator, from the filling of the memory with the values that make up the pulse until the conversion of said values to voltage. The entity is made up of 5 blocks: Acoplador_0, selector_0, inicio_0, memoria_0 and DAC_0, as described in Table 2. It depends on 5 inputs (clk, dato (11: 0), res, el and start1) and delivers 4 outputs (clkp, cs, D1 and D2), all the blocks and their interconnection are observed in Fig. 2. The blocks of this IPcore were elaborated in the VHDL hardware description language in the Vivado development platform, where they were also interconnected and packaged in an IPcore. The Acoplador_0 block was designed to adapt the signal that enables
Fig. 1. Block diagram of the nuclear pulse generator in Vivado. 130
Applied Radiation and Isotopes 147 (2019) 129–135
Á. García-Durán, et al.
Fig. 2. Diagram blocks of the IPcore of the nuclear pulse generator.
Fig. 3. Front panel of the virtual instrument.
2.3. Virtual instrument for the control of the pulse generator
the writing of the memory from the virtual instrument to prevent that signal is active for more than one clock cycle and thus only write the data in a single memory location. The entity Selector_0 aims to select between the mode of writing or reading the memory. The block called inicio_0 was described to start the process of data conversion and synchronize with the controller of the analog digital converter for once a conversion is completed, start the next one. The entity named memoria_0 is a memory RAM in which, if the writing is enabled, the data that will form an exponential or Gaussian pulse will be stored or, once the reading is enabled, all the data will be sent one by one to the controller of the analog digital converter to be converted., in this entity is where the delay of the period established for the pulses is applied. Finally, the entity DAC_0 is responsible for controlling and communicating with the Pmod connected to the digital analog converter, providing the data to convert, a clock that will indicate the working frequency and an activator to start the conversion.
Using the LabVIEW graphical programming platform, the virtual instrument of the nuclear pulse emulator was designed, which is used as an interface for the management and control of the pulses to be generated. This instrument uses the VISA communication protocol, through a USB port that simulates a serial port, thus having communication with the development board. The front panel of the virtual instrument has a friendly interface as can be seen in Fig. 3 where you can manipulate the serial port for the connection with the development board, select between exponential or Gaussian pulses, you can configure the amplitude of the pulses to generate and the period in which said pulses are repeated. 2.4. Evaluation of the performance of the nuclear pulse generator To evaluate the performance of the nuclear pulse generator, several tests were carried out: a KEYSIGHT oscilloscope was used and the linearity was determined. A multi-channel analyzer embedded in an FPGA was used to corroborate that the pulses generated are detected by the spectrometry system.
2.2. Programming the application for the ARM The software application was created in C programming language, through the Software Development Kit (SDK) development platform. The purpose of this is to perform the calculations of the data that make up the nuclear pulse, fill the memory with the calculated data and make the interconnection between the IPcore and the virtual instrument.
3. Results and discussion 3.1. Characterization of the nuclear pulse emulator The system was configured multiple times varying the number of 131
Applied Radiation and Isotopes 147 (2019) 129–135
Á. García-Durán, et al.
Fig. 4. Linearity graph of Exponential pulses.
Fig. 5. Linearity graph of Gaussian pulses.
represented from 0 to 4095 because the Analog digital converter is of a resolution of 12 bits with 4096 possible intervals. Similarly, the result of the Gaussian pulses was a linear response with a correlation coefficient of 0.9998, Fig. 5 shows the data obtained and the calculated data. The relationship between the height of pulses in volts and the amplitude selected for exponential pulses shows that the data obtained is far from the calculated data, however, among the data obtained there is
the amplitude starting with the value 0.07 V and with intervals of 0.4 until reaching 3.3 which is the maximum amplitude, with the objective of establishing the amplitude conditions, this was done for both types of pulses. The result of the exponential pulses was a linear type response with a correlation coefficient of 0.9985, in Fig. 4 it shows the relationship between the calculated data and the obtained data, on the x axis it is 132
Applied Radiation and Isotopes 147 (2019) 129–135
Á. García-Durán, et al.
Fig. 6. Exponential pulses shown in the oscilloscope.
Fig. 7. Gaussian pulses shown in the oscilloscope.
3.2. Display of generated pulses
a linear correlation that is different from that of the calculated data, the probable cause is attributed to the exponential nature of the pulses and the speed limitations of the analog digital converter. On the other hand, as seen in Fig. 5, for Gaussian pulses the height of these in volts as a function of the amplitude coincides with the calculated ones.
The nuclear pulse generator embedded in the FPGA was connected to an oscilloscope of the KEYSIGHT brand, the generator was configured with exponential pulses and with the amplitude of 3.3 V and the period of 0.078 ms, as a result in the oscilloscope the pulses were 133
Applied Radiation and Isotopes 147 (2019) 129–135
Á. García-Durán, et al.
Fig. 8. Pulse height spectra of Exponential pulses produced by the nuclear pulses generator.
Fig. 9. Pulse height spectra of Gaussian pulses produced by the nuclear pulses generator.
3.3. Implementation of the pulses generated in an MCA
formed. in Fig. 6, where the voltage of the pulses and their period are observed. Likewise, the nuclear pulse generator was connected to the same oscilloscope and was configured to generate Gaussian pulses with the maximum amplitude and the minimum period, in Fig. 7 the generated pulses are presented, as well as the frequency of the pulses can be observed. pulses and peak-to-peak voltage. The oscillator of the development board has a maximum frequency of 450 MHz, which allows to generate designs that work at that speed or less, the limits of the frequency to generate the pulse are conditioned by the analog digital converter that works at a maximum frequency of 30 MHz. The time constant of the generated pulses is 0.078 ms, because to make a pulse 146 data are needed and for each data 16 clock cycles are needed. As shown in Fig. 6 the exponential pulses have the typical form of commercial nuclear pulse generators, the only drawback is that the maximum height of the pulses is 2.82 V, when it should be 3.3 V. However, for the user this means a practically insignificant limitation. As seen in Fig. 7, the Gaussian pulses have the typical form of commercial nuclear pulse generators, where the maximum height is practically that of 3.3 V.
To corroborate that the pulses generated by the nuclear pulse generator resemble those obtained from a radiation detector in the case of Gaussian pulses or those obtained from a spectroscopic amplifier in the case of exponential pulses, it was connected to a spectrometric system that contains a multi-channel analyzer embedded in a Zynq SoC, to obtain the spectrum of the generated pulses. As shown in Figs. 8 and 3 different measurements were made at different amplitudes (1.8, 2.4 and 3 V) of the exponential pulses. In the same way, for the case of the Gaussian pulses, the 3 measurements were made with the same 3 amplitudes, the obtained being observed in Fig. 9. 4. Conclusions A nuclear pulses generator has been designed. It produces Gaussian and Exponential pulses where the amplitude and the period can be changed aiming to emulate pulses produced by radiation detectors. In the Gaussian pulses, there is a correlation between the selected amplitude and the pulse height in volts. In the Exponential pulses, also there is a correlation between the 134
Applied Radiation and Isotopes 147 (2019) 129–135
Á. García-Durán, et al.
amplitude and the pulse height; however this linear correlation is different from the linear function of the calculated data, resulting in a decrease, from 3.3 to 2.8 V, in the maximum height of the pulses. For exponential pulses this decrease in amplitude is negligible in the use of the pulse generator in a nuclear measurements laboratory.
FPGA for simulating nuclear counting system. Int. J. Eng. Res. Technol. 4 (05), 434–438. Digilent, 2016. PmodDA2™ reference manual. [online]. https://reference.digilentinc. com/_media/reference/pmod/pmodda2/pmodda2_rm.pdf, Accessed date: 14 September 2018. Digilent, 2017. ZYBO™ FPGA board reference manual. [online]. https://reference. digilentinc.com/_media/reference/programmable-logic/zybo/zybo_rm.pdf, Accessed date: 14 September 2018. Pechousek, J., Konecny, D., Novak, P., Kouril, L., Kohout, P., Celiktas, C., Vujtek, M., 2016. Software emulator of nuclear pulse generation with different pulse shapes and pile-up. Nucl. Instrum. Methods Phys. Res. 828, 81–85. Ponikvar, D., 2018. An FPGA-based nuclear pulse generator with a prescribed amplitude distribution. Nucl. Instrum. Methods Phys. Res. 877, 371–374. Rahman, N., 2014. Stimulus generation technique for code simulation of FPGA based gamma spectroscopy system. Adv. Nucl. Res. Energy Dev. 1584, 77–83. Tsao, P., Chou, H., 2008. Nuclear pulse height measurement using FPGA techniques. In: Nuclear Science Symposium Conference Record NSS'08. 978. IEEE, pp. 2015–2017. Vegas, I., Antoranz, P., Miranda, J.M., Franco, F.J., 2017. Design of a variable width pulse generator feasible for manual or automatic control. Nucl. Instrum. Methods Phys. Res. 841, 109–116. Wang, Y., Kuang, J., Liu, C., Cao, Q., Li, D., 2017. A flexible 32-channel time-to-digital converter implemented in a Xilinx Zynq-7000 field programmable gate array. Nucl. Instrum. Methods Phys. Res. 847, 61–66. Ziegler, F., Beck, D., Brand, H., Hahn, H., Marx, G., Schweikhard, L., 2012. A new pulsepattern generator based on LabVIEW FPGA. Nucl. Instrum. Methods Phys. Res. 679, 1–6.
Acknowledgments Angel García-Durán thanks to CONACyT (Mexico) (CVU 702332) for the scholarship granted to pursue a postgraduate degree. Appendix A. Supplementary data Supplementary data to this article can be found online at https:// doi.org/10.1016/j.apradiso.2019.03.003. References Arkani, M., Khalafi, H., Vosoughi, N., 2013. A flexible multichannel digital random pulse generator based on FPGA. World J. Nucl. Sci. Technol. 3 (04), 109–116. Begum, M., Rahman, M., Mamun, A., Sattar, S., 2015. Generation of Gaussian pulses using
135