Effacer les filtres
Effacer les filtres

How to make the inports or outports organized as bitfields in the generaed code

2 vues (au cours des 30 derniers jours)
Sirius
Sirius le 26 Sep 2019
In code generation, for ports and bus that only transmit boolean data, how to make them appeared as bitfields in the generated code? The documents give an example for parameters, but there seems no way for signals.

Réponses (1)

Sukrut Tamhankar
Sukrut Tamhankar le 7 Mai 2020
When you select the model configuration parameter Pack Boolean data into bitfields, Embedded Coder packs the Boolean signals into 1-bit bitfields in global block I/O structures or DWork vectors. This will reduce RAM consumption, but might cause more executable code.This option is available under Model Configuration Parameters:
Code Generation > Optimization > Optimization Levels > Details > Pack Boolean data into bitfields
Also select the option Specify custom optimizations under Optimization Levels section.
Selecting Pack Boolean data into bitfields enables model configuration parameter Bitfield declarator type specifier. Select appropriate Bitfield declarator type specifier.
Please refer following MATLAB Documentation link for more information:
Hence boolean signals generated from inport and going towards outport can be packed into 1-bit bitfields whereas inports and outports will not be appeared as bitfields in generated code.

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by