Review of Reconfigurable Virtual Instrumentation and It Implementation in Cameroon Labs

: With the exponential evolution of the complexity of reconfigurable logic circuits, the Field Programmable Gate Array (FPGA) becomes an attractive element to realize reconfigurable virtual instruments, due to their inherent flexibility. The simple bus architecture allows us to use pre-exist IP Cores (IP Cores) in VHDL and interconnecting them, also allowed us to reuse code in all designs. Research on reconfigurable virtual instruments has continued to evolve and has become a real alternative for many research laboratories in developing countries such as Cameroon. In this paper, we present a review of the FPGA-Based Reconfigurable Virtual instrumentation and the experimental tools developed in our labs. The development of experimental sciences and engineering benefits from the ability to obtain reliable data from controlled situations and process as measurements and comparisons. This achievement invokes two parallel approaches: software development and hardware development. This has been demonstrated in our context with the implementation of a virtual oscilloscope. Indeed, with the processing of reconfigurable technological circuit, designing virtual instruments with multiple shapes is henceforth feasible. The advantages offered by this innovation are essentially the reduction of development times, the optimization of resources and the reduction of costs. Given the need for these instruments in research laboratories, their lack in universities in our countries poses a real problem. Fortunately, in recent years, research and technological innovation have largely developed to offer reconfigurable solutions in instrumentation based on SoCs. The oscilloscope described in this article can communicate directly with a PC, using a USB serial port that allows communication between the instruments and the PC.


Introduction
Electronic and scientific instruments are indispensable in all scientific research institutes and technical establishments. These instruments evolve, improve and adapt to the needs of users. At the same time, their costs increase according to their precision and performance. Often, the user tends to equip himself with a device that provides functionality and performance beyond what is necessary for his current studies in anticipation of his future needs. He prefers to make sure that the instrument he chooses offers the functionalities and tools that will be adapted to his future applications. Researchers have therefore worked to develop complex reconfigurable hardware to simulate any specific instrument, that is to say, in a way, a versatile instrument that can be configured into any instrument. In this evolution, the transition from classic instrumentation, defined by a front panel interface supervised by the user to the new instrumentation, carried out around specialized equipment and which provides interactive software interfaces which allows a real interaction between the operator and the general-purpose computer (GPC) [15,17]. The term virtual instrumentation (VI) is used to denote systems generally using a modular hardware stage to process or generate signals, and a general-purpose computer to provide the instrument with a reprogrammable software interface [1]. With the exponential increment of the complexity of the reconfigurable logic devices, the Field Programmable Gate Array (FPGA) becomes an interesting element for build reconfigurable virtual instruments, because of the inherent flexibility. Section 2 presents an overview of reconfurable virtual instrumentation based on FPGA / SoCs, in section 3 we presents the design of our FPGA-based RVI tools used. Section 4 presents the results obtained using the Xilinx Zynq 7000 FPGA with Vivado 2019.1 and finally section 5 gives the conclusion with development axes for optimal use in the laboratories of the Universities of Cameroon.

Overview of Reconfigurable Instruments
The idea of a virtual instrument is not new, but it is only recently that this solution has gained the attention it deserves from scientists thanks to the considerable evolution of programmable logic circuits (ASIC and FPGA in particular) and the specification of advanced description languages (VHDL, Verilog) [10,6,5]. This solution is in fact very interesting for designing not only measuring instrumentation but almost all scientific instrumentation used in very varied fields: in medicine, in biology, in aeronautics. These main advantages are the possibility of developing instrumentation and reducing the development and production costs of the instrumentation system.
Virtual instrumentation is presented as an option to overcome the lack of measuring instruments in laboratories in developing countries. It is inexpensive and easy to deploy. its flexibility makes it possible to have several functions in a single device. Gradually, interfaces allowing communication between the instrument and the computer were introduced [12]. Computers originally used as stand-alone instruments have seen their features and performance increase exponentially, and their increasing speed has facilitated complex real-time measurements. Notwithstanding the high performance of the new generations of computers, their use in instrumentation experiments was not easy. Almost all of the first instrument control programs were written in BASIC and this use of BASIC as the programming language is easily explained by the fact that it was the most widely used language at the moment. This also represents a constraint because to use the instrument, the engineer or the user had to know how to program. Therefore, an important milestone in the history of virtual instrumentation happened in 1986, when "National Instruments" introduced "LabVIEW 1.0" on a PC (Personal Computer) platform [5].
LabVIEW, one of the first virtual instrumentation platforms introduced the concept of graphical user interface and visual instrumentation programming. This innovation in addition to its simplicity of operation has excellent computing capabilities. The PC computer is today the platform par excellence for most measurements and the user interface has made instrumentation simpler. Virtual instrumentation has therefore effectively contributed to lowering instrument prices for the benefit of low-resource users [4].
In 2001, ICTP developed a virtual instrumentation platform in their Peru laboratory. This first generation of card consisted of the central element which is an FPGA from Xilinx Virtex 100, the first FPGA with embedded RAM and DLL. Two parallel ports, one of which was used to configure the FPGA and the other to communicate with the FPGA thus configured. There were also two serial ports for general use and finally an integrated Analog to Digital converter. Five years later, in 2006, a more specific and improved version of this platform called ICTP RVI platform was developed. Among the improvements observed on it, we can see the card connectors for the connection of external modules These two expansion cards stand out for their low performance characteristics for one and high performance for the other. This stipulates that for low performance and high performance expansion cards will have to be connected respectively to the outputs of these two cards. The characteristics of the analog to digital and digital to analog converters associated with the different expansion cards are respectively: ADC: dual channel, 10 bits, 20 MSPS and 14 bits, 125 MSPS DAC: dual channel, 14 bits, 1 MSPS and 16 bits, 50 MSPS In 2018, Gazzano et al have use FPGA with Embedded software-core and digital processor cores to realize a hardware kernel for measurements instruments, which can fit common electronics measurement and test requirements [8]. The approach was called Software-defined instrumentation (SDI). In this work, hardware kernel was used to implement an n-channels arbitrary waveform generator with various add-on functions, a wideband and precise network analyzer, a high-speed signal digitizer, and a real-time sweep spectrum analyzer [15]. With adaptively reconfiguring the hardware kernel, SDI concept responded to the rapidly changing user-application-specified needs in measurement and test It Implementation in Cameroon Labs markets. The FPGA use was Xilinx Spartan II XC2S200PQ208 which affords on-chip through single-port blocked synchronous RAM. The total available memory size was 56 kbit. The FPGA chip were configured into four main parts: hand-shaking controller between USB and FPGA, SRAM (block RAM), SRAM controller, and remaining control logic. The SRAM is utilized for both built-in and downloadable lookup tables. The built in lookup table can also be reserved for specified waveforms output directly or built-in self-test purpose for the instrument itself. Together with n DACs, we can reconfigure the SRAM capacity into n parts for n-channel analog signal outputs. They have up to 56 channel outputs using 1 kbit per channel [13].
A new plateform built around a reconfigurable coprocessor, intended for the design of virtual instruments has been described in [14]. This coprocessor uses FPGA technology for data processing and a USB serial bus for interfacing with the computer. This system is characterized by low complexity, low cost of hardware components and versatility of the coprocessor thanks to the reconfigurable and dynamic nature of the FPGA. The platform proposed in this work also offered expansion cards including suitable peripherals for signal shaping and conversion.
The possibility of using virtual instrumentation in the development of two physiological parameters monitoring system was investigate, in order to assess a cardiovascular parameter, the Pulse Wave Velocity in 2018 [9]. The authors choose to monitor this parameter due to major incidence and impact of cardiovascular diseases. They created a mobile medical device that perform long term PWV measurements

Design of a FPGA-Based Virtual Instrument
A Reconfigurable Instrument is a flexible device configurable into electronic instrument using a software tool. Reconfigurable Virtual Instrumentation (RVI) is a hardware and software system that is used to emulate the reconfigurable instrument using a virtual console and graphical interface. This graphical interface allows the settings and controls of the hardware through the software console as for a real instrument. We have used a modular approach which allows an independent evolution of hardware and software architectures, through the reuse of the developed components [7].
Our RVI system includes hardware and software subsystems. The architectural design approach adopted for the implementation of reconfigurable virtual instrumentation is the use of development boards combining processors integrating programmable systems-on-chip and FPGAs in the same physical device. The main function of the general-purpose communication block is to allow the separation of activities performed in the microprocessor and the FPGA [11]. The two parties interact using simple logic protocols by reading and writing data to the common memory resources of the communication block. With the proposed strategy, the porting of embedded software and associated FPGA designs between different families of devices and suppliers is facilitated [3]. It remains to propose a structured methodology for managing complex real-time systems built around these circuits on chip (SoCs). We have proposed in this part a concrete communication block successfully implemented in our context and used for a fast implementation of an oscilloscope based on a Xilinx Zynq-7000 (Zedboard) FPGA board. The hardware system consists of a PC and the reconfigurable instrument physically connected to the PC via a port (serial port, parallel port, USB, Ethernet, etc.). This connection allows the reconfiguration of the reconfigurable instrument as well as the exchange of information between the PC and the reconfigurable instrument. This information can be data, commands, error messages or acknowledgments of receipt. The interactions between the different components of the RVI system are shown in Figure 2.  [17,8].

Reconfigurable Virtual Oscilloscope
An oscilloscope is basically a device for displaying curves. It draws the curve of an electrical signal. In most applications, the curve represents the variation of one or more electrical voltages over time, but it can also display the variation of one electrical signal versus another allowing the two signals to be compared. In general, oscilloscopes can pick up electrical signals ranging from a few millivolts to a few hundred volts and having frequencies up to a few megahertz for analog oscilloscopes [2]. This high frequency order is however difficult to achieve for digital oscilloscopes because of the excessive volumes of data to be processed. Indeed the sampling rate must be greater than twice the maximum frequency according to Shannon's theorem, but the speed of the computer ports is only limited. As we are going to interface the hardware with the USB whose maximum speed is 480 Mbps, according to the calculations, the oscilloscope will be able to pick up signals with frequencies up to 100 KHz. The FPGA used in this project is a Zynq 7000 with very high performance and the software environnement is Vivado 2019.1. The block diagram of the system is shown by the Figure 4 Bellow.

Vivado Oscilloscope's Blocks Design
This part of the design is the most important and responsible for sampling the input signal, triggering on a waveform event, and making the data available to the processor (PS) when complete.

Figure 5. Oscilloscope's Vivado block design part.
The oscilloscope software system offered is divided into several modules each doing a specific processing: The display screen is used to display the curve corresponding to the measured signals. This form depends on both the signals and the display parameters. The display parameters are used to vary the scales of the axes, the offsets on the display frame. These parameters are processed by the software to modify the scales and positions of the display. They do not need to be sent to the reconfigurable instrument [6]. Finally, the instrument controllers are the set of commands for controlling the measurements and are processed by the reconfigurable instrument. Thus these parameters are sent to the reconfigurable instrument and the latter reacts instantly. This oscilloscope was designed to meet some basic performances: Uses a standard 10: 1 scope probe, input voltage range of -10 V to +10 V, Bandwidth = 100 kHz VGA monitor display, resolution ~1280 x 720, User Input through rotary encode This oscilloscope is made up of several key blocks such as: a. Analog Front End: Attenuate and level shift input signals to a level usable by the Zynq's built in ADC. Implemented with several op amp filters/amplifiers. b. ADC Buffer / Trigger: Values sampled by the ADC are continuously sampled to a buffer. When the trigger event occurs, the buffer fills up, and signals that it is now full and ready to be read in. c. User Input Processing: User input for this oscilloscope is taken in in the form of rotary encoder and button signals. The encoder signals must be processed to give useful rotational data, and both this data and the button data must be sent into the processing unit. d. Processing System: User input and ADC buffer data are processed and values are written to the video driver to generate the graphical user interface (GUI). e. Video Driver: A frame buffer (memory holding values of each screen pixel) is written to by the processing system. A VGA driver generates the timing signals required by the VGA protocol, as well as reading values from the frame buffer to be sent to the screen.

Results
The data acquisition module generates the corresponding signals to control the analog-to-digital converter (ADC), the data is stored in the memory of the FPGA board then conditioned to be sent to the PC in frames through serial communication port USB. This instrument is use to plot the characteristic current / voltage curve and makes it possible to extract the characteristic quantities of the components electronic components such as transistors, diodes, capacitors, triacs... The FPGA implements a system which can generate different levels of voltage, where these levels are provided by the software on the PC. The current values are saved and then sent to the graphical user interface of the PC (Figure 6).

Conclusions
FPGA circuit technology gives a new alternative in the field of scientific instrumentation. Despite the concept of reconfigurable virtual instrumentation is not new, it is only recently that we have achieved the alternative of implementing an FPGA-Based RVI system technology in our laboratory. However, the counterpart for such a system is the effort required to develop the software / hardware system for a new instrument. We have shown through the description of the architecture of an RVI how FPGAs can be used to reproduce scientific instrumentation. The oscilloscope is an example that we have chosen since these instruments are among the most used and are indispensable in various fields of application. To interface the reconfigurable instrument, we chose the USB solution. The speed offered by this bus is sufficient for current applications but for high frequencies, it is necessary to use the PCI bus, which the speed is much higher. Thanks to an RVI platform, it is possible to imitate many standard instruments but also possible to implement sophisticated instrumentation for specific uses which remains impossible or difficult by standard instruments. An RVI platform represents a low cost solution for those who cannot afford high cost scientific instrumentation, which often happens in Cameroon's universities and research institutes. Finally, within the specific framework of the teaching of engineering sciences, this Virtual Instrumentation makes it possible to develop the educational approach with tools and methods widely distributed in industry.