Patent ID: 8762120

Claim:
A non-transitory computer-readable storage medium storing instructions, the instructions comprising: a plurality of instructions which, when executed by a processor, cause the processor to: receive, via a technical computing environment (TCE), a request to generate code based on a model, the model being a block diagram model, a block, of the block diagram model, being associated with a variable, the variable being associated with at least one of: an input signal of the block, or an output signal of the block, and execution of the model causing the model to generate the output signal based on the input signal; cause, based on the request and by using the TCE, the code to be generated; identify, by using the TCE, a boundary for the variable based on a code section, of the code, corresponding to the block; generate, by using the TCE, alignment code, for the variable, based on the boundary; add, by using the TCE, the alignment code to the code; and annotate, by using the TCE and after adding the alignment code, the model to indicate that the alignment code was added to the code generated for the model.