Dynamically Reconfiguring of the Field Programmable Analogue Array AN221E04 Kerstin Eckstein, Peter Möhringer Faculty of Electrical Engineering University of Applied Sciences Fachhochschule Würzburg - Schweinfurt D-97421 Schweinfurt, Ignaz-Schön-Str. 11 kerstin.eckstein@gmx.de pmoehrin@fh-sw.de ABSTRACT The intention of this paper is to give a short description of the dynamically reconfiguring procedure for a Field Programmable Analogue Array (FPAA) AN221E04 by means of a tested example. [1] I. INTRODUCTION Fig. 1: Block circuit of an AN221E04 [6] B. Switched Capacitor Technique Digital processing of analogue signals like temperature, pressure, distance, etc. often demand preprocessing by analogue circuits. But analogue circuits in common have a strong lack in precision and flexibility. The design, even if done by CAD, in many cases yields poor performance and long alignment procedures. Even, the need for a redesign can be the disappointing result. Flexibility can be gained only for a few simple parameters and adaptive system matching is more or less impossible. But in between, the Field Programmable Analogue Array (FPAA) technology helps to avoid these annoying experiences and opens a new variety in applications. [2,3,4,6] Following Ohm’s law, the current in resistor R of the circuit on the left is: II. TECHNICAL BASES The circuit on the right hand side shows the principle of the switched capacitor (SC) technique. Voltages U1 and U2 are alternating connected to the capacitor C by the switch. A. Technical Bases of FPAAs Field Programmable Analogue Arrays (FPAAs) are based on configurable analogue blocks (CAB) consisting of operational amplifiers, passive elements and a programmable connecting network. The tolerances of the tested time discrete system, using switched capacitor technique to implement the desired analogue functions, only depend on the ratios of capacitors. So, tolerances down to 0.1% are achieved easily. CABs can be combined to configurable analogue modules (CAMs). CAMs are highly qualified circuits such as filters, integrators, amplifiers etc. The configuration of the CAMs is provided in a library by the producer. Fig. 1 shows the block circuit of the tested FPAA, the Anadigm AN221E04. IR = U1 − U 2 R (1) Fig. 2: Comparison between resistor and switched capacitors [2,4] Q = C ⋅U c I = ∆Q T (2) (3) Using (2) and (3) we determine the transported amount of capacitor charges within a clock period. See (4). ∆Q = C ⋅ (U1 − U 2 ) (4) In case voltages U1 and U2 nearly stay constant within a clock period, the average current Ī can be made equal to the current in R if R is chosen after (7). See also (5), (6). III. STATIC CONFIGURATION The programming process is as follows: Example “FilterBiquad” IR = I (5) U1 − U 2 ∆Q = R T (6) T 1 = C fc ⋅ C (7) R= ● Go to the provided library (Edit | Insert new CAM or use button lib) to open the The performance of the CAM is defined either by the capacitor C or the clock frequency fc. [5] C. AN221D04 Evaluation Board The tested FPAA is integrated on an evaluation board providing two in- and outputs and a serial RS 232 link. The programming data is stored in an onchip SRAM, loaded via the serial link, or by EEPROM for stand alone purposes. Fig. 4: Library of existing CAMs ● ● Choose a proper CAM (e. g. choose the CAM FilterBiquad and place it on the sheet) Determine the necessary parameters (e. g.: for a Cauer low pass filter of 2. order, Corner Frequency 1.23134 kHz, Gain 0.944061 and Quality Factor 0.863721) Fig. 3: Evaluation Board AN221D04 [6] D. Development Software The Anadigm company provides the development software AnadigmDesigner2. It is used for the easy design of static FPAA configurations. Data files for stand alone purposes can be created and, in case of programming dynamic configurations, C++ projects can be installed also. Fig. 5: Setting of the CAM Parameter [1] ● ● Now setting the parameters (double clicking on the CAM opens the window for the parameters, insert corner frequency, gain, quality factor and confirm by OK) Then connect filter input to InputCell3 and filter output to OutputCell1. shall be send to the evaluation board using the Download button. Then, the reconfiguration data is send, any time the push bar is used for changing the configuration. Fig. 8: Lowpass filter with variable parameters In the frame of a diploma thesis [1] examples were programmed, e. g.: Fig. 6: Wiring input and output ● For static configuration only the data has to be send to the evaluation board. Do it by pushing button or by using the menu (Configure | Write configuration data to serial port) IV. DYNAMIC CONFIGURATION For dynamic configuration the steps of static configuration have to be fulfilled first. Then, after having chosen a proper CAM, having set the parameters and after connecting the in- and output, we now create a C++ project using the menu: Dynamic Configuration Visual C++ Prototype • • • DTMF dialler Variable tone generator FPAA playing a children song V. EXAMPLE OF A DYNAMICALLY RECONFIGURATING PROGRAMME Variable tone generator This configuration was programmed using the AnadigmDesigner2 software and then a Visual C++ Prototype named Oscillator was created. Choose a CAM of type OscillatorSine and set the parameters to: ClockA: 31.3725 kHz Oscillator Frequency: 0.360 kHz Peak Amplitude: 3.2 V Fig. 7: Creating an Visual C++ Prototype The AnadigmDesigner2 now creates all the classes and subclasses necessary for the dynamic configuration. These subclasses have to be inserted into the program code of the Visual C++ project. After compilation, first the Primary Configuration Data Fig. 9: Oscillator The AnadigmDesigner2 has created the subclasses for a dynamic configuration. For varying the oscillator frequency only the routines ExecuteReconfig() (for transmission of the reconfiguration data) and setOscillatorSine(double Fo, double A) (for varying frequency and amplitude) are of interest. { CDialog::OnInitDialog(); // Setup application icon SetIcon(m_hIcon, TRUE); SetIcon(m_hIcon, FALSE); // Add the "About..." menu item ConfigureAboutMenu(); // Initialize the sample slider m_sampleMin = 0.36; m_sampleMax = 1.0; m_sampleValue = 0.36; m_sampleSlider.SetRange(0, 100); // Initial update of sample controls UpdateSampleControls(); return TRUE; } Please remark, that you have to define the project aktive, by marking it with a hook in front of the name. Fig. 10: Visual C++ Project Oscillator [1] Next, we have to define the characteristics for the push bar in subroutine UpdateSampleControls(). This can be done easily by means of setOscillatorSine and ExecuteReconfig. Changes are represented in blue, see [8]. void OscillatorDlg::UpdateSampleControls() { // Map the actual sample value to the range [0, 100] for the slider int percent = (int) (100.0 * (m_sampleValue - m_sampleMin) / (m_sampleMax - m_sampleMin)); // Update the slider position m_sampleSlider.SetPos(percent); m_sampleSlider.Invalidate(); // Format the text for the edit control CString value; value.Format("%.2f kHz", m_sampleValue); // Update the edit control text m_sampleEdit.SetWindowText(value); m_FPAA1.OscillatorSine1.setOscillatorSine (m_sampleValue, 3.2); m_FPAA1.ExecuteReconfig(); } Using the instruction: setOscillatorSine(m_sampleValue, 3.2) we set the frequency of the oscillator, depending on the position of the bar. Amplitude is kept constant at 3.2 V. Instruction ExecuteReconfig will send reconfiguration data to the evaluation board Next we open an OscillortDlg.cpp file and define the boundaries for the sample slider in the OnInitDialog(). Minimum was set to 0.36 kHz and maximum was set to 1 kHz. BOOL OscillatorDlg::OnInitDialog() Fig. 11: Oscillator with variable frequency Pushing button Download transmits Primary Configuration Data to the board. Now, the frequency changes depending on the position of the sample slider. The current frequency is shown in the text field in the back. You can download the example from address [8]. VI. CONCLUSION The technology of the Field Programmable Analogue Arrays offers attractive and universal functions. FPAAs can be used in many different applications. But don’t underestimate the time for training on the subject. Only a few helpful information was provided by the producer and the programming procedure partly followed the crucial path of trial and error. Detailed knowledge on the relationship of hard- and software would be helpful for the future and could decrease the developing times by far. VII. ACKNOWLEDGMENT Special thanks to Peter Dückert, Hilmar Endres and Jochen Reuter for their kind support. VIII. REFERENCES [1] Eckstein, K.: Dynamische Programmierung analoger Schaltungen am Beispiel des Field Programmable Analog Arrays AN221E04, FH Würzburg-Schweinfurt, Diplomarbeit 2005. [2] Reuter, J.: Der Entwurf und Aufbau spezieller analoger Filter mit programmierbaren Analog Arrays, FH Würzburg-Schweinfurt, Diplomarbeit 2004. [3] Möhringer, P.: Implementierung spezieller Entzerrerfilter auf FPAA, 2. Symposium der Fachhochschulen Würzburg-Schweinfurt & Hochschule Bremen, Schweinfurt 28.9.2004, Tagungsb. S. 57-74. [4] Möhringer, P.: Implementation of Specific Equalising Filters using Field Programmable Analogue Arrays, Proceedings of 21st International Scientific Conference "Science for Practice", 06./07. Mai 2004, Polytechnik Engineering College Subotica, (Serbia and Montenegro) page 71-77, COBISS.SR-ID 198996487, www.fh-sw.de/.../fpaa-subotica.pdf. [5] Wangenheim, L. von: Aktive Filter in RC- und SCTechnik. Hüthig Verlag, Heidelberg 1991. [6] Anadigm AN121E04 / AN221E04 Field Programmable Analog Arrays – User Manual, www.anadigm.com/_doc/UM021200-U007.pdf. [7] Application Note 201 Dynamically Reconfiguration the AN220E04 FPAA, www.anadigm.com/_doc/AP020800-U201.pdf. [8] Eckstein, K., Möhringer, P.: Dynamically Reconfiguring of the Field Programmable Analogue Array AN221E04, www.fh-sw.de/sw/fachb/et/pp/vuv.html.