Programmable SLI AT40K AT40KAL AT94K. Application Note. Implementing a Single-coefficient Multiplier

Similar documents
FPGA Configuration EEPROM Memory. Application Note. Programming Atmel s EEPROMs: AT17LV020(A) vs. AT17LV002(A) Introduction.

AT17 Series FPGA. Configuration Memory. Application Note. In-System Programming Circuits for AT17 Series Configurators with Atmel and Xilinx FPGAs

8051 Microcontrollers. Application Note. Migration from AT89C5131 & AT89C5131A-L to AT89C5131A-M

System Designer. Programmable SLI AT94K/AT94S Series. Features. Description

DatasheetDirect.com. Visit to get your free datasheets. This datasheet has been downloaded by

8-bit RISC Microcontroller. Application Note. AVR 305: Half Duplex Compact Software UART

TSC695. Application Note. Annulled Cycle Management on the TSC695. References

System Designer. Programmable SLI AT94K/AT94S Series. Features. Description

AT94K Series Field Programmable System Level Integrated Circuit. Application Note. FPSLIC Baud Rate Generator

Rad Hard FPGA. AT40KEL-DK Design Kit Content. Description. Kit Content. Reference Material. Support

Section 1 ATAVRAUTOEK1 Getting Started

FPGA Configurator Programming Kit (Enhanced) ATDH2200E. Features. Description

AT91 ARM Thumb Microcontrollers. Application Note. AT91M55800A Clock Switching Considerations using Advanced Power Management Controller.

8-bit Microcontroller. Application Note. AVR031: Getting Started with ImageCraft C for AVR

AT17(A) Series FPGA Configuration Memory. Application Note

8-bit Microcontroller. Application Note. AVR030: Getting Started with C for AVR

AVR32 UC3 Software Framework... User Manual

MP3 Player Reference Design Based on AT89C51SND1 Microcontroller... User Guide

hex file. The example described in this application note is written for the AT94K using the FPSLIC Starter Kit. Creating a New Project

8-bit Microcontroller. Application Note. AVR201: Using the AVR Hardware Multiplier

Application Note Microcontrollers. C Flash Drivers for T89C51RC/RB/IC2 and AT89C51RC/RB/IC2 for Keil Compilers

AT89C5131 Starter Kit... Software User Guide

MARC4. Application Note. Hints and Tips for Hard- and Software Developments with MARC4 Microcontrollers

Migration From AT89C51SND1C to AT83C51SDN1C. Application Note. MP3 Microcontrollers

8-bit Microcontroller. Application Note. AVR320: Software SPI Master

CAN Microcontrollers. Application Note. Migrating from T89C51CC01 to AT89C51CC03. Feature Comparison

AT89STK-09 Starter Kit for AT83C26... User Guide

AT89ISP Programmer Cable Introduction AT89ISP Programmer Cable Parallel Port Settings Application Note AT89ISP Software AT89ISP Cable polarized

Application Note. Microcontrollers. Using Keil FlashMon Emulator with AT89C51CC01/03 AT89C51CC01/ Summary. 2. Background overview

ATAVRAUTO User Guide

Two-wire Serial EEPROM Smart Card Modules 128K (16,384 x 8) 256 (32,768 x 8) AT24C128SC AT24C256SC. Features. Description VCC NC

AT17F Series. Application Note. Programming Circuits for AT17F Series Configurators with Xilinx FPGAs. 1. Introduction

CAN, 80C51, AVR, Microcontroller. Application Note

Atmel FPGA Integrated Development System (IDS)

AT91 ARM Thumb Microcontrollers. Application Note. AT91 Host Flash Loader. 1. Package Contents. 2. Definition of Terms. 3.

Atmel FPGA Integrated Development System (IDS)

2-wire Serial EEPROM Smart Card Modules AT24C32SC AT24C64SC

ATAVRAUTO User Guide

Two-wire Serial EEPROM Smart Card Modules 1K (128 x 8) 2K (256 x 8) 4K (512 x 8) 8K (1024 x 8) 16K (2048 x 8)

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler

Interfacing the internal serial EEPROM

Trusted Platform Module AT97SC3203S. SMBus Two-Wire Interface. Summary

3-Wire Serial EEPROM AT93C46C

Bluetooth General Information White Paper

8-bit Microcontroller. Application Note. AVR033: Getting Started with the CodeVisionAVR C Compiler

2-Wire Serial EEPROM AT24C01. Features. Description. Pin Configurations. 1K (128 x 8)

1-megabit (64K x 16) 3-volt Only Flash Memory AT49LV1024 AT49LV1025

80C51 MCUs T89C51AC2. Errata Sheet

CryptoRF EEPROM Memory 8 Kbits

256 (32K x 8) High-speed Parallel EEPROM AT28HC256N. Features. Description. Pin Configurations

AT89STK-10 Starter Kit... Hardware User Guide

2-wire Serial EEPROM AT24C01A AT24C02 AT24C04 AT24C08 AT24C16

1-megabit (64K x 16) 3-volt Only Flash Memory AT49BV1024A AT49LV1024A

UART. Embedded RISC Microcontroller Core Peripheral

1-megabit (64K x 16) 5-volt Only Flash Memory AT49F1024 AT49F1025

2-wire Serial EEPROM AT24C21. 2-Wire, 1K Serial EEPROM. Features. Description. Not Recommended for New Designs. Pin Configurations.

AVR501: Replacing ATtiny15 with ATtiny25. 8-bit Microcontrollers. Application Note PRELIMINARY. Features. 1 Introduction

DIP Top View A18 A16 A15 A12 A7 A6 A5 A4 A3 A2 A1 A0 I/O0 I/O1 I/O2 GND VCC A17 A14 A13 A8 A9 A11 A10 I/O7 I/O6 I/O5 I/O4 I/O3 VCC A18 A17

AT40K FPGA IP Core AT40K-FFT. Features. Description

2-megabit (256K x 8) 3-volt Only Flash Memory AT29LV020

AT89C51CC03 UART Bootloader

8-bit Microcontroller. Application Note. AVR032: Linker Command Files for the IAR ICCA90 Compiler

512K (64K x 8) 5-volt Only Flash Memory AT29C512

DIP Top View VCC A12 A14 A13 A6 A5 A4 A3 A2 A1 A0 A8 A9 A11 A10 I/O7 I/O6 I/O0 I/O1 I/O2 I/O5 I/O4 I/O3 GND. TSOP Top View Type 1 A11 A9 A8 A13 A14

SAM Boot Assistant (SAM-BA)... User Guide

8-bit Microcontroller. Application Note. AVR410: RC5 IR Remote Control Receiver

64K (8K x 8) Parallel EEPROM with Page Write and Software Data Protection AT28C64B. Features. Description. Pin Configurations

256K (32K x 8) 5-volt Only Flash Memory AT29C256

32-bit Secure. AT91SC CT-USB Summary. Microcontrollers. Features

256K (32K x 8) 5-volt Only Flash Memory AT29C256

Parallel EEPROM Die Products. Die Products. Features. Description. Testing

2-wire Serial EEPROMs AT24C128 AT24C256

8-bit RISC Microcontroller. Application Note. AVR151: Setup And Use of The SPI

4-megabit (512K x 8) Single 2.7-volt Battery-Voltage Flash Memory AT49BV040 AT49LV040

AT89C51SND1 UART Bootloader

Preparations. Creating a New Project

Two-Wire Serial EEPROM AT24C164 (1)

CryptoMemory 64 Kbit AT88SC6416C. Summary. Features. Table 1. Pin Configuration

FPGA Configuration EEPROM Memory AT17C65A AT17LV65A AT17C128A AT17LV128A AT17C256A AT17LV256A

4-megabit (512K x 8) 5-volt Only 256-byte Sector Flash Memory AT29C040A

ARM7TDMI - based Microcontroller AT91RM3400. Errata Sheet

When is Data Susceptible to Corruption

design cycle involving simulation, synthesis

Atmel-Synario CPLD/PLD Design Software ATDS1100PC ATDS1120PC ATDS1130PC ATDS1140PC. Features. Description

T89C5115 UART Bootloader

T89C51AC2 UART Bootloader

2-megabit (256K x 8) 5-volt Only Flash Memory AT29C020

2-wire Serial EEPROM AT24C1024. Features. Description. Pin Configurations. 1M (131,072 x 8)

AT85DVK-07 Demonstration Firmware... User s Manual

Interrupt Controlled UART

OrCAD Support for Atmel PLDs. Application Note. OrCAD Support for Atmel PLDs. Overview

AT17LV(A) Series FPGA Configuration Memory. Application Note. Programming Specification for AT17LV(A) Series FPGA Configuration Memories

1-megabit (128K x 8) 5-volt Only Flash Memory AT29C010A

SPI Serial EEPROMs AT25010 AT25020 AT SPI, 1K Serial E 2 PROM

Secure Microcontrollers for Smart Cards. AT90SC Summary

AT17A Series FPGA Configuration EEPROM Memory. Application Note. FPGAs. AT17A Series Conversions from Altera FPGA Serial Configuration Memories

CryptoMemory 256 Kbit AT88SC25616C. Summary

64K (8K x 8) High Speed Parallel EEPROM with Page Write and Software Data Protection AT28HC64BF

4-megabit (512K x 8) 3-volt Only 256-byte Sector Flash Memory AT29LV040A

T89C51CC01 CAN Bootloader

Transcription:

Implementing a Single-coefficient Multiplier Features Theory of Developing a Single-coefficient Multiplier Implementation using an AT40K Series FPGA for an 8-bit Single-coefficient Multiplier Coefficient Look-Up Table is Easily Re-Configurable View Logic Workview Office Reference Designs for 8-bit and 16-bit Implementations Introduction Atmel s AT40K Series of Field Programmable Gate Arrays (FPGA) are specifically designed for computation intensive Digital Signal Processor (DSP) applications. The FPGA architecture provides an octagonal shaped core cell that possesses orthogonal and diagonal cell-to-cell connections, allowing each core cell to communicate directly with its eight nearest neighbors without using the slower bussing network. This architecture is optimized for many applications, including array multiplication and multiplication-oriented applications, including image processing, real-time video, telecommunications and control systems. The implementation of the Single-coefficient Multiplier presented in this application note uses an algorithm of simple additions and single bit multiplications and series of Look-Up Tables (LUTs) or Read-only Memory (ROM) Macros, which are followed by a stage of addition; multiple stages of addition may be required depending upon the bit width of the product vector. The reference design has been completed in schematic form using Viewlogic Workview Office, however a successful re-target to either VHDL or Verilog would not be a difficult task. Programmable SLI AT40K AT40KAL AT94K Application Note The Algorithm Performing decimal multiplication by hand is a fairly tedious process, especially if we do not know our multiplication tables. In order to simplify the process, one typically breaks the problem down into simpler to perform steps. For example, when performing decimal multiplication one actually performs single-digit multiplications with carries to the next column, one then adds all the intermediate products to obtain the final product. Consider the following example: 170 x 3 = 0 + 210 + 300 = 510 170 x 63 = 510 (1) + 10,200 (2) = 10,710 Notes: 1. 510 = 3 x 170 2. 10,200 = 6 x 170 x 10 Rev. 3038A FPSLI 3333 1

Alternatively, we could simplify and speed up this process by committing a larger number of multiplication tables to memory, however that is not a very viable option. With the devices available today especially those which are re-configurable, this alternative is a very viable solution. In order to implement a Single-coefficient Multiplier in hardware, one would first need to construct a series of hexadecimal multiplication tables, from $00 to $0F times the multiplicand value. As with longhand multiplication, one would add the intermediate products and obtain the final product. Consider the following example: AA x 3F = 9F6 + 1FE = 29D6 Notes: 1. 9F6 = F x AA 2. 1FE = 3 x AA x 10 1 x AA = 0AA 9 x AA = 5FA 2 x AA = 154 A x AA = 6A4 3 x AA = 1FE B x AA = 74E 4 x AA = 2A8 C x AA = 7F8 5 x AA = 352 D x AA = 8A2 6 x AA = 3FC E x AA = 94C 7 x AA = 4A6 F x AA = 9F6 Furthermore, it is possible to implement optimizations that significantly reduce the addition logic required. As you can see from performing a multiplication, the four least significant bits remain unchanged through the addition phase of the application, see Figure 1. Figure 1. 8-bit Single-coefficient Multiplier with Optimization M[7:4] Twelve 4-input 16 x 1 ROM Look-Up Tables L1[11:0] M[7:0] 20-bit Ripple Carry Adder P[15:0] M[3:0] Twelve 4-input 16 x 1 ROM Look-Up Tables L0[11:4] P[3:0] 2 Implementing a Single-coefficient Multiplier

Implementation Implementing a Single-coefficient Multiplier An 8-bit implementation of the Single-coefficient Multiplier requires two arrays of twelve unique LUTs, which provide the results ranging from zero to fifteen times the multiplicand. Atmel s 4-input core cell in the AT40K Series of FPGAs can be configured as a 16 x 1 ROM, implementing each LUT easily and efficiently. The contents of the 16 x 1 ROM are bit-sliced according the coefficient multiplication table, see Table 1. For consistency, this application note will continue to use the data from the previous example. Table 1. 16 x 1 ROM Look-Up Table Data for $AA R11 R10 R9 R8 R7 R6 R5 R4 R3 R2 R1 R0 0 x AA = 000 --> 0 0 0 0 0 0 0 0 0 0 0 0 1 x AA = 0AA--> 0 0 0 0 1 0 1 0 1 0 1 0 2 x AA = 154 --> 0 0 0 1 0 1 0 1 0 1 0 0 3 x AA = 1FE --> 0 0 0 1 1 1 1 1 1 1 1 0 4 x AA = 2A8 --> 0 0 1 0 1 0 1 0 1 0 0 0 5 x AA= 352--> 0 0 1 1 0 1 0 1 0 0 1 0 6 x AA = 3FC--> 0 0 1 1 1 1 1 1 1 1 0 0 7 x AA = 4A6 --> 0 1 0 0 1 0 1 0 0 1 1 0 8 x AA = 550 --> 0 1 0 1 0 1 0 1 0 0 0 0 9 x AA = 5FA --> 0 1 0 1 1 1 1 1 1 0 1 0 A x AA = 6A4 --> 0 1 1 0 1 0 1 0 0 1 0 0 B x AA = 74E--> 0 1 1 1 0 1 0 0 1 1 1 0 C x AA = 7F8 --> 0 1 1 1 1 1 1 1 1 0 0 0 Dx AA = 8A2--> 1 0 0 0 1 0 1 0 0 0 1 0 Ex AA= 94C--> 1 0 0 1 0 1 0 0 1 1 0 0 F x AA = 9F6 --> 1 0 0 1 1 1 1 1 0 1 1 0 The optimized 8-bit implementation of a Single-coefficient Multiplier requires a total of twenty-four 16 x 1 ROM LUTs and a 20-bit Ripple-carry Adder. An optimized 16-bit Single-coefficient Multiplier would require a total of eighty 16 x 1 ROM LUTs, two 20-bit Ripple-carry Adders, and a 24-bit Ripple-carry Adder. A comparison between a Singlecoefficient Multiplier and a standard multiplier is shown in Table 2 for both 8-bit and 16-bit implementations. Table 2. Implementation of Various Multipliers on AT40KAL Series FPGA Multiplier Speed (MHz) Core Cell Count 8-bit Single-coefficient Multiplier 56 37 8x8UnsignedMultiplier 44 64 16-bit Single-coefficient Multiplier 22 145 16 x 16 Unsigned Multiplier 23 256 3

Changing the Constant Coefficient Dynamically Atmel s AT40K Series of FPGAs are capable of being dynamically re-configured. The AT40K Series of FPGAs supports CacheLogic re-configuration, which allows for the contents of the 16 x 1 ROM LUTs to be updated with new data dynamically without disrupting the entire system. Further information on CacheLogic Mode 4 re-configuration is available from the Atmel Programmable SLi Group under a Non-Disclosure Agreement (NDA), as this protects our customers from the reverse engineering of their designs. For this example, lets assume that an 8-bit Single-coefficient Multiplier has been implemented in the embedded AT40KAL FPGA within the AT94K FPSLIC device. We will then use the built-in CacheLogic interface to dynamically re-configure one of the 16 x 1 ROM LUTs in twelve instructions. The following code snippet re-configures one of the R7 LUTs for a Single-coefficient Multiplier to contain $DB6C for a coefficient of $55 from the embedded megaavr microcontroller. ldi rtemp, (1-1) out FPGAX, rtemp ldi rtemp, (12-1) out FPGAY, rtemp ldi rtemp, 0b00000110 out FPGAZ, rtemp ldi rtemp, 0b01101011 out FPGAD, rtemp ldi rtemp, 0b00000111 out FPGAZ, rtemp ldi rtemp, 0b01100111 out FPGAD, rtemp ;Load X-Coordinate of R7 LUT ;Load Y-Coordinate of R7 LUT ;Details of FPGAZ only under NDA ;Load New LUT Data Contents ;Details of FPGAZ only under NDA ;Load New LUT Data Contents The previous example demonstrated the necessary instructions to re-configure a 16 x 1 ROM Look-Up Table, lets now consider the overall time required re-configured a Single-coefficient Multiplier. The calculations will assume worst case timing, where we will issue commands to load the FPGAX, FPGAY and FPGAZ registers for every ROM Look-Up Table. Both the ldi and out instructions are single-cycle instructions in the megaavr architecture. The maximum time to re-configure the entire Single-coefficient Multiplier is dependent on the frequency of the microcontroller system clock (f CLK ), the number of ROM Look-Up Tables needing re-configuration (nrom), and the number microcontroller clock cycles needed to re-configure one ROM Look-Up Table (ncycles). The equation for computing the maximum time for re-configuration is: TMAX = 1 nrom ncycles fclk The calculations for T MAX have been performed for both 8-bit and 16-bit Single-coefficient Multipliers, assuming operation at 25 MHz, see Table 3. Table 3. TMAX Calculations for Single-coefficient Multipliers at 25 MHz Multiplier T MAX µs 8-bit Single-coefficient Multiplier 11.52 16-bit Single-coefficient Multiplier 38.40 Optimization The Single-coefficient Multiplier has been optimized so it is as efficient as possible, when considering maximum speed and core cell usage. Speed enhancements may be achieved by pipelining the device with single or multiple stages. The pipelining process will drastically increase the amount of FPGA core cells, however the performance boost may provide justification in the target system. 4 Implementing a Single-coefficient Multiplier

Atmel Headquarters Corporate Headquarters TEL 1(408) 441-0311 FAX 1(408) 487-2600 Europe Atmel SarL Route des Arsenaux 41 Casa Postale 80 CH-1705 Fribourg Switzerland TEL (41) 26-426-5555 FAX (41) 26-426-5500 Asia Atmel Asia, Ltd. Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimhatsui East Kowloon Hong Kong TEL (852) 2721-9778 FAX (852) 2722-1369 Japan Atmel Japan K.K. 9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa Chuo-ku, Tokyo 104-0033 Japan TEL (81) 3-3523-3551 FAX (81) 3-3523-7581 Atmel Operations Memory Atmel Corporate TEL 1(408) 436-4270 FAX 1(408) 436-4314 Microcontrollers Atmel Corporate TEL 1(408) 436-4270 FAX 1(408) 436-4314 Atmel Nantes La Chantrerie BP 70602 44306 Nantes Cedex 3, France TEL (33) 2-40-18-18-18 FAX (33) 2-40-18-19-60 ASIC/ASSP/Smart Cards Atmel Rousset Zone Industrielle 13106 Rousset Cedex, France TEL (33) 4-42-53-60-00 FAX (33) 4-42-53-60-01 Atmel Colorado Springs 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906 TEL 1(719) 576-3300 FAX 1(719) 540-1759 Atmel Smart Card ICs Scottish Enterprise Technology Park Maxwell Building East Kilbride G75 0QR, Scotland TEL (44) 1355-803-000 FAX (44) 1355-242-743 RF/Automotive Atmel Heilbronn Theresienstrasse 2 Postfach 3535 74025 Heilbronn, Germany TEL (49) 71-31-67-0 FAX (49) 71-31-67-2340 Atmel Colorado Springs 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906 TEL 1(719) 576-3300 FAX 1(719) 540-1759 Biometrics/Imaging/Hi-Rel MPU/ High Speed Converters/RF Datacom Atmel Grenoble Avenue de Rochepleine BP 123 38521 Saint-Egreve Cedex, France TEL (33) 4-76-58-30-00 FAX (33) 4-76-58-34-80 Atmel Programmable SLI Hotline (408) 436-4119 Atmel Programmable SLI e-mail fpga@atmel.com FAQ Available on web site e-mail literature@atmel.com Web Site http://www.atmel.com Atmel Corporation 2002. Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company s standard warranty whichisdetailedinatmel s Terms and Conditions located on the Company s web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel s products are not authorized for use as critical components in life support devices or systems. ATMEL, megaavr and CacheLogic are the registered trademarks of Atmel. FPSLIC is the trademark of Atmel. Viewlogic and Workview Office are the registered trademarks of Viewlogic Systems, Inc.; Verilog is the registered trademark of Gateway Design Automation Corporation; VHDL is the registered trademark of Cadence Design Systems, Inc. Other terms and product names may be the trademarks of others. Printed on recycled paper. xm