Output varibale is not scalar. Matlab. HDL Coder

36 Views Asked by At

I've folowing main function (listing 1), that have to be converted to HDL.

Listing 1 – HDLCoder.m:

function [out] = HDLCoder(a,b)
out = fir1(48,[a b]);   % Window-based FIR filter design
end

Also, I've folowing testbench function, that need to verifying of main function (without this function I cannot generate HDL):

Listing 2 – Calculator.m

[out] = HDLCoder(0.35,0.65);

So, I've folowing "Workspace" and "Workflow Advisor" setting, output of compilation as well.

enter image description here Picture 1 – Workspace window

enter image description here Picture 2 – "Workflow Advisor" in "HDL Workflow Advisor" tab

enter image description here Picture 3 – "Workflow Advisor" in "Desine Input Types" tab

In "Workflow Advisor" in "Fixed-Point Conversion" tab I've folowing error (picture 4):

Variable 'out' is not scalar. Non-scalar types are not supported for derived range analysis.

enter image description here Picture 4 – "Workflow Advisor" in "Fixed-Point Conversion" tab

enter image description here Picture 5 – "Workflow Advisor" –> "Fixed-Point Conversion" -> "Variable" tab

enter image description here Picture 7 – "Workflow Advisor" –> "Fixed-Point Conversion" -> "Output" tab

enter image description here Picture 8 – Compiler's window with underling place with error

I already was trying to delete brackets around "out" varible in different places. It's not changed error output.

0

There are 0 best solutions below