Patent ID: 7325081

Claim:
A method for protecting data as it passes between first and second protocols that use different block sizes or unblocked data, said method comprising: connecting a protocol interface device between a first device that uses the first protocol and a second device that uses the second protocol, and connecting a memory device to the protocol interface device; said protocol interface device including a cyclical redundancy code (CRC) engine; allocating a plurality of blocks of storage in a first memory in the memory device for storing a transfer length of unblocked data; receiving said data on a first port of said protocol interface device from the first device said first device determining said transfer length; said protocol interface device writing said data, as said data is received, to successive ones of said plurality of blocks until an end of said transfer length is reached, each one of said plurality of blocks having a length of 2 n , where n is a positive integer; when the CRC engine determines that an end one of said plurality of blocks that includes an end of said transfer length is not full of data, adding padding to said end one of said plurality of blocks until said end of said plurality of blocks is complete, wherein padding is added only to an end one of said plurality of blocks that includes an end of said transfer length until the end one of the plurality of blocks is complete; as said data is being written to each one of said plurality of blocks: calculating, by said CRC engine, a running cyclical redundancy code for each of said plurality of blocks by calculating an intermediate cyclical redundancy code after each byte of said data is written to each one of the plurality of blocks; after each intermediate cyclical redundancy code is calculated: storing, in a CRC memory that is included in the protocol interface device, said intermediate cyclical redundancy code along with information that identifies said first port, the CRC memory being separate from but connected to said CRC engine; when writing to each one of said plurality of blocks is completed, storing, for each one of said plurality of blocks, a final value of said running cyclical redundancy code that was calculated for each one of said plurality of blocks as a first cyclical redundancy code in a second memory in said memory device; and when said data is to be written to a second port of the protocol interface device: using said CRC engine to compute a second cyclical redundancy code for each of said plurality of blocks; comparing, using a comparator that is included in the protocol interface device and coupled to the CRC engine, said second cyclical redundancy code corresponding to a given block to said first cyclical redundancy code corresponding to said given block; and when said second cyclical redundancy code corresponding to the given block is equal to said first cyclical redundancy code corresponding to said given block, writing said given block to said second port.