Renesas M16C/6NM Network Card User Manual


 
Rev.2.00 Nov 28, 2005 page 221 of 378
REJ09B0124-0200
M16C/6N Group (M16C/6NK, M16C/6NM) 18. CRC Calculation
Under development
This document is under development and its contents are subject to change.
18. CRC Calculation
The Cyclic Redundancy Check (CRC) operation detects an error in data blocks. The microcomputer uses a
generator polynomial of CRC-CCITT (X
16
+ X
12
+ X
5
+ 1) to generate CRC code.
The CRC code consists of 16 bits which are generated for each data block in given length, separated in 8-bit
unit. After the initial value is set in the CRCD register, the CRC code is set in that register each time one byte
of data is written to the CRCIN register. CRC code generation for one-byte data is finished in two cycles.
Figure 18.1 shows the block diagram of the CRC circuit. Figure 18.2 shows the CRC-related registers. Figure
18.3 shows the calculation example using the CRC operation.
Figure 18.2 CRCD Register and CRCIN Register
Figure 18.1 CRC Circuit Block Diagram
When data is written to the CRCIN register after setting
the initial value in the CRCD register, the CRC code can
be read out from the CRCD register.
0000h to FFFFh
Function Setting Range
RW
RW
CRCD
Symbol After Reset
Indeterminate
03BDh to 03BCh
Address
b7 b0b7 b0
(b15) (b8)
CRC Data Register
Data input
00h to FFh
Function Setting Range
RW
RW
CRCIN
Symbol After Reset
Indeterminate
03BEh
Address
b7 b0
CRC Input Register
High-order 8 bitsLow-order 8 bits
CRCIN register
x
16
+x
12
+x
5
+1
Data bus high-order
Data bus low-order
CRCD register
CRC code generating circuit