HDL Simulator output arrays in step function (2012a)

조회 수: 1 (최근 30일)
Gokce
Gokce 2012년 9월 12일
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.

답변 (1개)

Girish Venkataramani
Girish Venkataramani 2012년 10월 6일
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!

Translated by