Generate CRC-8 Checksum in Simulink

Generate a CRC-8 checksum for the example shown in 802.11™-2016, section 21.3.10.3 and compare with the expected CRC.

Explore the Model

To align with the CRC calculation in 802.11-2016, the General CRC Generator block mask sets the generator polynomial to $z^8 + z^2 + z + 1$, initial states to 1, final XOR parameter to 1, and selects direct method.

The simulation is configured to process one input frame modeling the example from the 802.11-2016 standard in section 21.3.10.3. In the example, the input bit stream {m0, … m22} is {1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1} and the expected CRC checksum {c7, … c0} is {0 0 0 1 1 1 0 0}. The generated CRC checksum bits are compared to the expected bits and a 1 is output for each equal bit in the 8 bit CRC checksum.

comparedOut =

  8x1 logical array

   1
   1
   1
   1
   1
   1
   1
   1

References

[1] IEEE Std 802.11™-2016 IEEE Standard for Information Technology—Local and Metropolitan Area Networks—Specific Requirements Part 11: Wireless LAN MAC and PHY Specifications.