Question: How to make this verilog code generic (for any number of Rx bits, Vx bits)? module bm213 (HD, Rx, Vx); output [1:0] HD; input (1:0)
How to make this verilog code generic (for any number of Rx bits, Vx bits)?

module bm213 (HD, Rx, Vx); output [1:0] HD; input (1:0) Rx; input [1:0] Vx; // Hamming Distance Branch Metric // 2-bit Received Symbol // 2-bit trellis branch label assign HD = {((Rx[1] ^Vx[1]) & (Rx[0] ^Vx[0])), // HD[1] ((Rx[1] ^Vx[1]) (Rx[0] ^Vx[0])) // HD[0] }; endmodule Vx[0] Rx[0] HD[O] B Vx[1] T HD[1] Rx[1] Figure 6-5 (2,1,3) HD Branch Metric Building Block
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
