Forum Discussion
Altera_Forum
Honored Contributor
14 years agoWhy not do a real hardware CRC generator in a custom instruction ?
I would not do this just with bytes but have the custom instruction use a 32 value and (optionally) do four bytes at a time. This could be done with 32 single shift steps or in a more optimized way with cascades XORs. Calculation time should not be relevant, as it could run in the background having the processor only stall when the next value is inserted and the logic is still busy or when the result is extracted and the logic is still busy. So I would do those custom instructions: 1) define polynomial 2) reset / set start value 3) insert value (one Register = value, one Register = bit count 1..32) (blocks when busy) 4) get current result (blocks when busy) -Michael