Method for generating an internet protocol suite checksum in a single
macro instruction
    1.
    发明授权
    Method for generating an internet protocol suite checksum in a single macro instruction 失效
    在单个宏指令中生成互联网协议套件校验和的方法

    公开(公告)号:US5701316A

    公开(公告)日:1997-12-23

    申请号:US521695

    申请日:1995-08-31

    摘要: An Internet checksum for use by TCP/IP is generated in a single macro-instruction called a Block Add Octets instruction. Extraneous overhead of macro-instruction looping and bit masking is eliminated by combining checksum operations into a single macro-instruction using a block add approach. The programmer specifies the address in memory and the number of double-words of message data to be added together within a single instance of the Block Add Octets instruction so that looping and jump/branch instructions are not needed. The Block Add Octets instruction fetches all octets (8-bit data segments) contained in full double words from memory and adds them into the checksum. The method handles partial double words of data, full double words, and odd numbers of double words, whereby a double word consists of four octets. The checksum is calculated using one's complement arithmetic rather than two's complement, thereby increasing the speed of checksum calculation because the "end around carry" is eliminated. The number of octets that can be added to the checksum per processor cycle is greatly increased, thereby significantly improving overall TCP/IP performance.

    摘要翻译: 在一个名为Block Add Octets指令的宏指令中生成TCP / IP使用的Internet校验和。 通过使用块添加方法将校验和操作组合到单个宏指令中,消除了宏指令循环和位掩码的外部开销。 程序员在Block Add Octets指令的单个实例中指定内存中的地址和要添加在一起的消息数据的双字数,以便不需要循环和跳转/分支指令。 块添加八位字节指令从内存中获取包含在全双字中的所有八位字节(8位数据段),并将它们添加到校验和中。 该方法处理部分双字数据,全双字和奇数双字,由此双字由四个字节组成。 使用补码算术而不是二进制补码来计算校验和,从而增加校验和计算的速度,因为“结束执行”被消除。 每个处理器周期可以添加到校验和的八位字节数量大大增加,从而显着提高整体TCP / IP性能。