主权项 |
1. A method for extending hardware optimizations for a model of a system created in a modeling environment, the method comprising:
accessing, from a memory of a first computer, the model, the model having executable semantics; identifying, by one or more processors of the first computer or a second computer, a plurality of sets of model elements of the model where the model elements of the plurality of sets are functionally equivalent with each other; determining, by the one or more processors of the first computer or the second computer, a maximum number of model elements in the plurality of sets; replacing, by the one or more processors of the first computer or the second computer, the model elements of the plurality of sets of the model that are functionally equivalent with shared model elements; inserting into the model for the plurality of sets serializer components and deserializer components; if a first number of model elements for a first set is equal to the maximum number of model elements in the plurality of sets, configuring, by the one or more processors of the first computer or the second computer, a first shared model element for the first set to execute at an execution rate; if a second number of model elements for a second set is less than the maximum number of model elements in the plurality of sets, configuring, by the one or more processors of the first computer or the second computer:
a second shared model element for the second set to execute at the execution rate, anda respective serializer component and a respective deserializer component for the second set to maintain a synchronous execution of the second shared model element within the model. |