I am trying to get Autocode to generate code that uses global variables for the input and output signals instead of using procedure parameters.
The reason I am doing this is that there seems like parameter transfered variables will result in additional execution load, especially if a lot of input/output signals are used (which is true in my case).
I my case I have a number of SystemBuild models which I want to generate code from and link together, and if I can't get Autocode to use global variables it seems that the performance will be significantly lower than otherwise due to all the copying that will take place.
I have tried the "allgscope" option, but it is not useful for me; since, firstly it only applies to output variables, and secondly, it seems that the content of the global variables will also be written to local copies of the variables (which means that there will be no performance benefit).
I have also tried setting "Input scope" for the input parameters, but since that option is only available for procedure superblocks, it is not useful in my case. (My models use discrete superblock as the topmost block.)
I have searched the MatrixX documentation, but found no solution that seems to work for me.
I am thankful for any advice regarding this.
Currently I am generating C code (although it seems like these kinds of settings should be language-independent).