Product Obsolete/Under Obsolescence

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

AT18F Series Configurators. Application Note. Stand-alone or In-System Programming Applications for AT18F Series Configurators. 1.

Why FPGAs? FPGA Overview. Why FPGAs?

LogiCORE IP Spartan-6 FPGA Triple-Rate SDI v1.0

CAD for VLSI Design - I Lecture 38. V. Kamakoti and Shankar Balachandran

Memory Interfaces Data Capture Using Direct Clocking Technique Author: Maria George

Modeling Latches and Flip-flops

Tutorial 11 ChipscopePro, ISE 10.1 and Xilinx Simulator on the Digilent Spartan-3E board

Individual Project Report

L11/12: Reconfigurable Logic Architectures

Field Programmable Gate Arrays (FPGAs)

Level and edge-sensitive behaviour

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

Lecture 6: Simple and Complex Programmable Logic Devices. EE 3610 Digital Systems

Programmable Logic Design I

L12: Reconfigurable Logic Architectures

Memory Interfaces Data Capture Using Direct Clocking Technique Author: Maria George

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

A Fast Constant Coefficient Multiplier for the XC6200

VID_OVERLAY. Digital Video Overlay Module Rev Key Design Features. Block Diagram. Applications. Pin-out Description

Sequential Circuit Design: Principle

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

EMPTY and FULL Flag Behaviors of the Axcelerator FIFO Controller

Digital Fundamentals: A Systems Approach

Modeling Latches and Flip-flops

EITF35: Introduction to Structured VLSI Design

Registers and Counters

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

Combinational vs Sequential

2.6 Reset Design Strategy

Chapter 7 Counters and Registers

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

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

Application Note PG001: Using 36-Channel Logic Analyzer and 36-Channel Digital Pattern Generator for testing a 32-Bit ALU

Investigation of Look-Up Table Based FPGAs Using Various IDCT Architectures

Microprocessor Design

Chapter 4. Logic Design

Single Channel LVDS Tx

Digital Systems Laboratory 1 IE5 / WS 2001

Application Note. Traffic Signal Controller AN-CM-231

LogiCORE IP Video Timing Controller v3.0

Asynchronous (Ripple) Counters

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

Using the XC9500/XL/XV JTAG Boundary Scan Interface

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

VHDL Design and Implementation of FPGA Based Logic Analyzer: Work in Progress

IT T35 Digital system desigm y - ii /s - iii

Final Exam review: chapter 4 and 5. Supplement 3 and 4

EECS150 - Digital Design Lecture 18 - Circuit Timing (2) In General...

OF AN ADVANCED LUT METHODOLOGY BASED FIR FILTER DESIGN PROCESS

High-Performance DDR2 SDRAM Interface Data Capture Using ISERDES and OSERDES Author: Maria George

UG0651 User Guide. Scaler. February2018

Synchronous Sequential Design

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

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

Lecture 8: Sequential Logic

2. Counter Stages or Bits output bits least significant bit (LSB) most significant bit (MSB) 3. Frequency Division 4. Asynchronous Counters

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

SMPTE-259M/DVB-ASI Scrambler/Controller

8b10b Macro. v2.0. This data sheet defines the functionality of Version 1.0 of the 8b10b macro.

FPGA Design. Part I - Hardware Components. Thomas Lenzi

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

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

SMPTE 259M EG-1 Color Bar Generation, RP 178 Pathological Generation, Grey Pattern Generation IP Core AN4087

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

AT03716: Implementation of SAM L Configurable Custom Logic (CCL) Peripheral. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

Debugging of Verilog Hardware Designs on Altera s DE-Series Boards. 1 Introduction. For Quartus Prime 15.1

HCF40193B PRESETTABLE UP/DOWN COUNTERS (DUAL CLOCK WITH RESET) BINARY TYPE

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS150, Spring 2011

MC-ACT-DVBMOD April 23, Digital Video Broadcast Modulator Datasheet v1.2. Product Summary

(12) Patent Application Publication (10) Pub. No.: US 2006/ A1

SMPTE 292M EG-1 Color Bar Generation, RP 198 Pathological Generation, Grey Pattern Generation IP Core - AN4088

DM Segment Decoder Driver Latch with Constant Current Source Outputs

LogiCORE IP AXI Video Direct Memory Access v5.01.a

Block Diagram. dw*3 pixin (RGB) pixin_vsync pixin_hsync pixin_val pixin_rdy. clk_a. clk_b. h_s, h_bp, h_fp, h_disp, h_line

Sub-LVDS-to-Parallel Sensor Bridge

SignalTap Plus System Analyzer

Design and FPGA Implementation of 100Gbit/s Scrambler Architectures for OTN Protocol Chethan Kumar M 1, Praveen Kumar Y G 2, Dr. M. Z. Kurian 3.

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Chapter 2. Digital Circuits

Application Note. RTC Binary Counter An Introduction AN-CM-253

SignalTap Analysis in the Quartus II Software Version 2.0

Multi-Media Card (MMC) DLL Tuning

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

CHAPTER 6 ASYNCHRONOUS QUASI DELAY INSENSITIVE TEMPLATES (QDI) BASED VITERBI DECODER

Review of digital electronics. Storage units Sequential circuits Counters Shifters

LUT Optimization for Memory Based Computation using Modified OMS Technique

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

DO NOT COPY DO NOT COPY

DC Ultra. Concurrent Timing, Area, Power and Test Optimization. Overview

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

Using the Quartus II Chip Editor

Main Design Project. The Counter. Introduction. Macros. Procedure

ECT 224: Digital Computer Fundamentals Digital Circuit Simulation & Timing Analysis

DIGITAL FUNDAMENTALS


Static Timing Analysis for Nanometer Designs

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

Laboratory Exercise 7

Radar Signal Processing Final Report Spring Semester 2017

Transcription:

APPLICATION NOTE 0 R Designing Flexible, Fast CAMs with Virtex Family FPGAs XAPP203, September 23, 999 (Version.) 0 8* Application Note: Jean-Louis Brelet & Bernie New Summary Content Addressable Memories (CAM) allow a fast search for specific data in a memory. Each application has different CAM requirements. A CAM design implemented in Virtex Family slices offers a flexible approach to CAM depth and width based upon LUTs configured as Shift Registers. This application note describes a fast CAM design finding a match in a single clock cycle. The application note XAPP20 An overview of Multiple CAM designs in Virtex Family devices discusses the diverse solutions available when implementing CAM and introduces the specific solution described in this application note. Xilinx Family Virtex and Virtex -E FPGAs Introduction The application note XAPP20 covers the basic differences between a CAM versus a RAM along with comparing the density and performance of three CAM design solutions in Virtex Family devices. A CAM allows a concurrent search of input data into the memory. This is the main advantage of a CAM over a RAM. The CAM outputs the corresponding address when a match is found. This application note introduces a methodology for designing flexible, small to medium size CAMs, in Virtex or Virtex-E slices. By using shift register primitives built into a Virtex slice, a reconfigurable LUT (two LUTs per slice) is used to implement a single clock cycle read CAM. A -bit CAM word fits into each LUT. A 32-word by 6-bit CAM would require 28 LUTs. The write operation uses the shift register mode and requires 6 clock cycles. General Description Four input AND gates with optional inverters fit in a LUT and are cascadable through the dedicated carry-chain. Each Virtex slice has two LUTs and a fast carry-chain. A column of slices is a high performance decoder using the carry-chain to AND-wire each LUT output. The read operation is equivalent to decoding the input data through the LUT and the carry-chain. The number of slices per column is dependent on the Virtex Family device. This slice column (or a partial column) is at the same time a comparator and a storage location for a CAM word when the LUTs are reconfigurable. The shift register mode (SRL6E primitive) is used in each LUT to allow a write operation into the decoder. Several slices columns are equivalent to an array of CAM words. The number of columns also depends upon the Virtex Family device. The designer can easily find the correct Virtex or Virtex-E device to implement a particular CAM size. The input data bus is distributed to each single word or LUT through the high performance routing capabilities of Virtex Family devices. A 32 word by 6-bit CAM has 6 high fanout nets of 32 end-points. Design Overview The reference design described in this application note has an adjustable word width and depth. The output of the basic CAM module is a decoded (or one-hot ) address. Often the critical timing parameter is the access time to the CAM during a match operation. This design provides a single clock cycle decoded address as fast as 7.5 ns in a Virtex Family device (-6 speed grade). A decoded address is defined as one line per memory location. The number of output lines is the number of words in the CAM. If an output is high, the corresponding word matches the input data. This reference design also proposes an encoding module to generate the output address. Because of the hierarchical VHDL code structure, it is easy to use this module for various CAM sizes according to the designers need. Usually the encoder requires only one additional clock cycle to generate both the output address and a match flag. A wide OR gate of all the decoded addresses creates this match flag. XAPP203, September 23, 999 (Version.) www.xilinx.com

Reconfigurable 8-bit Word Comparator SRL6 -bit Compare D A[0:3] Q 8 MSB LUT SRL6 LSB -bit Compare D A[0:3] Q Counter LUT Figure : 8-bit CAM Word Write Operation (6 Clock Cycles) Virtex Slice x203_0_082099 Write Operation The Shift Register mode is used to store new data in a location. 6 clock cycles shift the result of the comparison between the input data to be written and a -bit down counter (6 states). If the counter value equals the input data value then a "" is shifted into the SRL6E primitive. Otherwise, a "0" is shifted in. The result is a -bit decoder in each LUT after the 6 clock cycles. Figure is an 8-bit CAM word write operation. Read Operation The input data to be compared is used as an address of the Shift Register. Only one out of the 6 locations in the SRL6E has a "" corresponding to the data stored previously. If the input data addresses this location, a match is found. The carry-chain will propagate this "" (wide AND configuration) and if all the SRL6E in a particular slice column output a "", a match is found. The global output of the carry-chain is one line of the CAM decoded address. Reconfigurable 8-bit Word Comparator SRL6 D Q Muxcy D Q MATCH_SIGNAL 8 MSB A[0:3] LUT SRL6 LSB D A[0:3] Q Muxcy "" LUT Wide AND Virtex Slice x203_02_082099 Figure 2: 8-bit CAM Word Read Operation (One Clock Cycle) 2 www.xilinx.com XAPP203, September 23, 999 (Version.)

Designing a CAM in Virtex Family SRL6E Primitives When using this application note, along with the reference design file XAPP203.zip, the designer will be able to produce fast, flexible CAMs using Virtex or Virtex-E slices. The first example of a CAM design in Virtex Family devices is illustrated in the hierarchical HDL reference desig. See Appendix A page. Features: - High performance one read clock cycle or match access time. - 6 write clock cycles. - Generic word_width from four bits up to any multiple by four bit value, only limited by the number of slices in a column in a particular Virtex Family device. As an example, a XCV50 has 6 slices per column or 32 LUT allowing implementation up to a 28-bit word. A XCV300 has 32 slices per column or 6 LUT, implementing up to a 256-bit word. - Generic nb_cam_6words defining the number of basic 6 word blocks. The CAM depth is a multiple by 6 word value. The smallest required Virtex Family device depends on both the word width and the depth. Each LUT implements a four bit basic block CAM. - Generic addr_width defining the number of address lines directly tied to the nb_cam_6words. Some examples would be a 32-word CAM requiring five address lines, a 6-word CAM requiring six address lines, or a 28-word CAM requiring seven address lines and onward. Basic building block: CAM_SRL6 The fast match CAM implementation is composed of a shift register SRL6E to store and compare four CAM bits and the associated carry-chain MUXCY, used in building a wide AND gate by cascading this basic block. The generic word width is a multiple of four (each LUT contains bits). A word width of 8 bits requires one Virtex slice (2 x SRL6E and 2 x MUXCY), a word width of 6 requires two Virtex slices, 32 requires four, 6 requires eight,... and so on. CAM_SRL6 ( Word) MATCH_RST COMPARE_BUS Generic: (word_width/) Generic: (word_width) (Used in Read Mode) (Used in Write Mode) SRL6_IN Bit 0 [3:0] SRL6E D A[0:3] Q CE -bit CAM S Muxcy Di Ci MATCH_OUT MATCH_IN FF D Q MATCH_WORD WRITE_ENABLE SRL6_IN Bit [7:] SRL6E D A[0:3] Q CE -bit CAM S Muxcy Di Ci MATCH_OUT MATCH_ENABLE x203_03_082099 Figure 3: 8-bit Word (CAM_SRL6) in One Virtex Slice (Cascadable) One main advantage of this approach is that the control logic is independent of the word width and the design hierarchy. A large word width (28 or more bits) has a low impact on performance because of the high performance Virtex carry-chain. The wide AND built on MUXCY is the only path which is variable with the word width. (Each four bits adds only a MUXCY delay). XAPP203, September 23, 999 (Version.) www.xilinx.com 3

Module: CAM_6WORDS Single CAM words are grouped in one 6 word module. A simple :6 decoder provides the WRITE_ENABLE of the selected CAM word in WRITE mode. Another module, COMPARE_ compares the input data to a four-bit counter and generates the COMPARE_BUS. The COMPARE_BUS is shifted into this CAM word (connected to the D input of the SRL6E). The 6 clock cycles write operation shifts this input value in the SRL6E to the right position. CAM_6WORDS DECODE_ BINARY_ 6 SELECT_WORD [5:0] (Used in Write Mode) ENABLE WRITE_ ENABLE WRITE_ENABLE (Generic: word_width) (Used in Read Mode) COMPARE_BUS (Generic: word_width/) (Used in Write Mode) MATCH_WORD _WORD _WORD MATCH_ENABLE (Used in Write Mode) 6 MATCH [5:0] 6 x WORDS Figure : CAM_6WORDS Block Diagram x203_0_082099 www.xilinx.com XAPP203, September 23, 999 (Version.)

Read Cycle Mode: In the read mode, the is compared in parallel to each single CAM word which generates a 6-bit MATCH bus. When using an 8-bit MATCH bus, for example, if the is found in WORD 2, the MATCH bus is "0000000" (decoded address). If no match is found the MATCH bus is "00000000". Some additional logic can be added to handle masks or multiple matches (A is found in more than one location). "... 00" MATCH_ENABLE MATCH "xxxx xxxx" "0000 000" R_MATCH_OK (Registered) R_MATCH_ "xxx" "00" (Registered) match_cycle encode_cycle MATCH_ENABLE (bus) () CAM_6WORDS MATCH (bus) ENCODE (bus) R_MATCH_ R_MATCH_OK x203_05_082099 Figure 5: CAM Read Mode Waveforms XAPP203, September 23, 999 (Version.) www.xilinx.com 5

Module: CAM_generic_word in Read Mode To build the desired CAM size, several CAM_6WORDS modules are instantiated in the CAM_generic_word module. The CAM depth is a generic value "nb_cam_6words" and should be a multiple by 6 words. A single CAM_6WORDS requires a -bit MATCH address output bus. The generic value "addr_width" corresponds to the number of CAM_6WORDS or the CAM depth. A 32-word CAM requires five address lines, a 6-word CAM requires six address lines,... CAM_generic_word (Read Mode) CAM_6WORDS (Generic: nb_cam_6words) (Generic: word_width) CAM_6WORDS_0 CAM_6WORDS 2 _X ENCODE LSB MATCH INST_0 BINARY_ 6 MATCH_OK MATCH INST_ BINARY_ 6 MATCH_OK MATCH INST_2 BINARY_ 6 MATCH_OK ENCODE_X_MSB _LSB_0 BINARY_ (0) MATCH LSB_ BINARY_ () MATCH_OK _LSB_2 BINARY_ (2) FF D Q D Q R_MATCH_ (Generic: addr_width) R_MATCH_OK MATCH_ENABLE MATCH_RST x (nb_cam_6words) x203_06_082099 Figure 6: CAM Read Path ( Clock Cycle) The MATCH busses (CAM_6WORDS outputs) are encoded to generate both the match address output MATCH_ and a MATCH_OK signal (High when a match is found). 6 www.xilinx.com XAPP203, September 23, 999 (Version.)

Write Cycle: A WRITE_ENABLE signal starts a -bit counter ("" down to "0000") and the write enable signal WRITE_SRL6 remains asserted for 6 clock cycles. Each counter value is compared to each -bit bus (data to be written) in parallel. The COMPARE output is connected to each D input of the SRL6E array. WRITE_ENABLE "... 0" DATA_CNT "" "0" "0" "..." COMPARE_BUS(0) "0" "" "0" "0" WRITE_SRL6 6 Clock Cycles shift "0" shift "0" shift "00" shift "000" CAM_6WORDS DECODE WRITE_ENABLE COUNTER_6 WRITE_SRL6 DATA_CNT WRITE_ENABLE COMPARE COMPARE_BUS [3:0] x20_07_082099 Figure 7: CAM Write Mode Waveforms When a particular (-bit) equals the counter value, a "" is shifted, otherwise a "0" is shifted in the SRL6E of the selected CAM word. A standard address decoder selects the CAM word to be written (like in a standard RAM memory). If the -bit value is "0", then a 0 is shifted in at the first clock cycle shift, a "" is shifted in at the second clock cycle, a "0" is shifted in at the remaining clock cycles. The resulting SRL6E content is "000000000000000". In the Read mode, when the bus is connected to A0:A3 inputs of this SRL6E, only the pattern A(3:0) = 0 will yield a (match). In the Read mode, the SRL6E output is asynchronous, equivalent to that of a LUT. XAPP203, September 23, 999 (Version.) www.xilinx.com 7

Module CAM_generic_word (Write Mode) The write mode part of this module instantiates a single counter and a single comparator (COMPARE_ x "word_width/") for the complete design. A standard top level address decoder generates the select bus WRITE_ENABLE of each CAM_6WORDS. CAM_generic_word (Write Mode) (Generic: addr_width) (addr_width - ) DECODE_X BINARY_ BUS_WRITE_ENABLE (Generic: nb_cam_6words) WRITE_ENABLE MATCH_RST (Generic: word_width) COUNTER_6 [3:0] [7:] WRITE_SRL6 COMPARE_ INST_0 DATA_2 COMPARE_OUT DATA_ INST_0 DATA_2 ENABLE COMPARE_OUT DATA_ (3:0) WRITE_ ENABLE CAM_6WORDS_0 CAM_6WORDS_ CAM_6WORDS_2 COMPARE_BUS [:8] INST_0 DATA_2 COMPARE_OUT DATA_ COMPARE_BUS (Generic: word_width/) CAM_6WORDS_X (Generic: nb_cam_6words) Figure 8: CAM Write Path (6 Clock Cycles to Count from 5 Down to 0) x203_08_082099 8 www.xilinx.com XAPP203, September 23, 999 (Version.)

Module: CAM_top This module is a top level wrapper of the generic CAM. It registers all input and output signals. CAM_Top I_ (Generic: word_width) I_ (Generic: addr_width) WRITE_ENABLE I_MATCH_ENABLE FF FF FF CAM_generic_word (Generic: nb_cam_6 words) WRITE_ENABLE MATCH_ENABLE MATCH_ MATCH_OK _VALID FF FF FF 0_MATCH_ (Generic: addr_width) 0_MATCH_OK 0 VALID (optional) MATCH_RST (optional) MATCH_RST I_ BUFGDLL (Optional) DLL GLOBAL_RST Global Asynchronous Reset Figure 9: CAM Design Top Level Block Diagram x203_09_082099 Pinout: (all I_XXX signals are inputs, O_XXX are outputs) - I_ is the generic data bus used by both read and write operations - I_ is the generic input address bus used to write only a new data into a selected location. - WRITE_ENABLE is a one clock cycle signal to enable the 6 clock cycles write operation (active High). - I_MATCH_ENABLE enables a read access (active High). - MATCH_RST is a synchronous reset. It does not change the CAM content. (optional) - I_ is the clock. As an option, It can be routed through a DLL. - O_MATCH_ is the generic output address valid only in read mode. - O_MATCH_OK is High when a match is found (read operation). - O VALID is an optional signal when multiple matches can occur. Active High if a single match occurred. A recommendation when synthesizing this reference design is to keep the hierarchy for eventual floor planning and to facilitate static timing analysis. A constraint file (UCF) should define the clock period. Because of the high fanout nets, the UCF file also constrains the following nets. The bus and the internal output of the COMPARE_ module of the COMPARE_BUS are two busses where each line has a fanout equivalent to the CAM depth or more. For optimal performance, simple UCF constraints similar to the following example automatically constrain each line. NET <*> MAXDELAY = 3ns; NET CAM_generic_word_/COMPARE_BUS<*> MAXDELAY = 3ns The reference design adjoining this application note can easily be adapted into different CAM modes. XAPP203, September 23, 999 (Version.) www.xilinx.com 9

Conclusion Virtex and Virtex-E SRL6E based implementations are convenient for small to large word width with a minor impact on the performances. Each additional four-bit width adds one carry-chain MUXCY delay. The design structure remains identical. The only limitation to the word width, if any, is the number of slices per column of the Virtex Family device. However eight bits per slice allows very wide words. The Virtex XCV50 and the XCV50E have 6 slices per column, the XCV000 and the XCV000E have 6 slices per column, and the XCV3200E has 0 slices per column. The CAM depth is also expandable (number of slices column) providing a real flexibility. All the decoded addresses or match bus are generated in a single clock cycle independently from the CAM size. The reference design proposes an address encoder and match flag generation in gates or in 3-state buffers. These options are open to the designer according to the final CAM implementation. Because there are various application needs, there are diverse approaches to CAM solutions. The unique Virtex Family features are key advantages to providing these flexible solutions. In addition to the design presented in this application note, XAPP202 "Content Addressable Memory (CAM) in ATM Applications" and XAPP20 Using Block SelectRAM+ for High-Performance Read/Write CAMs offer complementary solutions. 0 www.xilinx.com XAPP203, September 23, 999 (Version.)

APPENDIX A: Synthesizable HDL code Reference Design This appendix describes a hierarchical, synthesizable design implementing a parametric word width and memory depth, CAM in Virtex slices. The complete HDL code is available as a reference design (File: xapp203.zip or xapp203.tar.z). The header of each VHDL module is listed below: Module: CAM_top.vhd Module: CAM_Top / Top Level Design: CAM_Top VHDL code: Hierarchical wrapper Instantiated CAM_generic_word (variable depth and word width) Synthesis Synopsys FPGA Express ver. 3.2 - Option = Preserve Hierarchy Use of "pragma synthesis_off/on" and attributes Description: Instantiated a CAM implementation Registered inputs and outputs (CAM internal timing analysis) Device: Virtex Families (Virtex and Virtex-E) Created by: Jean-Louis BRELET / XILINX - Virtex Applications Date: July 23, 999 Version:.0 History:. Disclaimer: THESE DESIGNS ARE PROVIDED "AS IS" WITH NO WARRANTY WHATSOEVER AND XILINX SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR AGAINST INFRINGEMENT. Copyright (c) 999 Xilinx, Inc. All rights reserved. Module: CAM_generic_word.vhd Module: CAM_generic_word Design: CAM_Top VHDL code: Hierarchical RTL Instantiated COUNT_6 Instantiated COMPARE_ Instantiated CAM_6WORDS Instantiated DECODE_ Instantiated CAM_SRL6 Instantiated INIT_SRL6_AND Instantiated ENCODE LSB Instantiated DECODE_X Instantiated ENCODE_X_MSB Choose the right ENCODE and DECODE modules according to the number of CAM_6WORDS If "nb_cam_6words" = 2 then ENCODE MSB and DECODE_ must be used: bit to decode 2 CAM_6WORDS If "nb_cam_6words" = then ENCODE_2_MSB and DECODE_2 must be used: XAPP203, September 23, 999 (Version.) www.xilinx.com

2 bits to decode CAM_6WORDS If "nb_cam_6words" = 8 then ENCODE_3_MSB and DECODE_3 must be used: 3 bits to decode 8 CAM_6WORDS If "nb_cam_6words" = 6 then ENCODE MSB and DECODE_ must be used: bits to decode 6 CAM_6WORDS Note: synthesis tools do not support Configuration Synthesis Synopsys FPGA Express ver. 3.2 - Option = Preserve Hierarchy Use of "pragma synthesis_off/on" and attributes Description: Instantiated "nb_cam_6words" CAM_6WORDS (see generic) 2 x 6 words depth x 8 bits width by default clock cycle Read (or Match), 6 clock cycles Write MATCH_OK indicates one or more matches is/are found. MATCH_ output the address of the match, if ONLY ONE is found _VALID indicates when MATCH_ is a valid address (Optional) Device: Virtex Families modules CAM_6WORDS fits in Virtex slices column ( CAM bits per LUT + global control logic) If "nb_cam_6words" = 2 then CAM32xWORD If "nb_cam_6words" = then CAM6xWORD If "nb_cam_6words" = 8 then CAM28xWORD If "nb_cam_6words" = 6 then CAM256xWORD... Module: COUNT_6.vhd Module: COUNT_6 Design: CAM_Top VHDL code: RTL Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: bits counter 5 downto 0 Generate a 6 clock cycle wide enable signal Device: Virtex Families... 2 www.xilinx.com XAPP203, September 23, 999 (Version.)

Module COMPARE_.vhd: Module: COMPARE_ Design: CAM_Top VHDL code: Virtex primitives' instantiation Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Basic building block of a CAM to compare 2 x bits busses Combinatorial module Device: Virtex Families Gates and MUXF5 fitting in Logic Cell.... Module: CAM_6WORDS.vhd Module: CAM_6WORDS Design: CAM_Top VHDL code: Hierarchical RTL Instantiated DECODE_ Instantiated CAM_SRL6 Instantiated INIT_SRL6_AND Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Building block of a CAM 6 words (variable word width) word depth x "word_width" bits width clock cycle Read (or Match), 6 clock cycles Write If NO match is found, or MATCH_ENABLE is low, the output MATCH = '0000000000000000' Initialized SRL6E in low level module Device: Virtex Families... XAPP203, September 23, 999 (Version.) www.xilinx.com 3

Module: CAM_SRL6.vhd Module: CAM_SRL6 Design: CAM_Top VHDL code: Hierarchical RTL Instantiated INIT_SRL6_AND Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Basic building block of a CAM using 6-Bit Shift Register LUT word depth x "word_width" bits width clock cycle Read (or Match), 6 clock cycles Write If NO match is found, or MATCH_ENABLE is low, the output MATCH_WORD = '0' Initialized SRL6E in low level module Device: Virtex Families... Module: INIT_SRL6_AND.vhd Module: INIT_SRL6_AND Design: CAM_Top VHDL code: Virtex primitives' instantiation Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Basic building block of a CAM using 6-Bit Shift Register LUT bits per LUT Asynchronous Read (or Match) by -> MATCH_OUT Initialized SRL6E: attributes to constraint PAR and simulation Device: Virtex Families SRL6E and MUXCY... www.xilinx.com XAPP203, September 23, 999 (Version.)

Module: ENCODE LSB.vhd Module: ENCODE LSB Design: CAM_Top VHDL code: RTL / Combinatorial Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Encode a 6 bits binary address into bits and find if a match occurs if BINARY_ = "000000000000000" => MATCH_ = "00" / MATCH_OK = Optional _VALID = when only one Match (If simultaneous matches can occur) However, the _VALID generation double the size of the combinatorial logic! if no match found => MATCH_OK = 0 / _VALID = 0 (MATCH_ is not a valid address) if 2 or more matches found => MATCH_OK = / _VALID = 0 (MATCH_ is not valid address) Device: Virtex Families... Module: ENCODE MSB.vhd This module is available in one bit ENCODE MSB (CAM 32 words), two bits ENCODE_2_MSB (CAM 6 words), three bits ENCODE_3_MSB (CAM 28 words) and four bits ENCODE MSB (CAM 256 words). Additional modules for other CAM depths could be easily created following this model. Module: ENCODE MSB Design: CAM_Top VHDL code: RTL / Combinatorial Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Encode a 6 bits binary address into bits, map with the LSB address and find if a match occurs if BINARY_ = "000000000000000" => MATCH_ = "00" / MATCH_OK = Optional _VALID = when only one Match (If simultaneous matches can occur) However, the _VALID generation double the size of the combinatorial logic! if no match found => MATCH_OK = 0 / _VALID = 0 (MATCH_ is not a valid address) if 2 or more matches found => MATCH_OK = / _VALID = 0 (MATCH_ is not valid address) Choice between GATES ONLY implementation or BUFT implementation. (See comments) Note: synthesis tools do not support Configuration Device: Virtex Families... XAPP203, September 23, 999 (Version.) www.xilinx.com 5

Module: DECODE_.vhd This module is available in one bit DECODE_ (CAM 32 words), two bits DECODE_2 (CAM 6 words), three bits DECODE_3 (CAM 28 words) and four bits DECODE_ (CAM 256 words). Additional modules for other CAM depths could be easily created following this model. Module: DECODE_ Design: CAM_Top VHDL code: RTL / Combinatorial Synthesis Synopsys FPGA Express ver. 3.2 Use of "pragma synthesis_off/on" and attributes Description: Decode bits address into 6 binary bits Generate an ENABLE bus Device: Virtex Families... Similar modules ENCODE_3_MSB, ENCODE_2_MSB, ENCODE MSB, DECODE_, DECODE_3, DECODE_2, and DECODE_ are available in the reference design files. End of Appendix A. 6 www.xilinx.com XAPP203, September 23, 999 (Version.)

Revision History Date Revision Activity 8/3/99.0 Initial Release 9/23/99. Initial Virtex-E update The Programmable Logic Company SM Headquarters North America Europe Japan Xilinx, Inc. 200 Logic Drive San Jose, CA 952 U.S.A. Tel: (800) 255-7778 or (08) 559-7778 Fax: (08) 559-7 Net: hotline@xilinx.com Web: http://www.xilinx.com Irvine, California Tel: (99) 727-0780 Englewood, Colorado Tel: (303) 220-75 Sunnyvale, California Tel: (08) 25-9850 Schaumburg, Illinois Tel: (87) 605-972 Nashua, New Hampshire Tel: (603) 89-098 Raleigh, North Carolina Tel: (99) 86-3922 West Chester, Pennsylvania Tel: (60) 30-3300 Dallas, Texas Tel: (972) 960-03 Xilinx Sarl Jouy en Josas, France Tel: (33) -3-63-0-0 Net: frhelp@xilinx.com Xilinx GmbH München, Germany Tel: (9) 89-93088-0 Net: dlhelp@xilinx.com Xilinx, Ltd. Byfleet, United Kingdom Tel: () -932-390 Net: ukhelp@xilinx.com Xilinx, K.K. Tokyo, Japan Tel: (8) 3-3297-99 Net: jhotline@xilinx.com Asia Pacific Xilinx Asia Pacific Hong Kong Tel: (852) 22-5200 Net: hongkong@xilinx.com 999 Xilinx, Inc. All rights reserved. The Xilinx name and the Xilinx logo are registered trademarks, all XC-designated products are trademarks, and the Programmable Logic Company is a service mark of Xilinx, Inc. Other Xilinx registered and non-registered trademarks are as listed at http://www.xilinx.com/legal.htm. All other trademarks and registered trademarks are the property of their respective owners. Xilinx products are manufactured under one or more of the patents listed at http://www.xilinx.com/legal.htm. Xilinx, Inc. does not assume any liability arising out of the application or use of any product described herein; nor does it convey any license under its patents, copyrights, or maskwork rights or any rights of others. Xilinx., Inc. reserves the right to make changes, at any time, in order to improve reliability, function, or design and to supply the best product possible. Xilinx, Inc. cannot assume responsibility for the use of any circuitry described other than circuitry entirely embodied in its products. No other circuit patent licenses are implied. Xilinx, Inc. will not assume responsibility for any circuits shown nor represent that they are free from patent infringement or of any other third-party right. Xilinx,. Inc. assumes no obligation to correct any errors contained herein or to advise any user of this text of any correction if such be made. Xilinx, Inc. will not be liable for the accuracy or correctness of any engineering or software support or assistance provided to a user. XAPP203, September 23, 999 (Version.) www.xilinx.com 7