
32
The other approach was to manually exchange the function call in the generated
code. The function call is made in one place only in the whole code. The block
Quantisation, Figure 9, has two inputs which are the function parameters, but
Real-Time Workshop Embedded Coder always optimises away the declaration of
any irrelevant signal. This made it hard to have access to both inputs since one of
the signals is terminated inside the block and thus optimised away in the
generated code, see Figure 9. The solution to this specific problem was to make a
small change inside the Quantisation block in order to have access to both inputs
in the code, see Figure 10. This solution did not affect the rest of the generated
code since the whole subsystem was chosen to be a function with its own code
file. As mentioned earlier this problem could have been solved using Legacy
Code Tool.
Figure 9: Quantisation subsystem
Figure 10: Quantisation subsystem after modifications
Kommentare zu diesen Handbüchern