norm() block in Simulink HDL coder
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, Does anyone know if there is a norm() block in HDL coder. I want to find the norm() of dt = norm(min(diff(t))); and I cant seem to find a Simulink HDL coder compatible block for this and not sure if I write a user defined function block for it whether norm() is supported, doesn't look like it from the documentation unless I'm missing something. I suppose one can probably code up the Euclidian distance formula, but I would have thought there is already something as simple as this in place. Thanks in advance.
0 commentaires
Réponses (1)
Tim McBrayer
le 20 Juil 2016
The short answer is no, HDL Coder does not support norm().
From the hardware perspective, the norm() function is a complicated function. It can involve taking a reciprocal, exponentiation, and absolute value, all on matrix values that could be real or complex numbers. Each of these operations involves tradeoffs (typically speed vs. area tradeoffs) when designing hardware to implement the function. HDL Coder customers typically will want control over the implementation of each of these sub-algorithms, so these sort of complicated algorithmic functions are not directly supported.
It appears straightforward to implement norm() in MATLAB code or in Simulink using basic blocks. This will give the designer full control over the hardware implementation of the algorithm.
Voir également
Catégories
En savoir plus sur Speed Optimization dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!