摘要:
A software tool in a graphical modeling environment guides a user through the process of preparing a graphical model for embedded code generation. The software tool prompts the user to specify code generation goals for the embedded code and provides feedback to the user regarding the compliance of the graphical model with the specified goals. The software tool can perform selected checks and analysis on the graphical model prior to code generation to ensure compliance with specified conditions. The software tool update parameters of the graphical model to comply with the specified goals, to produce optimized target software based on the model.
摘要:
A computer implemented method for generating embedded code from a graphical model which includes: acquiring at least one condition related to at least one code generation goal, the at least one code generation goal being used to generate embedded code from the graphical model in a graphical modeling environment, the at least one code generation goal relating to a characteristic of the code to be generated from the graphical model, the graphical model representing a dynamic system having time-changing behavior modeled with differential, difference, and/or algebraic equations, the graphical model being capable of simulation based on the equations; and identifying, using a microprocessor, conditions that are inconsistent with the at least one code generation goal.
摘要:
A computer-implemented method for generating code based on a graphical model may include: translating the graphical model into a graphical model code, the graphical model code including a first graphical model code function; performing a lookup of the first graphical model code function in a hardware specific library, the hardware specific library comprising a plurality of relationships between graphical model code functions and hardware specific functions, where the first graphical model code function is one of the graphical model code functions; obtaining a matched hardware specific function based on the lookup, wherein the matched hardware specific function is one of the hardware specific functions from the hardware specific library; and modifying the graphical model code based on the matched hardware specific function.
摘要:
A computer-implemented method may include defining an input bus signal in a graphical block diagram model by associating the input bus signal with a first group of signals, at least two of the first group of signals having a different data type; defining an output bus signal in the graphical block diagram model by associating the second bus signal with a second group of signals, each of the second group of signals corresponding to one of the first group of signals; defining an input to a non-virtual operation block in the graphical block diagram model as the input bus signal; defining an output to the non-virtual operation block in the graphical block diagram as the output bus signal; and simulating an operation performed on the input bus signal by the non-virtual operation block, the operation being performed on each of the first group of signals and output to each of the second group of signals.
摘要:
A computer-implemented method may include defining an input bus signal in a graphical block diagram model by associating the input bus signal with a first group of signals, at least two of the first group of signals having a different data type; defining an output bus signal in the graphical block diagram model by associating the second bus signal with a second group of signals, each of the second group of signals corresponding to one of the first group of signals; defining an input to a non-virtual operation block in the graphical block diagram model as the input bus signal; defining an output to the non-virtual operation block in the graphical block diagram as the output bus signal; and simulating an operation performed on the input bus signal by the non-virtual operation block, the operation being performed on each of the first group of signals and output to each of the second group of signals.
摘要:
An electronic device and method are provided to enable the management of shared code. Code may be shared if the environmental configuration is suitable for execution of the code and the functionality of the code matches. An identifier is provided to correspond to the functionality for a unit of code. Examples of identifiers can include file names, function names, macro names and class names. A checksum may also be used to identify the functionality of the unit of code. An organizational structure is configured to have constituents corresponding to environmental configurations suitable to execute the unit of code. Examples of the organizational structure include a directory structure or a class structure. The various units of code may be stored in the organizational structure and located by the constituent in which they are located and their functionality determined by the identifier to enable sharing.
摘要:
In an embodiment, a model is sliced into a plurality of slices. A slice in the plurality of slices is selected. A portion of code, that corresponds to the selected slice, is identified from code generated from the model. The identified code is verified to be equivalent to the selected slice. Equivalence may include equivalent functionality, equivalent data types, equivalent performance, and/or other forms of equivalence between the selected slice and the identified generated code.
摘要:
A computer readable medium including executable instructions that when executed perform a method for validating an optimization in generated code using an executable constraints document is provided. The medium can include instructions for relating an assumption to the optimization during code generation. The medium can include instructions for generating the executable constraints document during the code generation, the executable constraints document including information about the relating; and the medium can include instructions for executing the constraints document when the validating is performed, the validating including performing an operation based on a validation result produced by the validating, where the operation includes displaying the validation result to a user, storing the validation result, sending the validation result to a destination, or modifying the generated code.
摘要:
A graphical user interface that enables a user to create and specify the properties of custom storage classes is disclosed. The characteristics of each storage class are specified via parameter settings accessible from the graphical interface. Each custom storage class designed through the interface is defined by a combination of parameter settings. A code preview window in the graphical interface displays salient aspects of the source code references to model data given the selected parameter settings. The display is shown dynamically and adjusted to reflect subsequent changes in parameter settings.
摘要:
A computer-implemented method may include defining an input bus signal in a graphical block diagram model by associating the input bus signal with a first group of signals, at least two of the first group of signals having a different data type; defining an output bus signal in the graphical block diagram model by associating the second bus signal with a second group of signals, each of the second group of signals corresponding to one of the first group of signals; defining an input to a non-virtual operation block in the graphical block diagram model as the input bus signal; defining an output to the non-virtual operation block in the graphical block diagram as the output bus signal; and simulating an operation performed on the input bus signal by the non-virtual operation block, the operation being performed on each of the first group of signals and output to each of the second group of signals.