norm() block in Simulink HDL coder
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Tim McBrayer
il 20 Lug 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.
Vedere anche
Categorie
Scopri di più su Speed Optimization in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!