Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHelp in CRC custom instructions please.
Hello, I am a new bie in the custom instruction development for Altera and was looking into the way the CRC method is implemented as per the link altera.com/support/examples/nios2/exm-custom-...
Altera_Forum
Honored Contributor
13 years agoYou could generate logic that has a single accumulator, with separate instructions to add/subtract (etc) the input A:B (or B:A !) value from it.
Use the rC field (with writerc unset) to decide what to do. These instructions could return 'done' immediately, and carry on any processing in the subsequent clocks. You might want to add a 'stall' if the previous instruction hasn't finished. To read the result use the A or B field (unset readra/readrb) to select which 32bit result to return, and set writerc to the value is actually written to the register file.