Viterbi Decoder vitdec for HDL-Code generation
古いコメントを表示
Hello, I need to model a Viterbi Decoder. Since I want to generate HDL code out of my model, vitdec(...) is no solution. It´s not supportet by the HDL coder. Has someone a working model which is equivalent to:
out_1 = vitdec(c_in,t,35,'trunc','hard',punct);
Thanks a lot, Stefan
採用された回答
その他の回答 (3 件)
Bharath Venkataraman
2013 年 10 月 18 日
0 投票
There is also an example in the Communications System Toolbox (category HDL) called "HDL Code Generation for Viterbi Decoder" that may be of help.
Stefan
2013 年 10 月 22 日
Bharath Venkataraman
2013 年 10 月 24 日
The Viterbi decoder expects to receive the systematic and parity bits in a vector format. Please change your input to a vector format.
Also, you should put the Viterbi decoder in an isempty statement. This will ensure that the decoder is created only once and retains state across multiple calls.
function y = decode_dep_msc(c_in)
persistent hVitDec;
if isempty(hVitDec)
hVitDec = comm.ViterbiDecoder('TrellisStructure', poly2trellis(7,[133 171 145 133]),...)
end
out_1 = step(hVitDec, c_in);
y = out_1(1:L);
end
カテゴリ
ヘルプ センター および File Exchange で Error Detection and Correction についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!