The suggested procedure for downloading Firmware in RAM is as follows:
- Set the PKA_SEQ_CTRL[1] RESET register bit to
bring the PKA module in reset. When in reset, the PKA_RAM window (at offset
0x4000) gives access to the program RAM.
- Transfer the Firmware instructions as found in the Verilog Hex file (.vhx) file to program RAM. That is, write the first instruction at offset 0x4000, the next instruction at offset 0x4004, etc. Note that the instructions are 24-bit, so the sequence of words written typically looks something like 0x007001C9, 0x008C0200, 0x007000C9, etc.
- Clear the PKA_SEQ_CTRL[1] RESET register bit and
verify that the Firmware starts to run by verifying that PKA_SEQ_CTRL register
returns 0x00000100 immediately (that is, within a few clock cycles) after
clearing bit [31] RESET.
- Set the PKA_SEQ_CTRL[1] RESET register bit again
and verify that all instructions downloaded in step #2 are still present in
program RAM. This way it is verified that no instructions got damaged during the
reset cycle.
- Clear the PKA_SEQ_CTRL[1] RESET register bit
again, and poll PKA_SEQ_CTRL register until it reads 0x00000100 again.
- Wait for a few clock cycles and then verify that
the PKA_SW_REV register returns the expected revision information.