Altera_Forum
Honored Contributor
15 years agoReversing bits in a bus in verilog...
I was wondering about the easy way to reverse bits in a bus in Verilog. Here is the code I wrote:
------------------------------------------ if (rev) begin out[29:0] <= inp[0:29]; // Reverse video data buss bit order end else begin // !rev out[29:0] <= inp[29:0]; // Normal video data buss bit order end ----------------------------------------- The second line came up with a compile error: Part select direction is opposite... Is there a quick way to do this without writing out each wire?