I think this topic was previously discussed a long time ago...
How can I search for a specific procedure ( for example swapping bytes in a word) in order to find different types of implementation (for lower code length, etc)?
thx,
procedure swap_LSB_MSB (word in crc, word out swapped_crc) is
-- When the CRC is placed into the message, its upper and lower bytes must be swapped crc_lo; crc_hi
LSB_crc = byte (crc & 0x00ff)
MSB_crc = byte (crc & 0xff00)
swapped_crc = 256*LSB_crc + MSB_crc
end procedure