35
R Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008

Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

  • Upload
    others

  • View
    45

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

R

Virtex-5 FPGACRC Wizard v1.3User Guide

UG189 (v1.4.1) March 24, 2008

Page 2: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com UG189 (v1.4.1) March 24, 2008

Xilinx is disclosing this user guide, manual, release note, and/or specification (the "Documentation") to you solely for use in the development of designs to operate with Xilinx hardware devices. You may not reproduce, distribute, republish, download, display, post, or transmit the Documentation in any form or by any means including, but not limited to, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Xilinx. Xilinx expressly disclaims any liability arising out of your use of the Documentation. Xilinx reserves the right, at its sole discretion, to change the Documentation without notice at any time. Xilinx assumes no obligation to correct any errors contained in the Documentation, or to advise you of any corrections or updates. Xilinx expressly disclaims any liability in connection with technical support or assistance that may be provided to you in connection with the Information.

THE DOCUMENTATION IS DISCLOSED TO YOU “AS-IS” WITH NO WARRANTY OF ANY KIND. XILINX MAKES NO OTHER WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING THE DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT OF THIRD-PARTY RIGHTS. IN NO EVENT WILL XILINX BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, EXEMPLARY, SPECIAL, OR INCIDENTAL DAMAGES, INCLUDING ANY LOSS OF DATA OR LOST PROFITS, ARISING FROM YOUR USE OF THE DOCUMENTATION.

© 2006–2008 Xilinx, Inc. All rights reserved.

XILINX, the Xilinx logo, the Brand Window, and other designated brands included herein are trademarks of Xilinx, Inc. All other trademarks are the property of their respective owners.

Revision History

The following table shows the revision history for this document.

.

Date Version Revision

11/30/06 1.1 Initial Xilinx release.

05/17/07 1.2 LogiCORE CRC Wizard v1.1 release.

10/10/07 1.3

LogiCORE CRC Wizard v1.2 release. Removed TX_ and RX_ prefix from TX CRC Module ports and RX_ prefix from RX CRC Module port names in text, figures, and tables throughout. Corrected other port names throughout. Updated Figure 3-1. Major updates to Chapter 5, “Example Design Overview.”

03/24/08 1.4

LogiCORE CRC Wizard v1.3 release. Revised installation instructions to comply with ISE 10.1 software procedure in Chapter 2, “Installation and Licensing.” Added “System Requirements,” page 15. Added ISE Simulator (ISim) instructions in “Using Testbench and Simulation Scripts,” page 26.

03/24/08 1.4.1 Minor non-technical edits.

R

Page 3: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 3UG189 (v1.4.1) March 24, 2008

Schedule of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Schedule of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Preface: About This GuideContents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Typographical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Online Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 1: IntroductionAbout the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Additional Wizard Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Technical Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Feedback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Virtex-5 FPGA CRC Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Chapter 2: Installation and LicensingSystem Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Installing the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Verifying Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Chapter 3: Customizing CRC WizardIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Using the IP Customizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

IP Customizer Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Chapter 4: Project Directory Structure

Chapter 5: Example Design OverviewExample Design Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Using Testbench and Simulation Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26The CRC Primitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Using CRC Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Table of Contents

Page 4: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

4 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

R

Example Module Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29TX_CRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Transmitting Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30TX_CRC Module Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Data Transfer through the TX_CRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

RX_CRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33RX_CRC Module Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Data Transfer through RX_CRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Page 5: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 5UG189 (v1.4.1) March 24, 2008

Chapter 1: IntroductionFigure 1-1: Typical CRC Block Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Chapter 2: Installation and LicensingFigure 2-1: CORE Generator Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Chapter 3: Customizing CRC WizardFigure 3-1: CRC Wizard IP Customizer Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Chapter 4: Project Directory Structure

Chapter 5: Example Design OverviewFigure 5-1: Example Design Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Figure 5-2: Normal CRC Operation (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Figure 5-3: Normal CRC Operation (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Figure 5-4: Byte Rotation and Bit Inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Figure 5-5: Example Module Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Figure 5-6: TX_CRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Figure 5-7: TX_CRC Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Figure 5-8: RX_CRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Figure 5-9: RX_CRC Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Schedule of Figures

Page 6: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

6 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

R

Page 7: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 7UG189 (v1.4.1) March 24, 2008

Chapter 1: Introduction

Chapter 2: Installation and Licensing

Chapter 3: Customizing CRC Wizard

Chapter 4: Project Directory Structure

Chapter 5: Example Design OverviewTable 5-1: Example Design Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Table 5-2: CRC_INIT Values for some Common Protocols . . . . . . . . . . . . . . . . . . . . . . . . . 28Table 5-3: TX_CRC Module Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Table 5-4: RX_CRC Module Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Schedule of Tables

Page 8: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

8 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

R

Page 9: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 9UG189 (v1.4.1) March 24, 2008

R

Preface

About This Guide

The Virtex-5 FPGA CRC Wizard v1.3 User Guide provides information about the LogiCORE™ IP Cyclic Redundancy Check (CRC) Wizard. This guide describes the function and operation of the CRC Wizard for the Virtex™-5 LXT, SXT, and FXT platforms.

ContentsThis manual contains the following chapters:

• Preface, “About this Guide” introduces the organization and purpose of this guide, a list of additional resources, and the conventions used in this document.

• Chapter 1, “Introduction” describes the core and provides related information, including recommended design experience, additional resources, technical support, and submitting feedback to Xilinx.

• Chapter 2, “Installation and Licensing” provides instructions for installing the CRC Wizard in the CORE Generator tool. It is not necessary to obtain a license to use the Wizard.

• Chapter 3, “Customizing CRC Wizard” describes how to customize a CRC Wizard core using the available parameters.

• Chapter 4, “Project Directory Structure” illustrates the layout of the file directory created by the CRC Wizard.

• Chapter 5, “Example Design Overview” describes the example design included with the CRC Wizard core, detailing the available ports and signals.

Additional ResourcesTo find additional documentation, see the Xilinx website at:

http://www.xilinx.com/literature.

To search the Answer Database of silicon, software, and IP questions and answers, or to create a technical support WebCase, see the Xilinx website at:

http://www.xilinx.com/support.

Page 10: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

10 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Preface: About This GuideR

ConventionsThis document uses the following conventions. An example illustrates each convention.

TypographicalThe following typographical conventions are used in this document:

Convention Meaning or Use Example

Courier fontMessages, prompts, and program files that the system displays

speed grade: - 100

Courier boldLiteral commands that you enter in a syntactical statement

ngdbuild design_name

Helvetica bold

Commands that you select from a menu

File → Open

Keyboard shortcuts Ctrl+C

Italic font References to other manualsSee the Development System Reference Guide for more information.

Emphasis in textIf a wire is drawn so that it overlaps the pin of a symbol, the two nets are not connected.

Square brackets [ ]

An optional entry or parameter. However, in bus specifications, such as bus[7:0], they are required.

ngdbuild [option_name] design_name

Braces { } A list of items from which you must choose one or more

lowpwr ={on|off}

Vertical bar | Separates items in a list of choices

lowpwr ={on|off}

Vertical ellipsis...

Repetitive material that has been omitted

IOB #1: Name = QOUT’ IOB #2: Name = CLKIN’...

Horizontal ellipsis . . . Repetitive material that has been omitted

allow block block_name loc1 loc2 ... locn;

Page 11: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 11UG189 (v1.4.1) March 24, 2008

ConventionsR

Online DocumentThe following conventions are used in this document:

Convention Meaning or Use Example

Blue textCross-reference link to a location in the current document

See the section “Additional Resources” for details.

Refer to “Title Formats” in Chapter 1 for details.

Red textCross-reference link to a location in another document

See Figure 2-5 in the Virtex-5 Platform FPGA User Guide.

Blue, underlined text Hyperlink to a website (URL)Go to http://www.xilinx.com for the latest speed files.

Page 12: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

12 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Preface: About This GuideR

Page 13: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 13UG189 (v1.4.1) March 24, 2008

R

Chapter 1

Introduction

This chapter introduces the Virtex-5 FPGA CRC Wizard core and provides related information, including recommended design experience, additional resources, technical support, and submitting feedback to Xilinx.

The Virtex-5 FPGA CRC Wizard is a CORE Generator™ tool designed to support both Verilog and VHDL design environments. In addition, the example design delivered with the core is provided in both Verilog and VHDL.

The Wizard generates customized cores that adapt the CRC block to a wide variety of applications.

The Wizard produces cores that instantiate properly configured CRC blocks for custom applications (see Figure 1-1).

About the WizardThe Virtex-5 FPGA CRC Wizard is a CORE Generator tool, available at the Xilinx IP Center. For information about system requirements, installation, and licensing options, see Chapter 2, “Installation and Licensing.”

Additional Wizard ResourcesFor detailed information and updates about the Virtex-5 FPGA CRC Wizard core, see the following documents located at Xilinx IP Center Page.

• DS589: Virtex-5 FPGA CRC Wizard v1.3 Data Sheet

• Virtex-5 FPGA CRC Wizard Release Notes

X-Ref Target - Figure 1-1

Figure 1-1: Typical CRC Block Application

DATA_US[d-1:0]

REM_US[p:0]

SOF_N_US

EOF_N_US

SRC_RDY_N_US

DST_RDY_N_US

UserLogic

DATA_DS[d-1:0]

REM_DS[p:0]

SOF_N_DS

EOF_N_DS

SRC_RDY_N_DS

DST_RDY_N_DS

CRCBlock

TargetProtocol

UG189_01_01_082907

Page 14: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

14 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 1: IntroductionR

Technical SupportFor technical support, go to www.xilinx.com/support. Questions are routed to a team with expertise using the Virtex-5 FPGA CRC Wizard.

Xilinx provides technical support for use of this product as described in the Virtex-5 FPGA CRC Wizard v1.3 User Guide. Xilinx cannot guarantee timing, functionality, or support of this product for designs that do not follow these guidelines.

FeedbackXilinx welcomes comments and suggestions about the Virtex-5 FPGA CRC Wizard and the accompanying documentation.

Virtex-5 FPGA CRC WizardFor comments or suggestions about the Virtex-5 FPGA CRC Wizard, submit a WebCase from www.xilinx.com/support. Be sure to include the following information:

• Product name

• Wizard version number

• List of parameter settings

• Explanation of your comments, including whether the case is requesting an enhancement (you believe something could be improved) or reporting a defect (you believe something isn’t working correctly).

DocumentFor comments or suggestions about the Virtex-5 FPGA CRC Wizard, please submit a WebCase from www.xilinx.com/support. Be sure to include the following information:

• Document title

• Document number

• Document revision number

• Page number(s) to which your comments refer

• Explanation of your comments, including whether the case is requesting an enhancement (you believe something could be improved) or reporting a defect (you believe something isn’t documented correctly).

Page 15: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 15UG189 (v1.4.1) March 24, 2008

R

Chapter 2

Installation and Licensing

This chapter provides instructions for installing the Virtex-5 FPGA CRC Wizard in the CORE Generator tool. It is not necessary to obtain a license to use the Wizard.

System Requirements

Windows

• Windows XP® Professional 32-bit/64-bit• Windows Vista® Business 32-bit/64-bit

Linux

• Red Hat® Enterprise Linux WS v4.0 32-bit/64-bit• Red Hat® Enterprise Desktop v5.0 32-bit/64-bit

(with Workstation Option)• SUSE Linux Enterprise (SLE) v10.1 32-bit/64-bit

Tools

• ISE™ v10.1• Mentor Graphics® ModelSim®: v6.3c • Cadence® IUS v6.1• Synopsys® vcs_mxY-2006.06-SP1

Check the release notes for the required Service Pack; ISE Service Packs can be downloaded from www.xilinx.com/support/download.htm.

Before You BeginBefore installing the Wizard, you must have a MySupport account and the ISE 10.1 software installed on your system. If you have already completed these steps, go to “Verifying Your Installation,” page 16, otherwise do the following:

1. Click Login at the top of the Xilinx home page then follow the onscreen instructions to create a MySupport account.

2. Install the ISE 10.1 software. For the software installation instructions, refer to the ISE 10.1 Design Suite Release Notes and Installation Guide available in ISE Documentation at http://www.xilinx.com/support.

Page 16: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

16 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 2: Installation and LicensingR

Installing the WizardThe Virtex-5 FPGA CRC Wizard is included with the ISE 10.1 software. See “Before You Begin” for installation details.

Verifying Your InstallationUse the following procedure to verify that you have successfully installed the Virtex-5 FPGA CRC Wizard in the CORE Generator tool.

1. Start CORE Generator.

2. After creating a new LXT/SXT/FXT project or opening an existing one, the IP core functional categories appear at the left side of the window, as shown in Figure 2-1.

3. Click to expand or collapse the view of individual functional categories, or click the View by Name tab at the bottom of the list to see an alphabetical list of all cores in all categories.

4. To view specific versions of the cores, choose an option from the Show drop-down list at the top of the window:

a. Latest Versions. Display the latest versions of all cores.

b. All Versions. Display all versions of cores, including new cores and new versions of cores.

c. All Versions including Obsolete. Display all cores, including those scheduled to become obsolete.

X-Ref Target - Figure 2-1

Figure 2-1: CORE Generator Window

UG189_02_01_082907

Viewing Options

FunctionalCategories

Viewby

Name

Page 17: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 17UG189 (v1.4.1) March 24, 2008

Verifying Your InstallationR

5. Determine if the installation was successful by verifying that CRC Wizard appears at the following location in the Functional Categories list:/Communication & Networking/Error Correction

For additional assistance installing the IP Update, visit the Xilinx Support website at www.xilinx.com/support.

Page 18: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

18 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 2: Installation and LicensingR

Page 19: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 19UG189 (v1.4.1) March 24, 2008

R

Chapter 3

Customizing CRC Wizard

IntroductionThis chapter details the customization of parameters available to the user and how these parameters are specified within the IP Customizer interface.

Using the IP CustomizerThe CRC Wizard Customizer is presented when the user selects the Virtex-5 FPGA CRC Wizard in the CORE Generator tool. For help starting and using the tool, see CORE Generator Help, available in ISE documentation. Each numbered item in Figure 3-1, page 20 corresponds to a section that describes the purpose of the feature.

Page 20: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

20 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 3: Customizing CRC WizardR

IP Customizer PageFigure 3-1 shows the customizer page.

1. Component Name

Enter the top-level name for the core in this text box. Illegal names are highlighted in red until they are corrected. All files for the generated core are placed in a subdirectory using this name. The top-level module for the core also uses this name.

Default: crc_wizard_v1_3

2. Silicon Version

Select the respective silicon version for the target device.

• ES - Engineering sample

• PRODUCTION - Production silicon

Default: PRODUCTION

3. CRC Initial Value

The initial value loaded to the internal CRC registers for CRC calculation.

The value is:

• User programmable for production silicon

• Fixed to FFFFFFFF for LX30T and LX50T engineering samples

Default: FFFFFFFF

X-Ref Target - Figure 3-1

Figure 3-1: CRC Wizard IP Customizer PageUG189_03_01_010208

2

1

3

4

5

6

7

8

Page 21: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 21UG189 (v1.4.1) March 24, 2008

Using the IP CustomizerR

4. Data Width

Select the input data width from the user interface to CRC interface.

Default: 32

5. TranData

Transpose Input Data Bytes: If this option is set, each RX/TX_DATA byte is transposed before it is passed through the CRC calculator.

Default: Not checked

6. TranCRC

Transpose CRC Bytes: If this option is set, each byte of the CRC generated from the CRC generator is transposed.

Default: Not checked

7. CompData

Complement Input Data: Some protocols specify that each data byte should be complemented before it is passed through the CRC calculator. Selecting this allows the user to implement this feature.

Default: Not checked

8. CompCRC

Complement CRC Bytes: This feature is useful for protocols, such as Ethernet and Fibre Channel which require a final complementing of each of the CRC bytes.

Default: Not checked

Page 22: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

22 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 3: Customizing CRC WizardR

Page 23: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 23UG189 (v1.4.1) March 24, 2008

R

Chapter 4

Project Directory Structure

The customized CRC core is delivered as a set of HDL source modules in the selected language with supporting script and documentation files. These files are arranged in a predetermined directory structure under the project directory name provided to the CORE Generator system when the project is created, as shown below.

<top-level name>|___crc_wizard_readme.txt||___ug189.pdf (user guide)||___src| || |___(top-level source file)| |___(remaining CRC module source files)||___ucf| || |___crc_sample.ucf (crc sample design constraints)||___examples| || |___(crc_sample source file)| |___(remaining source files for submodules used in example design)| |___scripts| || |___(simulation script for modelsim and ISim)||___testbench | |___(testbench files for simulating crc_sample design)

Page 24: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

24 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 4: Project Directory StructureR

Page 25: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 25UG189 (v1.4.1) March 24, 2008

R

Chapter 5

Example Design Overview

Each customized CRC core includes a sample design that uses the core in a simple data transfer system. In the sample design, a frame generator is connected to the TX user interface, and a frame checker is connected to the RX user interface (Figure 5-1).

The FRAME GENERATOR block produces a constant stream of data for cores with a framing interface. The data from the FRAME GENERATOR block passes through the TX_CRC block and loops back to the RX_CRC block. The output from the RX_CRC block is passed to the FRAME CHECKER block, which verifies the incoming data and reports an error if the data received does not match the expected data.

When using the example design on a board, be sure to edit the crc_sample.ucf file in the ucf subdirectory to supply the correct pins and clock constraints. Also ensure that the location of the CRC hard block is specified if a particular position/tile is desired.

X-Ref Target - Figure 5-1

Figure 5-1: Example Design Block Diagram

UG189_05_01_082407

RX_CRC

TX_CRC

Parametersfrom the

GUI

UserApplication

UserApplication

CRC_InitData_WidthCompDataTranDataCompCRCTranCRC

Page 26: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

26 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 5: Example Design OverviewR

Example Design Ports

Using Testbench and Simulation ScriptsThe testbench environment consisting of a TX_CRC module looped back to RX_CRC module is included in the testbench subdirectory.

The simulation scripts are included in the scripts folder.

• For simulating with Modelsim, run the following command after setting up the Modelsim environment:

xilperl simulate_mti.pl

Additionally, the IP also provides simulation script for ISE Simulator (ISim).

• For simulating with ISim, run the following command after setting up the Xilinx environment:

xilperl simulate_isim.pl

The CRC PrimitiveEach CRC block computes a 32-bit CRC using the CRC-32 polynomial specified for PCI Express, Gigabit Ethernet, and other common protocols. The CRC-32 polynomial is:

CRC-32 Polynomial Equation 5-1

There are two primitives for instantiating CRC hard blocks. The 32-bit CRC primitive, CRC32, can process 8, 16, 24, or 32-bit input data and generates a 32-bit CRC. The 64-bit primitive, CRC64, can process 8, 16, 24, 32, 40, 56, or 64-bit input data and also generate a 32-bit CRC. Using the CRC64 primitive consumes both CRC hard blocks paired with a given transceiver tile.

Table 5-1: Example Design Ports

Port Direction Description

RESET Input Reset signal for the sample design.

ERROR_COUNT[0:7] OutputCount of the number of data words received by the frame checker that did not match the expected value.

CRC_PASS_FAIL_N OutputIndicates the CRC Calculation passed. This signal is to be considered only when CRC_VALID is asserted.

CRC_VALID Output Indicates the CRC is valid.

CLK Input Reference clock for the CRC core.

G X( ) X32 X26 X23 X22 X16 X12 X11 X10 X8 X7 X5 X4 X2 X 1+ + + + + + + + + + + + + +=

Page 27: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 27UG189 (v1.4.1) March 24, 2008

The CRC PrimitiveR

Using CRC BlocksFigure 5-2 and Figure 5-3 show a CRC block calculating the CRC for input data. In this figure, the CRC64 primitive is shown. This operation is performed when the CRC is being generated or checked.X-Ref Target - Figure 5-2

Figure 5-2: Normal CRC Operation (1 of 2)

X-Ref Target - Figure 5-3

Figure 5-3: Normal CRC Operation (2 of 2)

CRCCLK

CRCIN[63:0] D0 D1 D2

f(CRC(Prev,D1))

f(CRC(Prev,D2))

f(CRC(D0))

CRCOUT[31:0]

CRCRESET

CRCDATAVALID

CRCDATAWIDTH

Final CRC data comes one cycle after CRCDATAVALID.This is the CRC result for the frame.Notes:

1. Prev = CRCINTREG value from the previous cycle.2. f(x) = Bit Inverted and Byte Reversed x. UG189_05_02_082907

0

3’d7 3’d3

CRCCLK

CRCIN[63:0] D0 D1 D2

CRCOUT[31:0]

CRCRESET

CRCDATAVALID

CRCDATAWIDTH

Assert CRCRESET one CRCCLK cycle after CRCDATAVALID is deassserted to allow the final CRCto be available on CRCOUT.

UG189_05_03_082707

XX D3 D4

0

3’d7 3’d3 XX 3’d7

CRC

3’d1

0 CRC

Page 28: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

28 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 5: Example Design OverviewR

At the start of each frame, CRCRESET must be applied to set the initial CRC value to CRC_INIT. CRC calculations are cumulative, so this step is required to start the CRC calculation at a known value. CRC_INIT is a 32-bit value used for the initial state of the CRC internal register. Its default value is 0xFFFFFFFF. The CRC_INIT value required for a given protocol is specified as part of that protocol's CRC algorithm. Table 5-2 shows the CRC_INIT values for some common protocols that use the CRC-32 polynomial.

Use of the CRC block is done by applying the first date byte(s) and a reset on the same clock cycle for the fastest throughput. If the fastest throughput is not required, the CRC module can be reset on any prior cycle as long as the CRCDATAVALID input is "0". If CRC32 is being used, the first or most significant byte will be applied to CRCIN[31:24]. The 2nd byte is applied to CRCIN[23:16]. Similarly, the 3rd byte is applied to CRCIN[15:8] and the 4th byte to CRCIN[7:0]. If CRC64 is being used, the same sequence applies. The first or most significant byte will be applied to CRCIN[63:56]. The 2nd byte is applied to CRCIN[55:48]. This continues to where the 8th byte is applied to CRCIN[7:0].

When applying the first byte(s) and a reset, inputs CRCDATAVALID and CRCDATAWIDTH must also be activated. Whenever valid input data is being applied to a CRC module, input CRCDATAVALID must be 1. It is possible to halt computation for a number of clock cycles by setting CRCDATAVALID to 0. CRCDATAWIDTH determines how many input bytes are valid. If only 1 byte is valid, CRCDATAVALID is set to 0. If 2 bytes are valid, CRCDATAVALID is set to 1. This sequence continues until either 3 for CRC32 or 7 for CRC64.

The CRC results will appear on the output CRCOUT[31:0] 1 clock cycle after the last valid data byte has been applied (Figure 5-2, page 27). No new data can be applied to the CRC block until at least 1 clock cycle after the last valid byte has been applied from a CRC computation (Figure 5-3, page 27). The valid CRC will only last until CRCRESET is applied. CRCOUT provides the bit-inverted, byte reversed version of the CRC output at the same time. Figure 5-4 shows an example of the Byte rotation and Bit inversion operations.

Table 5-2: CRC_INIT Values for some Common Protocols

Protocol CRC_INIT

Ethernet 32’hFFFF FFFF

PCI Express 32’hFFFF FFFF

Infiniband 32’hFFFF FFFF

Fibre Channel 32’hFFFF FFFF

Serial ATA 32’h5232 5032

Page 29: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 29UG189 (v1.4.1) March 24, 2008

Example Module UsageR

Example Module UsageFigure 5-5 shows an example of the CRC modules used with a framing protocol module.

The port names for the CRC Transmit and Receive modules have been divided into two parts: upstream and downstream. The upstream interface provides the data to the CRC modules, while the downstream interface receives data from the CRC modules. The interface signals are suffixed with _US for upstream and _DS for downstream.

The configurable CRC solution comprises two parts:

• “TX_CRC Module,” page 30 generates and inserts CRC on the transmit path

• “RX_CRC Module,” page 33 verifies the CRC on the receive path.

X-Ref Target - Figure 5-4

Figure 5-4: Byte Rotation and Bit Inversion

UG189_05_04_082907

CRCINTREG

Bytes Reversed

Bits Inverted

CRCOUT

47 8A A4 DA

E2 51 25 5B

1D AE DA A4

1D AE DA A4

X-Ref Target - Figure 5-5

Figure 5-5: Example Module Usage

DATA_US[d-1:0]

REM_US[p:0]

SOF_N_US

EOF_N_US

SRC_RDY_N_US

DST_RDY_N_US

UserLogic

DATA_DS[d-1:0]

REM_DS[p:0]

SOF_N_DS

EOF_N_DS

SRC_RDY_N_DS

DST_RDY_N_DS

CRCBlock

TargetProtocol

UG189_05_05_082907

Page 30: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

30 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 5: Example Design OverviewR

TX_CRC ModuleThe TX_CRC module has two LocalLink interfaces shown in Figure 5-6. The left side is the upstream interface, while the right side is the downstream interface. This module is both a LocalLink source and destination, which allows it to be inserted into the transmit path of the system. The module generates a CRC value from data input on the upstream interface. The module then inserts the CRC byte(s) at the end of the frame on the downstream interface.

DST_RDY_N_US can be used to pause the transfer of data from the upstream module. When the CRC word(s) are being inserted into the downstream interface, DST_RDY_N_US is de-asserted, indicating that the CRC module is not ready to accept new data. After the CRC word(s) have been inserted, DST_RDY_N_US is asserted.

Transmitting Data

LocalLink is a synchronous interface. The LocalLink-based CRC core samples the data on the interface only on the positive edge of CLK, and only on the cycles when both DST_RDY_N and SRC_RDY_N are asserted (low). When LocalLink signals are sampled, they are only considered valid if SRC_RDY_N is asserted. The user application can de-assert SRC_RDY_N on any clock cycle; this will cause the LocalLink based CRC core to ignore the LocalLink input for that cycle. If this occurs in the middle of a frame, idle symbols are sent through the core, which eventually result in an idle cycles during the frame when it is received at the RX user interface.

X-Ref Target - Figure 5-6

Figure 5-6: TX_CRC Module

DATA_US[d-1:0]

REM_US[p:0]

SOF_N_USEOF_N_US

RESET_NCLK

SRC_RDY_N_USDST_RDY_N_US

DATA_DS[d-1:0]

REM_DS[p:0]

SOF_N_DSEOF_N_DSSRC_RDY_N_DSDST_RDY_N_DS

CRC Block

UG189_05_06_082907

Page 31: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 31UG189 (v1.4.1) March 24, 2008

Example Module UsageR

TX_CRC Module Interface

The interface signals to the TX_CRC module are listed in Table 5-3.

Table 5-3: TX_CRC Module Interface Signals

Port DirectionActive Level

Description

RESET Input High Reset: The TX_CRC module is reset. The reset is synchronous to CLK.

CLK Input N/A Clock Input: All signals are synchronous to this clock.

Upstream LocalLink Interface

DATA_US[d-1:0]

(d=[width in bits])Input N/A

Data Bus: Packet data is transmitted across this bus. Bus width of 32 or 64 bits is selectable.

REM_US[p:0] (p=log2(d/8)-1)

Input N/A

Remainder: Indicates the byte offset of the last valid byte on the data bus for the last packet transfer. Remainder value is valid concurrent with end-of-frame assertions. The remainder is binary encoded.

If the data width (d) is 32-bits, then the remainder bus value (p) is 1 yielding a two-bit bus (REM_US[1:0]).

A remainder value of 0 indicates bytes [31:24] are valid, while a value of 3 indicates all bytes are valid.

SOF_N_US Input LowStart of Frame: Indicates the beginning of a frame transfer on the data bus. This signal is coincident with the first data word. This signal also indicates the start of calculation.

EOF_N_US Input Low End of Frame: Indicates the end of a frame transfer.

SRC_RDY_N_US Input Low Source Ready: Indicates data that is provided by the source interface on the data bus is valid during the current cycle.

DST_RDY_N_US Output Low Destination Ready: Indicates that the destination interface is ready to accept data presented to it on the data bus in the current cycle.

Downstream LocalLink Interface

DATA_DS[d-1:0]

(d=[width in bits])Output N/A

Data Bus: Packet data is transmitted across this bus. The CRC that is calculated over the entire frame is appended to the end of the frame.

REM_DS[p:0] Output N/ARemainder: Indicates the byte offset of the last valid byte on the data bus for the last packet transfer. Remainder value is valid concurrent with end-of-frame assertions. The remainder is binary encoded.

SOF_N_DS Output Low Start of Frame: Indicates the start of frame transfer.

EOF_N_DS Output Low End of Frame: Indicates the end of a frame transfer including the CRC.

SRC_RDY_N_DS Output LowSource Ready: Indicates data that is provided by the source interface on the data bus is valid during the current cycle.

DST_RDY_N_DS Input Low

Destination Ready: Indicates that the destination interface is ready to accept data presented to it on the data bus in the current cycle.

The DST_RDY_N_DS signal is passed through to the upstream interface without any latency.

Page 32: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

32 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 5: Example Design OverviewR

Data Transfer through the TX_CRC Module

Figure 5-7 shows the functional waveforms of the TX_CRC module. The calculation of the CRC starts on the assertion of the SOF_N_US signal on the upstream interface. The calculation is paused whenever SRC_RDY_N_US or DST_RDY_N_US is de-asserted and resumes when both are asserted.The IP handles variable REM feature. It appends CRC calculated at the end of frame and updates the REM value accordingly. For REM > 3, the CRC value is distributed over two clock cycles and sent over the downstream end.

There is a fixed latency between the upstream and downstream interface. For engineering sample version of device, the latency will increase between the upstream and downstream interface. The following waveform depicts the timing for a production device.The EOF_N_US signal terminates the calculation of the CRC. In Figure 5-7, the data width shown is 64 bits, while the CRC polynomial used is CRC32. The CRC packet is appended to the end of the packet. While the CRC bytes are being appended, the DST_RDY_N_US signal is de-asserted indicating that the CRC block is not ready to accept new data on the upstream interface. The waveform for TX_CRC considers a 64-bit framing interface with REM = 5. After CRC insertion at the end of data, REM value is updated for the downstream end.

X-Ref Target - Figure 5-7

Figure 5-7: TX_CRC Data Transfer

D1

5

D1 crc

CLK

DATA_US

SOF_N_US

EOF_N_US

REM_US

SRC_RDY_N_US

DST_RDY_N_US

DATA_DS

SOF_N_DS

EOF_N_DS

1REM_DS

SRC_RDY_N_DS

D2

D5,crc

D3 D4 D5

D2 D3 D4

Downstream signals

Upstream signals

UG189_05_07_082907

Page 33: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 33UG189 (v1.4.1) March 24, 2008

Example Module UsageR

RX_CRC ModuleThe RX_CRC module calculates the CRC on incoming data from the upstream LocalLink interface. It also passes the data through to its downstream LocalLink interface. The downstream interface includes two extra signals, CRC_PASS_FAIL_N and CRC_VALID. The CRC_PASS_FAIL_N signal indicates whether or not the frame contains a valid CRC.

This signal is valid only when CRC_VALID is asserted high. The interface of the RX_CRC module is shown in Figure 5-8.

RX_CRC Module Interface

The interface signals to the RX_CRC module are listed in the Table 5-4 below.

X-Ref Target - Figure 5-8

Figure 5-8: RX_CRC Module

CRC Block

CRC_PASS_FAIL_NCRC_VALID

DATA_DS[d-1:0]

REM_DS[p:0]

SOF_N_DSEOF_N_DSSRC_RDY_N_DSDST_RDY_N_DS

REM_US[p:0]

SOF_N_USEOF_N_US

SRC_RDY_N_USDST_RDY_N_US

RESET_NCLK

DATA_US[d-1:0]

UG189_05_08_082907

Table 5-4: RX_CRC Module Interface Signals

Port DirectionActive Level

Description

RESET Input High Reset: The TX_CRC module is reset. The reset is synchronous to CLK.

CLK Input N/A Clock Input: All signals are synchronous to this clock.

Upstream LocalLink Interface

DATA_US[d-1:0]

(d=[width in bits])Input N/A

Data Bus: Packet data is transmitted across this bus. Bus width of 32 or 64 bits is selectable.

REM_US[p:0] (p=log2(d/8)-1) Input N/A

Remainder: Indicates the byte offset of the last valid byte on the data bus for the last packet transfer. Remainder value is valid concurrent with end-of-frame assertions. The remainder is binary encoded.

If the data width (d) is 32-bits, then the remainder bus value (p) is 1 yielding a two-bit bus (REM_US[1:0]).

A remainder value of 0 indicates bytes [31:24] are valid, while a value of 3 indicates all bytes are valid. Current release assumes all data bytes to be valid.

SOF_N_US Input LowStart of Frame: Indicates the beginning of a frame transfer on the data bus. This signal is coincident with the first data word. This signal also indicates the start of calculation of the receive CRC.

EOF_N_US Input Low End of Frame: Indicates the end of a frame transfer on the data.

Page 34: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

34 www.xilinx.com Virtex-5 FPGA CRC Wizard v1.3 User GuideUG189 (v1.4.1) March 24, 2008

Chapter 5: Example Design OverviewR

SRC_RDY_N_US Input LowSource Ready: Indicates data that is provided by the source interface on the data bus is valid during the current cycle.

DST_RDY_N_US Output LowDestination Ready: Indicates that the destination interface is ready to accept data presented to it on the data bus in the current cycle.

Downstream LocalLink Interface

DATA_DS[d-1:0]

(d=[width in bits])Output N/A Data Bus: Packet data is transmitted across this bus.

REM_DS[p:0] Output N/ARemainder: Indicates the byte offset of the last valid byte on the data bus for the last packet transfer. Remainder value is valid concurrent with end-of-frame assertions. The remainder is binary encoded.

SOF_N_DS Output Low Start of Frame: Indicates the start of frame transfer.

EOF_N_DS Output Low End of Frame: Indicates the end of a frame transfer including the CRC.

SRC_RDY_N_DS Output LowSource Ready: Indicates data that is provided by the source interface on the data bus is valid during the current cycle.

DST_RDY_N_DS Input Low

Destination Ready: Indicates that the destination interface is ready to accept data presented to it on the data bus in the current cycle.

The DST_RDY_N_DS signal is passed through to the upstream interface without any latency.

Table 5-4: RX_CRC Module Interface Signals (Cont’d)

Port DirectionActive Level

Description

Page 35: Virtex-5 FPGA CRC Wizard v1.3 User Guide€¦ · Virtex-5 FPGA CRC Wizard v1.3 User Guide UG189 (v1.4.1) March 24, 2008 Xilinx is disclosing this user guide, manual, release note,

Virtex-5 FPGA CRC Wizard v1.3 User Guide www.xilinx.com 35UG189 (v1.4.1) March 24, 2008

Example Module UsageR

Data Transfer through RX_CRC Module

Figure 5-9 shows the data transfer through the RX_CRC module. The calculation of the CRC starts on the assertion of the SOF_N_US signal on the upstream interface. The CRC calculated for data at the receive end is compared with the CRC received from the transmit end. Latency is fixed between the upstream and downstream interface. In Figure 5-9, the CRC polynomial is CRC32. The user should note that the CRC is stripped by realigning the EOF_N_DS signal and REM_DS is adjusted to reflect the correct value. Figure 5-9 shows a packet that has passed the CRC verification. This is indicated by the CRC_PASS_FAIL_N signal, which is valid at the assertion of CRC_VALID.

X-Ref Target - Figure 5-9

Figure 5-9: RX_CRC Data Transfer

D1

5

D1 crc

CLK

DATA_US

SOF_N_US

EOF_N_US

REM_US

SRC_RDY_N_US

DST_RDY_N_US

DATA_DS

SOF_N_DS

EOF_N_DS

1

REM_DS

SRC_RDY_N_DS

D2

D5,crc

D3 D4 D5

D2 D3 D4

Downstream signals

Upstream signals

CRC_PASS_FAIL_N

CRC_VALIDUG189_05_09_082907