Intel IXP1200 manual CRC-32 Checker and Generator Microengines Soft-CRC

Page 28

IXP1200 Network Processor Family ATM OC-3/12/Ethernet IP Router Example Design

The hardware byte aligner operates on the data before the CRC computation hardware. This can be seen in the transfer to quadword 0 of the TFIFO element with sdram_crc[t_fifo_wr], mask_right with a byte alignment of 2 and a CRC mask value of 4.

Quadwords 1-5 are transferred with sdram_crc[t_fifo_wr, 5] with the same alignment. For quadword 6, the processing depends upon whether or not it is the last cell of a PDU:

If quadword 6 is not the last cell, it is transferred via sdram[t_fifo_wr], mask_left, then the syndrome is extracted for use when the next cell is sent on this VC.

If quadword 6 is the last cell, the syndrome is read after quadword 5 is finished, it is inverted and transferred viat_fifo_wr[] to quadword 6 from the microengine.

In all cases, after the cell is transferred and CRC is done, the first quadword is overwritten by the microengine to insert the ATM header on the front of the cell. As the TFIFO is addressable only as quadwords, the write will also update the first four bytes of cell payload (labeled LLC0 in the example diagram). To preserve these first four payload bytes, the microengine first reads them from DRAM and combines them with the ATM header before overwriting quadword0.

As with LLC0 in the ATM receiver, this design can be optimized to take advantage of that the constant LLC0 constitutes the first four bytes of payload on the first cell of a PDU (with the initial configuration, it is enabled by default):

#define CRC32_TX_LLC0

3.7CRC-32 Checker and Generator Microengines (Soft-CRC)

The CRC-32 microengine code, "Software CRC", is needed only for IXP1200 configurations. IXP1240 or IXP1250 designs employ sdram_crc[] hardware instructions to perform the same calculation more efficiently.

In IXP1200 configurations, there are two microengines dedicated to AAL5 CRC-32 calculations:

One consumes the ATM Receive data stream and checks the CRC-32 before routing to Ethernet Transmit packet-queues.

One consumes the Ethernet Receive data stream and generates CRC-32 before forwarding to the appropriate ATM Transmit queues.

3.7.1Functional Differences between Checker and Generator

There are four functional differences between the Checker and Generator:

DRAM data buffer payload alignment: depends on if it was received from ATM or Ethernet.

Queues to be consumed.

Queues to be supplied.

CRC-32 answer - the checker compares it to the received CRC, while the Generator writes it into the AAL5 trailer.

The source code is assembled into binaries optimal for Checking or Generating based on the microengine number assignments from system_config.h.

#define CRC_CHECKER (UENGINE_ID == CRC32_CHECKER_UENGINE) #define CRC_GENERATOR(UENGINE_ID == CRC32_GENERATOR_UENGINE)

28

Application Note

Modified on: 3/20/02,

Image 28
Contents IXP1200 Network Processor Family Application Note Contents Virtual Circuit Lookup Table Cache Limitations Figures Purpose of ATM Example Design IntroductionScope of Example Design Configuration Description BackgroundSupported / Not Implemented Functions Ethernet, IP and AAL5 Protocol ProcessingFrame and PDU Length vs. IP Packet Length SARExpected Ethernet Transmit Bandwidth Frame and PDU Length vs. IP Packet LengthExecution Environment SoftwareDeveloper’s Workbench ATM Data Stream Dialog Box System Programming Model System OverviewHardware StrongARM Core Software System Programming ModelSoftware Partitioning ATM TXLookup Tables ATM to Ethernet Data Flow Data FlowVC Lookup IP Lookup Table ATM to Ethernet Processing StepsStrongARM Core Initialization Ethernet to ATM Data FlowMicroengine Functional Blocks Microengine InitializationATM Receive Microengine StructureHigh Level Algorithm OC-12 Port OC-3 PortsATM Transmit Microengine ATM Transmit High Level AlgorithmIP-Router Microengine Ethernet Receive MicroengineEthernet Receive Structure Ethernet Transmit MicroengineEthernet Receive High Level Algorithm Ethernet Transmit Structure CRC-32 Calculations using IXP1240/1250 HardwareCRC-32 Hardware Checking on Receive Bytes Big Endian Diagram First Cell of a PDU in Rfifo and in DramCRC-32 Hardware Generation on Transmit Transmit AlignmentCRC-32 Checker and Generator Microengines Soft-CRC Functional Differences between Checker and GeneratorSoftware Subsystems & Data Structures Virtual Circuit Lookup Table atmvctable.ucCRC-32 Checker and Generator High Level Algorithm CRC-32 ComputationVctablehashed Structure Vctablelinear Structure Primary VC TableVC Table Management API atmutils.c VC Table EntryBuffer Offset Buffer Index Entry DescriptionCell data11 Entry Description VC Cache Function 1.1 OC-12 Configuration 1.2 OC-3 ConfigurationVirtual Circuit Lookup Table Cache VC Cache StructureIP Lookup Table VC Cache APIIP Table Function IP Table StructureIP Table Management API RoutetableinitMtuchange AtmrouteaddEnetrouteadd RtentinfoRoutedelete RthelpSram Buffer Descriptors and Dram Data Buffers 2 3 4 5 6 7 8Next BD Last Quad Queue Index Sram Buffer Descriptor FormatATM Header Entry Description Dram Data Buffer Format 2 3 4 5 6 7 8 Bytes2 3 4 Enet SrcAdrSequence Numbers sequence.uc System Limit on Packet BuffersSequencehandle Usage API Call DescriptionMessage Queues msgq.uc Usage ModelExample Step Sequence Operation Bakery Line AnalogyMsgqhandle Parameters MsgqinitqueueMsgqinitregs MsgqsendMsgqreceive Ramoption1.1 Features Feature DescriptionBuffer Descriptor Queues bdq.uc BDQ Management MacrosCounters CountGlobal Parameters Use of the Counter SubsystemCounter Base Address Counter IndexGlobal Counter Enable and Flags Counter Flags#define Statement Description Counter Group DescriptionCounterinc Counters.uc CounterresetPortcounterinc Portcounterinc Algorithm IntotaldiscardsCounters.c Countersinit CountersprintGlobal $transfer Register Name Manager xfer.uc AtmtxcrcbadbdMutex Vectors MutexvectorinitMutexvectorenter MutexvectorexitInter-Thread Signalling Project Configuration / Modifying the Example DesignProjectconfig.h Systemconfig.h Testing EnvironmentsSwitching Between Hardware Configurations Limitations Simulation Support Scripts, etcExtending the Example Design Document Conventions Acronyms & DefinitionsByte 10 11 12 13 14 15 16 ... BytesRelated Documents Title Description