




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































This is to certify that that the work contained in the thesis titled " A library of IP Cores for FPGA based Motion Control using Floating Point Arithmetic" by Ruchi Srivastava (Y8104054) has been carried out under my supervision and this work has not been submitted elsewhere for any degree.
Professor^ (Dr.S~hi)^ 113/6/;-
Department of Electrical Engineering Indian Institute of Technology Kanpur, India
lIT Kanpur June, 2010
Abstract
Programmable Logic Devices such as Field Programmable Gate Arrays (FPGAs) are being considered by increasing number of designers in various fields of application such as telecommunication, video, signal processing and motor control systems. FPGAs have the potential of enabling both software as well as hardware customization as per design needs. They are re-configurable in nature; improve control system performance by supporting faster execution rates and offer reliability of a dedicated hardware circuitry.
The concept of ‗IP cores‘ and re-usable designs can considerably reduce the development time, effort and cost. Leading FPGA vendors are offering IP cores in parameterized form which is not editable as the HDL code is usually not available. Whereas multiple IP libraries are available related to applications like signal processing, telecommunication and industrial bus interfaces etc. but a library specifically developed to cater to the need of motion control applications is not available.
The present work attempts to fill this gap. The focus is on developing a library of IP cores, written in editable HDL format, for essential basic elements of motion control system. The cores use floating point arithmetic for greater precision and accuracy which becomes important when precise control or precise positioning of poles/zeros is required. The floating point operators are also written in HDL format to make the cores portable across different platforms, technologies and foundries. The standard IEEE binary single precision floating point format is followed and the standard VHDL language is used to describe the code.
The design was carried out using Xilinx ISE Design Suite 11.3 and synthesized using XST synthesis tool offered by Xilinx. Behavioral simulations were carried out using ModelSim SE-64 6.4b and algorithms were evaluated using MATLAB R2008a. Finally, the design was validated on Spartan-3E FPGA (xc3s500e-4fg320) using Spatan-3E starter hardware kit.
Abbreviations
ASIC Application Specific Integrated Circuit Bi-quad Bi-quadratic BPF Band Pass Filter BRF Band Reject Filter CAD Computer Aid Design CLB Configurable Logic Block DAC Digital to Analog Converter DE Difference Equation DSP Digital Signal Processor FFT Fast Fourier Transform FIR Finite Impulse Response FP Floating Point FP format Single Precision Binary FP format as per IEEE 754 (2008) Standard FPGA Field Programmable Gate Array HDL Hardware Description Language HPF High Pass Filter IIR Infinite Impulse Response I/O Input/Output IOB Input Output Block IP Intellectual Property LPF Low Pass Filter LSB Least Significant Bit LUT Look Up Table LVDT Linear Variable Differential Transducer MSB Most Significand Bit MULT Multiplier NaN Not a Number NR Newton Raphson PAR Place And Route PD Proportional and Derivative PI Proportional and Integral PID Proportional Integral and Derivative PLD Programmable Logic Device
Chapter-
Introduction
1.1 Motivation
For years, industrial motor control applications used general-purpose electronic devices such as microcontrollers (MCUs) and DSPs. These devices are designed with fixed hardware, leaving software as the only method for designers to update designs. Such systems do not support any kind of hardware re-programming once the design is frozen. Programmable Logic Devices (PLDs) such as Field Programmable Gate Array (FPGA) can solve this problem by enabling both software and hardware customization as per the design needs. The term ―field programmable‖ means re-configuring the hardware for specific applications even after the product has been installed in the field. In addition to making design reconfigurable, FPGAs also improve the system performance and reliability.
FPGAs use dedicated hardware for processing logic and do not have an operating system. When a control application for an FPGA device is compiled, the result is a highly optimized silicon implementation that provides true parallel processing with the performance and reliability benefits of dedicated hardware circuitry. Since there is no operating system on the FPGA, the code is implemented in a way that ensures maximum performance and reliability.
In general, the speed of the control system impacts its performance, stability, robustness and disturbance rejection characteristics. Faster control systems are typically more stable, easier to tune, and less susceptible to changing conditions and disturbances. FPGA based implementation offers inherent parallelism of hardware which helps in achieving deterministic closed loop control at extremely fast loop rates in contrast to typical processor based designs which are slower due to their sequential nature.
Motion control systems often need precise control of certain variables or precise positioning of poles and zeros to achieve certain functionality. This makes the choice of arithmetic (either
fixed or floating point) very important before implementing the design. Fixed point arithmetic though easier to use, suffers with limited precision and limited dynamic range of data, therefore causing loss of precision. Floating point arithmetic involves exponents to represent the numbers and therefore supports greater dynamic range of data. Since, the data representation in floating point format is more exact, it ensures greater accuracy.
Implementation of floating point arithmetic is possible in FPGAs as their highly programmable and flexible nature does not bind them with any specific kind of arithmetic unlike some micro processors or DSPs which may or may not support floating point arithmetic.
In addition to re-programmability, FPGAs also support design re-usability which is a common feature of software programs. The concept of re-using pre-developed, fully tested unit of logic, commonly known as ‗Intellectual Property (IP) core‘, helps in rapid proto- typing. This in turn helps in cutting down the development cost, efforts and time.
The IP cores can reduce the development cost only when written using a standard hardware description language (HDL) such as VERILOG or VHDL and are available in soft form, which means the behavioral description of the core is available in HDL form and can be edited if required. The leading FPGA vendors like Xilinx or Altera provide IP cores in parameterized form which involves structural description of the core and allows only the parameters of the design to be changed before synthesis, but the HDL is usually not available. Such cores allow certain flexibility, but prohibit the use of the core with other FPGA vendors or ASIC foundries. This hampers the design portability, flexibility and cost effectiveness.
A review conducted by Dubey et.al.[1] and Monmasson et.al.[2] gives insight about the increasing use of PLDs in motion control. The idea of IP cores for motion control was mooted by Pimentel and Le-Huy [3], [4] and some commercial organizations [5] are now marketing motion-control specific cores, but none of them address the need of floating point arithmetic.
Refer Appendix-A which describes about IP cores in detail.
1.4 Basic Information
This section provides some basic information regarding FPGAs, HDL, floating point format and basic elements of a closed loop motion control system.
1.4.1 FPGA 1
Field Programmable Gate Arrays (FPGAs) belong to the wide family of programmable logic components. FPGAs can be defined as a matrix of configurable logic blocks (combinatorial and/or sequential), linked to each other by an interconnection network that is also entirely reprogrammable. Memory cells control the logic blocks as well as the connections so that the component can fulfill the required application specifications. Several configurable technologies exist. Among these, only those which are reprogrammable (Flash EPROM, SRAM) are of interest since they allow the same flexibility of a microprocessor. The generic architecture of this type of FPGA is presented in Fig. 1.
Fig. 1.1: Generic architecture of an FPGA [7]
(^1) Refer [7],[8]
This architecture is composed of a matrix of configurable logic blocks (CLBs), which is bordered by a ring of configurable input/output blocks (IOBs). Finally, all these resources communicate among themselves through a programmable interconnection network.
Some of the basic components in an FPGA are described below [8].
a) Configurable Logic Block (CLBs)
The CLB is the basic logic unit in an FPGA. Exact numbers and features vary from device to device, but every CLB consists of a configurable switch matrix with 4 or 6 inputs, some selection circuitry (MUX, etc.), and flip-flops. The switch matrix is highly flexible and can be configured to handle combinatorial logic, shift registers or RAM.
b) Interconnect
While the CLB provides the logic capability, flexible interconnect routing routes the signals between CLBs and to and from I/Os. Routing comes in several flavors, from that designed to interconnect between CLBs to fast horizontal and vertical long lines spanning the device to global low-skew routing for clocking and other global signals. The design software makes the interconnect routing task hidden to the user unless specified otherwise, thus significantly reducing design complexity.
c) Input/output Blocks (IOBs)
The Input /Output Block (IOB) provides a programmable, unidirectional or bidirectional interface between a package pin and the FPGA‘s internal logic. Each IOB supports bidirectional data flow plus 3-state operation. Today‘s FPGAs provide support for dozens of I/O standards thus providing the ideal interface bridge within a system. I/O in FPGAs is grouped in banks with each bank independently able to support different I/O standards.
1.4.2 VHDL^2
VHDL stands for V HSIC H ardware D escription L anguage. VHSIC is itself an abbreviation for Very High Speed Integrated Circuits. It is the original and first HDL to be standardized by
(^2) Refer [9], [10]
technology, which may not be known at the time of synthesis, or the temperature and process variations, which vary continuously.)
b) Design Flow 4
As mentioned above, one of the major utilities of VHDL is that it allows the synthesis of a circuit or system in a programmable device or in an ASIC. The steps followed during such a project are summarized in Fig. 1.2. The design is started by writing the VHDL code, which is saved in a file with the extension ‗ .vhd ‘ and the same name as its ENTITY‘s name. The first step in the synthesis process is compilation. Compilation is the conversion of the high-level VHDL language, which describes the circuit at the Register Transfer Level (RTL), into a net- list at the gate level. The second step is optimization, which is performed on the gate-level net-list for speed or for area. At this stage, the design can be simulated. Finally, a place-and- route (fitter) software will generate the physical layout for a PLD/FPGA chip or will generate the masks for an ASIC.
(^4) Refer [9]
Fig. 1.2 : Summary of VHDL Design Flow [9]
1.4.3 Motion Control System
Motion control (also referred to as servo control) is used in industrial processes to move a specific load in a controlled fashion. Definitions of motion control vary widely depending on the application. Motion control can refer to simple on-off control or a sequencing of events, controlling the speed of motor, moving objects from one point to another, or precisely constraining the speed, acceleration and position of a system throughout a move.
As shown in Fig. 1.3, in their simplest form electronic closed loop motion control systems consist of a controller, a motor, an amplifier to drive the motor and a sensor that monitors motion. [11]