is the "qammod" function in communication toolbox not compatible with hdl coder in version R2013a?

i am trying to generate VHDL code of 16 QAM MODULATION from matlab code using HDL CODER. my code is
function mod_data =qammod(data_in_sym,M);
n=8
M=16
no_of_rows=n/4; no_of_bits_in_symbol=4;
data_in=[1;1;0;1;0;1;1;0];
data_instp=reshape(data_in,no_of_rows,no_of_bits_in_symbol);
data_in_sym=bi2de(data_instp);
now when i use the workflow adviser the following erroe comes:
??? Output argument 'mod_data' is not assigned on some execution paths.
Error in ==> qammod Line: 1 Column: 20
please point out the mistakes and give its solution.

댓글 수: 5

The code you show does not assign anything to mod_data at any time.
1. function mod_data =qammod1(data_in_sym,M);
2. n=8
3. M=16
4. no_of_rows=n/4; no_of_bits_in_symbol=4;
5. data_in=[1;1;0;1;0;1;1;0];
6. data_instp=reshape(data_in,no_of_rows,no_of_bits_in_symbol);
7. data_in_sym=bi2de(data_instp);
8. mod_data =qammod(data_in_sym,M);
please refer to this.
but still my main question is that- "is qammod function compatible with hdl coder"?
because i was able to generate VHDL code of this code till line 7 by doing some modifications in the arguments and i have tried various things for line 8 but was unable to get a VHDL code.For instance i tried using coder.extrinsic and hdlcfg commands
I am confused. In your original question the difficulty was in qammod() and the code shown was very much like what you now show for qammod1() . Are you still getting the error about mod_data not being assigned in some execution paths? If so is the error occurring in qammod1() or in qammod() ?
I am having difficulty determining at the moment whether qammod() is supported for code generation. It appears to me that there is an alternate coding that is supported; see http://www.mathworks.com/help/comm/ug/digital-modulation.html#fp59559
this is the error for the above code
???The function 'qammod' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation.

댓글을 달려면 로그인하십시오.

답변 (1개)

카테고리

도움말 센터File Exchange에서 Code Generation에 대해 자세히 알아보기

질문:

2014년 3월 16일

답변:

2014년 4월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by