Catching LED Game: An FPGA Developing Board Implementation

Similar documents
Hardware Modeling of Binary Coded Decimal Adder in Field Programmable Gate Array

Microprocessor Design

Laboratory Exercise 7

Design of BIST with Low Power Test Pattern Generator

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

CHAPTER 4 RESULTS & DISCUSSION

Lab #12: 4-Bit Arithmetic Logic Unit (ALU)

Digital Systems Laboratory 1 IE5 / WS 2001

Laboratory Exercise 7

[Krishna*, 4.(12): December, 2015] ISSN: (I2OR), Publication Impact Factor: 3.785

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

Optimization of Multi-Channel BCH Error Decoding for Common Cases. Russell Dill Master's Thesis Defense April 20, 2015

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques

FPGA Hardware Resource Specific Optimal Design for FIR Filters

Field Programmable Gate Arrays (FPGAs)

Design and Implementation of Encoder for (15, k) Binary BCH Code Using VHDL

An MFA Binary Counter for Low Power Application

Chapter 5 Flip-Flops and Related Devices

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

Implementation and Analysis of Area Efficient Architectures for CSLA by using CLA

Design for Test. Design for test (DFT) refers to those design techniques that make test generation and test application cost-effective.

COE328 Course Outline. Fall 2007

Further Details Contact: A. Vinay , , #301, 303 & 304,3rdFloor, AVR Buildings, Opp to SV Music College, Balaji

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

Research Article Low Power 256-bit Modified Carry Select Adder

Enhancing Performance in Multiple Execution Unit Architecture using Tomasulo Algorithm

FPGA-BASED EDUCATIONAL LAB PLATFORM

Why FPGAs? FPGA Overview. Why FPGAs?

FPGA Development for Radar, Radio-Astronomy and Communications

LOCAL DECODING OF WALSH CODES TO REDUCE CDMA DESPREADING COMPUTATION. Matt Doherty Introductory Digital Systems Laboratory.

Lab 2: Hardware/Software Co-design with the Wimp51

FPGA Based Implementation of Convolutional Encoder- Viterbi Decoder Using Multiple Booting Technique

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

2. Logic Elements and Logic Array Blocks in the Cyclone III Device Family

Bit Swapping LFSR and its Application to Fault Detection and Diagnosis Using FPGA

Cyclone II EPC35. M4K = memory IOE = Input Output Elements PLL = Phase Locked Loop

ENGG2410: Digital Design Lab 5: Modular Designs and Hierarchy Using VHDL

Designing for High Speed-Performance in CPLDs and FPGAs

LUT Optimization for Memory Based Computation using Modified OMS Technique

A Fast Constant Coefficient Multiplier for the XC6200

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Individual Project Report

IE1204 Digital Design F11: Programmable Logic, VHDL for Sequential Circuits

Design of Fault Coverage Test Pattern Generator Using LFSR

Distributed Arithmetic Unit Design for Fir Filter

DIGITAL FUNDAMENTALS

Point System (for instructor and TA use only)

March 13, :36 vra80334_appe Sheet number 1 Page number 893 black. appendix. Commercial Devices

Sharif University of Technology. SoC: Introduction

Programmable Logic Design I

FSM Implementations. TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall Output. Input. Next. State.

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Comparative Analysis of Stein s. and Euclid s Algorithm with BIST for GCD Computations. 1. Introduction

Inside Digital Design Accompany Lab Manual

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

2e 23-1 Peta Bits Per Second (Pbps) PRBS HDL Design for Ultra High Speed Applications/Products

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

International Journal of Scientific & Engineering Research, Volume 5, Issue 9, September ISSN

Hardware Implementation of Viterbi Decoder for Wireless Applications

ET398 LAB 4. Concurrent Statements, Selection and Process

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING

FPGA TechNote: Asynchronous signals and Metastability

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

Design and Implementation of Partial Reconfigurable Fir Filter Using Distributed Arithmetic Architecture

MODULE 3. Combinational & Sequential logic

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

IE1204 Digital Design. F11: Programmable Logic, VHDL for Sequential Circuits. Masoumeh (Azin) Ebrahimi

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Implementation of BIST Test Generation Scheme based on Single and Programmable Twisted Ring Counters

Digital Systems Design

High Performance Carry Chains for FPGAs

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Implementation of High Speed Adder using DLATCH

Design of BIST Enabled UART with MISR

Testing Digital Systems II

Implementing VGA Application on FPGA using an Innovative Algorithm with the help of NIOS-II

Available online at ScienceDirect. Procedia Computer Science 46 (2015 ) Aida S Tharakan a *, Binu K Mathew b

Overview: Logic BIST

ALONG with the progressive device scaling, semiconductor

Digital Fundamentals: A Systems Approach

Vending Machine. Keywords FSM, Vending Machine, FPGA, VHDL

Contents Circuits... 1

OF AN ADVANCED LUT METHODOLOGY BASED FIR FILTER DESIGN PROCESS

Implementation of Low Power and Area Efficient Carry Select Adder

Digital Correction for Multibit D/A Converters

FPGA IMPLEMENTATION AN ALGORITHM TO ESTIMATE THE PROXIMITY OF A MOVING TARGET

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

SDR Implementation of Convolutional Encoder and Viterbi Decoder

EEE130 Digital Electronics I Lecture #1_2. Dr. Shahrel A. Suandi

VLSI System Testing. BIST Motivation

Testing of UART Protocol using BIST

Logic Design Viva Question Bank Compiled By Channveer Patil

Design of Memory Based Implementation Using LUT Multiplier

SOC Implementation for Christmas Lighting with Pattern Display Indication RAMANDEEP SINGH 1, AKANKSHA SHARMA 2, ANKUR AGGARWAL 3, ANKIT SATIJA 4 1

FPGA Implementation of DA Algritm for Fir Filter

The Design of Efficient Viterbi Decoder and Realization by FPGA

Transcription:

Catching LED Game: An FPGA Developing Board Implementation Horacio Fernandez-Jimenez Paz V Garcia-Hernandez Abstract This work is about designing and implementation of a game kind Simon says. Game system was divided, division provides advantages. Finding solutions for minor problems is easier than for mayor ones; giving as result that debugging process is faster than full-attack methods. Moreover, FPGA usage was a great improvement for digital designing, it has modular capability and VHDL programming is concise and clear. Finally, system was physically implemented and then it was tested by several first-time users, giving some unexpected conclusions. First, dexterity games depend not only of sophistication to be amusing but playability and well-done ideas. Second, it does not matter how good you could have planned a game, it can always be improved. Keywords Game, FPGA developing board, VHDL I. INTRODUCTION One of the primordial decisions at electronic product designing time is to choice correct device. Some considerations for device selecting are: cost, features and designing method. The choice must be taken at first designing process stage; however, it has a great impact on covering range of project. Field programmable gate array (FPGA) developing board has become an interesting option for rapid digital system development [1,2]. Developing board make easier debugging process, because reconfiguration just requires a few clicks. FPGA is not only alternative for digital system designing; there are also Complex Programmable Logic Device (CPLD) [3,4] and microcontrollers [5,6]. Both alternatives have either advantages or disadvantages. On next, some FPGA advantages over CPLD are presented [7]: A FPGA has a larger logic density than CPLD. A FPGA is cheaper by logic unity than CPLD, even though FPGA integrated circuit is more expensive. Ricardo F Martinez-Gonzalez Email: imag [AT] itver.edu.mx Antonio Dominguez-Cedillo FPGA are able to implement more complex designs than CPLD, owing to larger logic density. FPGA has optimized embedded circuits for arithmetic functions, like counters, adders, multipliers, et cetera. Now, some FPGA advantages over microcontrollers (μcs) are presented [8]: FPGA are able to make more operations by duty cycle than μc. FPGA has ability for parallel operation execution, speeding its data processing up. FPGA can be reprogrammed to change its functionality; otherwise, μc has a static architecture and instruction set. Among FPGA developing boards, Altera ones have good features with low costs [9]. Altera Inc. releases online a completely free developing suite named Quartus II. It allows compiling, programming, simulating, even intellectual property (IP) elaborating [10] and also it has online help. Altera offers three FPGA families; each family has its own specifications. Stratix is highest gamma family, then Arria family comes, and finally simplest one, Cyclone. For project developing, DE0 Nano developing board was selected. It has a Cyclone IV EP4CE22F17C6N FPGA; this board is ideal for portable prototypes or projects, because of its light-weight, reduced size and no external power necessity. There are several forms to determinate FPGA behavior; nonetheless, hardware description languages (HDLs) are most common and used option. From HDLs, VHDL and Verilog HDL are the most extensive [11,12,13]. Both languages are open and standardized by Institute of Electrical and Electronics Engineers 258

(IEEE); VHDL on 1076 and 1164 IEEE standards and Verilog on 1364 one. This project uses VHDL, due to its versatility; it allows determinate proceedings and functions location for any design unit availability, also VHDL has libraries, those concepts do not exist on Verilog. Furthermore, VHDL is a very concise and robust language, making to write its code simple and objective; on the contrary, Verilog compiler uses to omit errors; and later, such errors show up [14]. II. GAME DEVELOPMENT Catching LED game is kind Simon says. The main objective of it is to direct a joystick where LED is ON; in other words, catching LED is ON. If user catches LED, so user s score rises. LEDs are distributed surrounding joystick on distribution presented in Figure 1. Figure 1. LEDs distribution Following game explanation, LED will be on just for an established time, and then another one will and so forth. Game has a scoreboard implemented by two 7 segment displays. Moreover, game has two duration times, 10 and 30 seconds; also it has difficulty, establishing LED-ON frequency. For a better developing control, project was divided in several parts. A. Game time selector This component is in charge for establishing game time. There are two options, 10 and 30 seconds; so two entities are needed. A clock pulse counter determinate time, developing board has a 50 MHz quartz crystal, which is used for clock pulse generation. Calculating for period determination, 1 50 MHz = 2 ns now to obtain 10 and 30 seconds, next calculations were made 10 s 20 ns = 500 30 s 106 = 1.5 109 20 ns Both obtained quotients are used by accumulator entities, which start with a logic one in their outputs, and when their accounts reach corresponding quotient, entity toggle its output and account is reset. Physically, time selection is made by a single action ON/OFF switch; and its position determines which entity is in charge, 10 or 30. Complete description is shown in Figure 2. B. LED-ON frequency selector Figure 2. Make time selector diagram Selector controls LED time ON, for it a counter is used; when counter reaches certain value, selector puts a logic one on its output. For ON-time obtaining, a 32 bit counter is created and its positions 22 and 23 determinate function, just one at time, so two frequencies are possible. To calculate period next calculations were made 2 23 50 MHz = 167 ms 2 22 = 83 ms 50 MHz Once again, physical selection is made by a single action ON/OFF switch, and depending on it, a counter position takes control. Complete function of selector appears on Figure 3. Figure 3. LED-ON frequency selector C. Pseudo random sequence generator Generator produces 3 bits sequences, it is implemented using a linear feedback shift registers (LFSR), this project has a 30 bit LFSR. First at all, a seed vector is planted on LFSR; seed is the first value and it determinates some generator features. Each 50 MHZ clock pulse, LFSR right shifts one position and XORs bit 1 and bit 30. XOR result is reintroduced in least position bit in LFSR. The entity output is three least significant bits from LFSR; The LFSR used for generator implementation is shown in Figure 4. 259

Figure 4. LFSR implemented for pseudo random sequence generator The final part of the entity is an adjustment to synchronize this entity and frequency selector. Generator produces sequences each 20 ns, so when selector gives signal a sequence is caught. D. Encoder Pseudo random sequence is three bit long; however, just one LED must be ON at same time. In order to determinate which one, an encoder is implemented. Table 1 is truth table for the implemented encoder. E. Joystick command catcher Joystick actions switches, three in total. This input can occur at any time, so a register captures user s command. After it, command is delivered, for score determination. F. Comparator This component makes comparison between joystick command and encoder data; if both are equal, then comparator rises its output up, otherwise it falls its output down. G. Scoreboard controller Controller sums correct answers and controls scoreboard. It has two entities: goods counter and display encoder. When comparator s output is high then counter increases its account. This counter is not binary but decade. Making a decade counter eases next entity, display encoder; which encodes account for a pair of 7 segment displays. Both entities are connected as shown on Figure 5. TABLE I. ENCODER FUNCTION Input Output 000 000 001 000 010 001 011 001 100 010 101 010 110 100 111 100 Figure 5. Scoreboard controller architecture Putting every compound together, whole system is presented in Figure 6, for obvious reason multiple lines are replaced with a bus line. 260

Figure 6. Complete system architecture III. OBTAINED RESULTS Using the LFSR pseudo random sequence generator successfully works; some sequences are presented at Figure 7. When reset is high, seed vector is reintroduced to LFSR; and when it is low, LFSR starts working. Its good function can be evaluated after output does not have symmetry. Figure 7. Pseudo random sequence generator output signals Encoder was also simulated, and Figure 8 shows how it only has one bit in high level, and other one is low. Figure 8. Output encoder Goods counter entity counts from zero to nine; it also generates its corresponding carry signal. With its good functioning, display encoder would not have problems. Test outputs of good counter entity appear in Figure 9. Figure 9. Good counter entity s outputs Timers were tested using a chronometer and they were exact. Finally, a game does not work if it does not entertain, so it was physically implemented, see figure 10, and tested. During an Institutional Expo, prototype was tested by various persons, giving some results. First, prototype works as it was expected. Second, difficulty selector needs improvements; easy is too easy and hard is very hard; some intermediate levels need to be developed. Third, timer needs more levels. As last, user experienced an amusement moment and they were very interested in take part of test. IV. CONCLUSIONS It is possible to design a digital system dividing it in subsystems or components. Each component is simpler than computer system so developing and testing is easier. LFSR works as pseudo random sequence generator algorithm, and in conjunction of encoder entity, makes an apparently random system. LEDs ON did not follow any pattern, making the game funnier. Despite of its simplicity, the game is very amusing. Even though its design considerations, the most qualified opinion, is which comes from players. Some updates needs to be done; however it was a good first shot. 261

[14] Smith, D.J., (1996). VHDL and Verilog compared and contrasted-plus modeled example written in VHDL, Verilog and C. Design Automation Conference Proceedings 1996, 33rd, vol.3, no.7, pp.771-776. Figure 10. Physical implementation of project REFERENCES [1] Kao, C. (2005). Benefits of partial reconfiguration. Xcell journal, 55, 65-67. [2] Dongale, T., Magdum, S., Goilkar, K., Chougale, N., & Ghatage, S. R. (2012). FPGA Implementation of a PID controller for dc motor controller application. proc. IJAIR. [3] Lakeou, S., Ososanya, E., Latigo, B. O., Mahmoud, W., Karanja, G., & Oshumare, W. (2006, September). Design of a low-cost solar tracking photo-voltaic (PV) module and wind turbine combination system. In 21st European Photovoltaic Solar Energy Conference (pp. 4-8). [4] Zeller, J., Zhu, M., Stimac, T., & Gao, Z. (2001, July). Nonlinear digital control implementation for a dc-to-dc power converter. In INTERSOCIETY ENERGY CONVERSION ENGINEERING CONFERENCE (Vol. 1, pp. 205-210). SAE; 1999. [5] Zwavashe, T., & Duri, R. (2014). Integrating GSM and Zigbee Wireless Networks for Smart A2 farming Enterprises in Zimbabwe. International Journal of Science and Research, Vol3, Issue6. [6] Laizans, K., Sünter, I., Zalite, K., Kuuste, H., Valgur, M., & Tarbe, K. (2014). Design of the fault tolerant command and data handling subsystem for ESTCube-1. In Proc. Estonian Acad. Sci (Vol. 63, pp. 222-231). [7] Brown, S., & Rose, J. (1996). Architecture of FPGAs and CPLDs: A tutorial. IEEE Design and Test of Computers, 13(2), 42-57. [8] Parnell, K., & Bryner, R. (2004). Comparing and contrasting FPGA and microprocessor system design and development. White Paper, XILINX Corporation. [9] Leventis, P., Chan, M., Chan, M., Lewis, D., Nouban, B., Powell, G.,... & Costello, J. (2003, November). Cyclone : a low-cost, high-performance FPGA. In Proceedings of the IEEE Custom Integrated Circuits Conference (pp. 49-52). IEEE; 1999. [10] Strell, S. (2006). Increasing Productivity with Altera Quartus II to I/O Designer/DxDesigner Interface. [11] Swan, S. (2001). An introduction to system level modeling in SystemC 2.0. Cadence Design Systems, Inc., draft report. [12] Golson, S. (1993, March). One-hot state machine design for FPGAs. In Proc. 3rd Annual PLD Design Conference & Exhibit (Vol. 1, No. 3). [13] Storaasli, O., Yu, W., Strenski, D., & Maltby, J. (2007). Performance evaluation of FPGA-based biological applications. Cray User Group. 262