Takes in data in, and xor's it with a random number generated from a LFSR.
In order to test functionality of this physically, you can take the LFSR value from the bidirectional I/O and XOR it with the encryption. This will decrypt the output which you can check to see if it was the same as the input. As for my testbench, I manually calculated the LFSR value for certain clock cycles and checked the expected encrypted value.
N/A
# | Input | Output | Bidirectional |
---|---|---|---|
0 | ui_in[0] | ui_out[0] | uio_out[0] |
1 | ui_in[1] | ui_out[1] | uio_out[1] |
2 | ui_in[2] | ui_out[2] | uio_out[2] |
3 | ui_in[3] | ui_out[3] | uio_out[3] |
4 | ui_in[4] | ui_out[4] | uio_out[4] |
5 | ui_in[5] | ui_out[5] | uio_out[5] |
6 | ui_in[6] | ui_out[6] | uio_out[6] |
7 | ui_in[7] | ui_out[7] | uio_out[7] |