I am sorry but the suggested solution is ONLY COPYING the content of the signal. It is not reversing it.
What it is supposed to do is: given A="1000", reverseA="0001";
If "output" is connected to pins of the FPGA, the suggested solution will work.
If you for some reason really need to reverse the positions of the bits, a loop is the way to go.
I have a memory which I don't want to read in a normal addressing order, I want to read in bit reversed order of the normal addressing. In this case I am option-less right here, I will go for the loop if I don't come up with a new idea.
I have a memory which I don't want to read in a normal addressing order, I want to read in bit reversed order of the normal addressing. In this case I am option-less right here, I will go for the loop if I don't come up with a new idea.
You should use the loop. Unlike software loops, this loop will cost you nothing. It will not consume any hardware resources in the FPGA and it will not reduce the speed of the circuit. I't 3 lines of code that come completely free!
Bit-reversed addressing in software is a mess, but it is really easy in hardware.
Good suggestion if you are working with less bit width, but I am working on 36 bit width, not convenient in this case I guess. As std_match suggested, the loop works wonder in this case, I already wrote a reverse function for it and it is completely fine as it is not going to be processed in the FPGA. Thank you guys!