Why do I get output of all zero values from my generated model using HDL Coder R2017b?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 26 Déc 2017
Réponse apportée : MathWorks Support Team
le 11 Jan 2018
I generate VHDL code from a subsystem that contains only an input port, exponential block and output port. This model outputs the expected value of "exp(1)" or 2.7183 for each time step. The generated model, however, only outputs zeros for each time step. Why is this happening?
Réponse acceptée
MathWorks Support Team
le 26 Déc 2017
This is typical behavior when generating VHDL code for a subsystem. By default, the generated model inserts delays in the model to account for hardware implementation on an FPGA. Notice the output in the Command Window upon generating code from such a subsystem:
### Starting HDL check.
### The code generation and optimization options you have chosen have introduced additional pipeline delays.
### The delay balancing feature has automatically inserted matching delays for compensation.
### The DUT requires an initial pipeline setup latency. Each output port experiences these additional delays.
### Output port 0: 23 cycles.
When the HDL code is implemented in hardware, we cannot expect correctly computed values until after a certain amount of time steps. In the attached example, notice that increasing the simulation time to 50 seconds and then generating HDL code will result in a generated model that will show the expected output after 23 cycles have elapsed.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Speed Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!