Method and system for protecting data in a PCI-Express device is provided.
The method includes adding error correction code (ECC) to every byte of
data that enters a PCI-Express Transaction Handler ("PTH") Module and is
destined for a host system memory or destined to another device, before
the data is aligned within the PTH module; verifying the ECC code for
every byte of the data before the data leaves the PTH module; and
generating the ECC code for a data block size, wherein the data block
size depends on the destination of the data.