Skip to content

peripherals: LC709205F: Replace manual CRC8 with CRCEngine#154

Open
tt2-woo wants to merge 1 commit intorenode:masterfrom
tt2-woo:master
Open

peripherals: LC709205F: Replace manual CRC8 with CRCEngine#154
tt2-woo wants to merge 1 commit intorenode:masterfrom
tt2-woo:master

Conversation

@tt2-woo
Copy link
Copy Markdown

@tt2-woo tt2-woo commented Aug 4, 2025

The LC709205F model contained a manual, bit-by-bit implementation for calculating the CRC-8 checksum.

This change refactors the model to use the centralized and more performant Antmicro.Renode.Utilities.CRCEngine. The new CRCEngine instance is configured to be functionally identical to the previous implementation (CRC-8/CCITT, polynomial 0x07, no input/output reflection).

This improves code quality by:

  • Removing duplicated code.
  • Increasing performance through the use of a lookup table.
  • Enhancing maintainability and readability.

The LC709205F model contained a manual, bit-by-bit implementation for calculating the CRC-8 checksum.

This change refactors the model to use the centralized and more performant `Antmicro.Renode.Utilities.CRCEngine`. The new `CRCEngine` instance is configured to be functionally identical to the previous implementation (CRC-8/CCITT, polynomial 0x07, no input/output reflection).

This improves code quality by:
- Removing duplicated code.
- Increasing performance through the use of a lookup table.
- Enhancing maintainability and readability.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 4, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants