EasyManua.ls Logo

Renesas PG-FP6 V1.06

Renesas PG-FP6 V1.06
188 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PG-FP6 V1.06 Appendix B. Supplementary Information
R20UT4469EJ0800 Rev.8.00 Page 173 of 188
Oct.01.21
crc_accum= 0xFFFFFFFF; /* Init Pattern */
for (i= 0, rd_ptr= 16; i < length; i++)
{
/* Check flash read buffer and fill if needed */
if (rd_ptr == 16)
{
Memory_Read (address, 16, data);
rd_ptr= 0;
address+= 16;
}
byte= ((crc_accum >> 24) ^ data [rd_ptr++]) & 0xFF;
crc_accum= (crc_accum << 8) ^ CRC32_Tab [byte];
}
return crc_accum;
}
Figure B.1 32-bit CRC Calculation Specifications
B.2 Division Method
#define BLOCKSIZ 256
/* You have to store 1-Block ROM data. */
unsigned char rom_data[BLOCKSIZ];
unsigned char
bist_calc()
{
int i;
unsigned short bist, bist_temp;
bist = 0;
for(i = 0; i < BLOCKSIZ; i++){
bist_temp = bist & 0x1;
bist_temp = (bist_temp << 8) | (bist_temp << 9) |
(bist_temp << 11)| (bist_temp << 12);
bist = (bist >> 1) ^ rom_data[i] ^ bist_temp;
}
return((unsigned char)bist);
}
Figure B.2 Division (Original) Calculation Specifications

Table of Contents

Related product manuals