The embodiment of the application discloses a
code generation method, device, medium and product based on a multi-processor
control system; the method comprises the following steps: obtaining
model configuration, interface configuration, constraint configuration and
verification rules of a to-be-processed
control system; generating a task graph according to the
model configuration, generating a
message flow graph according to the interface configuration, and generating a processor capability table, a
bus scheduling table and a synchronization
point set according to the constraint configuration; constructing the task graph, the
message flow graph, the processor capability table, the
bus scheduling table and the synchronization
point set into a unified
processing object, and the unified
processing object is used to represent the associated constraints between tasks, messages, processor resources,
bus resources and synchronization points; performing
task segmentation, load
estimation, mapping solution and interface arrangement based on the unified
processing object, and determining a
task mapping relationship and an interface scheduling relationship; and generating synchronization code according to the
task mapping relationship, the interface scheduling relationship, the synchronization
point set and the
verification rules.