Technical Solutions
Why does Real-Time Workshop 6.0 (R14) include an extra copy of bus signals in a model's generated code?
Date Last Modified: Friday, June 26, 2009
| Solution ID: | 1-1RPS3Z | |
| Product: | Simulink | |
| Reported in Release: | R14 | |
| Platform: | All Platforms | |
| Operating System: | All OS |
Subject:
Why does Real-Time Workshop 6.0 (R14) include an extra copy of bus signals in a model's generated code?
Problem Description:
If the following conditions exist, Real-Time Workshop 6.0 (R14) includes an extra copy of bus signals in a model's generated code:
* A virtual bus passes into an atomic subsystem.
* On the subsystem's Block Parameters dialog box, the "Real-Time Workshop system code" option is set to 'Inline'.
* One or more bus signals connect directly to the output port of the atomic subsystem without passing through an intermediate nonvirtual block.
Solution:Simulink requires that atomic subsystems own the memory they output. In part, this defines the system as an atomic unit. Hence, all outputs must originate from blocks inside the atomic subsystem. When an input port feeds its signal directly to an output port in the atomic subsystem, the input port becomes nonvirtual and makes a copy of its input signal. When passing bus signals through atomic subsystems, this rule still applies, and the result is often perceived as unnecessary copies of bus signals in the generated code. |
|
|
Store

