US RE40684 E1 Abstract A CRC generation unit includes a number of CRC calculation assemblies to be selectively employed to incrementally calculate a CRC value for a first sequence of N data bytes. The calculation is iteratively performed, one iteration at a time. Further, the selection of the CRC calculation assemblies is made in accordance with the group size of each of a number of data word groups of the N data bytes. In one embodiment, the CRC calculation assemblies include a first assembly for incrementally calculate the CRC value for an iteration, whenever the group size is n/2 bytes or less for the iteration, and a second assembly for incrementally calculate the CRC value for an iteration, whenever the group size is more than n/2 bytes for the iteration. In one embodiment, the CRC generation unit is a shared resource to multiple network traffic flow processing units of a network traffic routing IC.
Claims(46) 1. An apparatus comprising:
a data word extractor to successively extract a first plurality of data word groups from a stream of input data, one data word group at a time, with each extracted data word group having a group size of at most n bytes, where n is an integer;
a plurality of CRC calculation assemblies coupled to the data word extractor to be selectively employed to incrementally calculate a CRC value for the first plurality of data word groups, the calculation being iteratively performed, one iteration at a time, and for each iteration, the selection of the CRC calculation assemblies being made in accordance with the group size of the data word group extracted for the iteration;
a plurality of storage elements correspondingly coupled to the plurality of CRC calculation assemblies to correspondingly store the results generated by the corresponding ones of the CRC calculation assemblies for one iteration of the calculation; and
a plurality of selectors coupled to the storage elements and the plurality of CRC calculation assemblies to selectively re-circulate one of the stored results back to the selected one of the CRC calculation assemblies for the next iteration of calculation, and to selectively output one of the stored results as the calculated CRC value at the end of the iterative calculation.
2. The apparatus of
3. The apparatus of
4. The apparatus of
5. The apparatus of
6. The apparatus of
7. The apparatus of
8. The apparatus of
9. The apparatus of
a first selector coupled to the storage elements and the plurality of CRC calculation assemblies to selectively re-circulate one of the stored results back to the selected one of the CRC calculation assemblies for the next iteration of calculation, and a second selector coupled to the first selector to cooperate with the first selector to selectively output one of the stored results as the calculated CRC value at the end of the iterative calculation.
10. The apparatus of
11. The apparatus of
12. A method comprising:
successively extracting by a data word extractor a first plurality of data word groups from a stream of input data, one data word group at a time, with each extracted data word group having a group size of at most n bytes, where n is an integer;
selectively employing a plurality of CRC calculation assemblies coupled to the data word extractor to incrementally calculate a CRC value for the first plurality of data word groups, with the calculation being iteratively performed, one iteration at a time, and for each iteration, selecting the CRC calculation assemblies in accordance with the group size of the data word group extracted for the iteration;
correspondingly storing the results generated by the plurality of CRC calculation assemblies for one iteration of the iterative calculation into a plurality of storage elements; and
selectively re-circulating one of the stored results back to the selected one of the CRC calculation assemblies for the next iteration of calculation, and selectively outputting one of the stored results as the calculated CRC value at the end of the iterative calculation.
13. The method of
14. The method of
15. The method of
16. The method of
17. The method of
18. The method of
19. The method of
20. An apparatus comprising:
a plurality of processing units to correspondingly process a plurality of network traffic flows; and
a shared CRC generation block coupled to the processing units to alternatively generate a CRC value for a data block of a selected one of the network traffic flows, the shared CRC generation block including at least one CRC generation unit to iteratively generate a first CRC value for the data block of the selected one of the network traffic flows, the at least one CRC generation unit including a plurality of CRC calculation assemblies to be selectively employed to incrementally calculate a CRC value for a first plurality of data word groups, the calculation being iteratively performed, one iteration at a time, and the selection of the CRC calculation assemblies for the various iterations being made in accordance with group sizes of extracted data word groups of the first plurality data words for the various iterations.
21. The apparatus of
22. The apparatus of
23. The apparatus of
24. The apparatus of
25. The apparatus of
26. The apparatus of
27. The apparatus of
28. An apparatus comprising:
a data word extractor to successively extract at least one data word group from a stream of input data, one data word group at a time, the extracted at least one data word group having a group size of at most n bytes, where n is an integer; a plurality of CRC calculation assemblies coupled to the data word extractor to be selectively employed to incrementally calculate a CRC value for the extracted at least one data word group, the calculation being iteratively performed, one iteration at a time, and for each iteration, the selection of the CRC calculation assemblies being made in accordance with the group size of the data word group extracted for the iteration; a plurality of storage elements correspondingly coupled to the plurality of CRC calculation assemblies to correspondingly store the results generated by the corresponding ones of the CRC calculation assemblies for at least one iteration of the calculation; and a plurality of selectors coupled to the storage elements and the plurality of CRC calculation assemblies to selectively re-circulate one of the stored results back to the selected one of the CRC calculation assemblies for a next iteration of calculation, and to selectively output one of the stored results as the calculated CRC value at the end of the iterative calculation. 29. The apparatus of
2 or less bytes for the iteration, where n is an even integer.30. The apparatus of
2 CRC calculators coupled to each other in a cascaded manner to be selectively employed in combination in at least some of the time to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of n/2 or less bytes for the iteration.31. The apparatus of
2 CRC calculators to be selectively employed exclusively to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of n/2 or less data bytes for the iteration.32. The apparatus of
2 bytes for the iteration.33. The apparatus of
2 CRC calculators to be selectively employed in combination at least some of the times to incrementally calculate the CRC value for said at least one data word group for an iteration, whenever the data word extractor extracts a data word group of more than n/2 bytes for the iteration.34. The apparatus of
2 CRC calculators to be selectively employed exclusively to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of more than n/2 bytes for the iteration.35. The apparatus of
2 or less bytes, where n is an even integer.36. The apparatus of
circulate one of the stored results back to the selected one of the CRC calculation assemblies for the next iteration of calculation, and a second selector coupled to the first selector to cooperate with the first selector to selectively output one of the stored results as the calculated CRC value at the end of the iterative calculation. 37. The apparatus of
8.38. The apparatus of
39. A method comprising:
successively extracting by a data word extractor at least one data word group from a stream of input data, one data word group at a time, the extracted at least one data word group having a group size of at most n bytes, where n is an integer; selectively employing a plurality of CRC calculation assemblies coupled to the data word extractor to incrementally calculate a CRC value for the extracted at least one data word group, with the calculation being iteratively performed, one iteration at a time, and for each iteration, selecting the CRC calculation assemblies in accordance with the group size of the data word group extracted for the iteration; correspondingly storing the results generated by the plurality of CRC calculation assemblies for one iteration of the iterative calculation into a plurality of storage elements; and selectively re-circulating one of the stored results back to the selected one of the CRC calculation assemblies for the next iteration of calculation, and selectively outputting one of the stored results as the calculated CRC value at the end of the iterative calculation. 40. The method of
2 or less bytes for the iteration, where n is an even integer.41. The method of
2 CRC calculators to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of n/2 or less bytes for the iteration.42. The method of
2 CRC calculators to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of n/2 or less data bytes for the iteration.43. The method of
2 bytes for the iteration.44. The method of
2 CRC calculators to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of more than n/2 bytes for the iteration.45. The method of
2 CRC calculators to incrementally calculate the CRC value for said extracted at least one data word group for an iteration, whenever the data word extractor extracts a data word group of more than n/2 bytes for the iteration.46. The method of
2 or less bytes for the iteration, where n is an even integer.Description 1. Field of the Invention The present invention relates to the field of data processing. More specifically, the present invention relates to high speed cyclic redundancy check (CRC) generation, having special application to high speed network traffic routing, such as Gigabit Ethernet packet switching. 2. Background Information Cyclic Redundancy Check (CRC) has long been employed as a metric to detect transmission errors. The technique is employed in a wide variety of data processing related disciplines, including in particular, networking. The underlying mathematics including the polynomial divisions involved in the generation of a CRC value for a data block is well understood among those ordinarily skilled in the art. Various hardware as well as software implementations are known. Examples of known hardware implementations include but are not limited to the implementations available from e.g. Actel of Sunnyvale, CA. With advances in integrated circuit, microprocessor, networking and communication technologies, increasing number of devices, in particular, digital computing devices, are being networked together. Devices are often first coupled to a local area network, such as an Ethernet based office/home network. In turn, the local area networks are interconnected together through wide area networks, such as SONET, ATM, or Frame Relay networks, and the like. Of particular notoriety is the TCP/IP based global inter-networks, Internet. As a result of this trend of increased connectivity, increasing number of applications that are network dependent are being deployed. Examples of these network dependent applications include but are not limited to, email, net based telephony, world wide web and various types of e-commerce. Successes of many of these content/service providers as well as commerce sites depend on high speed delivery of a large volume of data. As a result, high speed networking, which in turn translates into high speed CRC generation is needed. Unfortunately, the current generation of CRC generators known in the art are generally unable to meet the speed requirement of the next generation IC based high speed network traffic routing devices. For these IC based devices, it is not only necessary for the CRC generation resource to be sufficiently fast to keep pace with the processing of a single network traffic flow, it is further desirable that the CRC generation resource to be sufficiently efficient and fast, such that it can be shared among the various flow processing units, thereby eliminating the need to have dedicated CRC generation resource for-each of the flow processing units. Thus, a highly efficient approach to CRC generation is needed. A CRC generation unit includes a number of CRC calculation assemblies to be selectively employed to incrementally calculate a CRC value for a sequence of N data bytes. The calculation is iteratively performed, one iteration at a time. Further, the selection of the CRC calculation assemblies is made in accordance with the group size of each of a number of data word groups of the N data bytes. In one embodiment, the CRC calculation assemblies include a first assembly to incrementally calculate the CRC value for an iteration, whenever the group size for the iteration is n/2 bytes or less, and a second assembly to incrementally calculate the CRC value for an iteration, whenever the group size for the iteration is more than n/2 bytes. In one embodiment, the CRC generation unit is a shared resource to multiple network traffic flow processing units of a network traffic routing IC. In one embodiment, the network traffic routing device is disposed on a single integrated circuit. The present invention will be described by way of exemplary embodiments, but not limitations, illustrated in the accompanying drawings in which like references denote similar elements, and in which: In the following description, various aspects of the present invention will be described. However, it will be apparent to those skilled in the art that the present invention may be practiced with only some or all aspects of the present invention. For purposes of explanation, specific numbers, materials and configurations are set forth in order to provide a thorough understanding of the present invention. However, it will also be apparent to one skilled in the art that the present invention may be practiced without the specific details. In other instances, well known features are omitted or simplified in order not to obscure the present invention. Further, the description repeatedly uses the phrase “in one embodiment”, which ordinarily does not refer to the same embodiment, although it may. Referring now to Except for fast CRC generator Word extractor Selector The duplication of the CRC calculation resources for handling extract data word group with group sizes n/2 data bytes or less, advantageously enable the overlapping calculation of two CRC values for two successive series of data word groups. More specifically, it enables the current handling of the last data word group of a series of data words (e.g. a packet), and the first data word group of the next series of data words (e.g. the immediately following packet). [Note that it is impossible for both data word groups to have a group size of greater than n/2, and of course if one of the data word group has a group size greater than n/2, the group size of the other data word group necessarily is less than n/2. For the latter situation, no duplication of resources is necessary.] Before describing the particular embodiment of CRC generator Referring back to In other words, CRC calculation assembly Each CRC calculator In other words, CRC calculation assembly Similarly, each CRC calculator In other words, for the embodiment of Similar to For the illustrated embodiment, common/shared function units As a result, the amount of storage required for provisioning the CRC function for the various flows being processed in parallel is substantially reduced under the present invention. In turn, data routing device Thus, it can be seen from the above descriptions, a novel highly efficient method and apparatus for generating CRC for data blocks or data packets has been described. While the present invention has been described in terms of the above described embodiments, those skilled in the art will recognize that the invention is not limited to the embodiments described. The present invention can be practiced with modification and alteration within the spirit and scope of the appended claims. Thus, the description is to be regarded as illustrative instead of restrictive on the present invention. Patent Citations
Non-Patent Citations
Referenced by
Classifications
Legal Events
Rotate |