A branch metric unit's function is to calculate branch metrics, which are normed distances between every possible symbol in the code alphabet, and the received symbol.
There are hard decision and soft decision Viterbi decoders. A hard decision Viterbi decoder receives a simple bitstream on its input, and a Hamming distance is used as a metric. A soft decision Viterbi decoder receives a bitstream containing information about the reliability of each received symbol.
Verilog code for Branch metric unit (BMU)
module bmc000
(
rx_pair,
path_0_bmc,
path_1_bmc
);
input [1:0] rx_pair;
output [1:0] path_0_bmc;
output [1:0] path_1_bmc;
assign tmp00 = (rx_pair[0] ^ 1'b0);
assign tmp01 = (rx_pair[1] ^ 1'b0);
assign tmp10 = (rx_pair[0] ^ 1'b1);
assign tmp11 = (rx_pair[1] ^ 1'b1);
assign path_0_bmc = {(tmp00 & tmp01),(tmp00 ^ tmp01)};
assign path_1_bmc = {(tmp10 & tmp11),(tmp10 ^ tmp11)};
endmodule
No comments:
Post a Comment