HDL Simulator output arrays in step function (2012a)

2 views (last 30 days)
Hi,
I am trying to use the "step" function in HDL simulator to send inputs and read the outputs.
[hdloutputs] = step(cosimobj,hdlinputs)
I can't figure out how to use arrays for the outputs. For example, I have two outputs that will be generated by the step function, and if I use:
[myoutput1, myoutput2] = step(cosimobj,input1)
I can read both the outputs in two vectors. However, if I try this:
myoutput = step(cosimobj,input1)
I only get the first output in the myoutput variable, that is it is not an array but a vector. I tried preallocating the myoutput variable as a matrix with two columns, but it doesn't work.
Does anyone have a solution? With many outputs, it is cumbersome to use the first syntax.
Thanks.

Answers (1)

Girish Venkataramani
Girish Venkataramani on 6 Oct 2012
If you generated your HDL through HDL Coder, you may consider turning on the ScalarizePorts option - you can get to this by opening the Config settings panel and choose the Global Settings pane under HDL Code Generation, and go to the 'Coding Style' tab and check the 'Scalarize vector ports' option.

Community Treasure Hunt

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

Start Hunting!