I have created a Hamming code encoder to process a signal, up to here all good.
I'm having issues to implement a "noise" into an output in the Test-bench. For the noise, I want to apply up to 3 bits. I have to corrupt the 8-bit output by adding each of the 3 bits (from the noise signal) at random positions.
As an example: noise=111 and output=00000000. When the noise is injected into the 8-bit word, it'd look like this: 01000101/11100000/00101010. I've been trying rand() functions but I've had no luck.
I'd appreciate any sort of guidance here as I'm new to VHDL.
I've been trying (as a teste) to create a random integer (range 0 to 7) named x. And trying to apply 1 bit at position "x".
so output(x)<='1'. And somehow the position 0 and 7 also gets altered, as well as x position. When new output words come in, the output saves the previous (x) position value. When all 0 to 7 integers have happened then I get "11111111".