norm() block in Simulink HDL coder
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Tim McBrayer
am 20 Jul. 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.
Siehe auch
Kategorien
Mehr zu Speed Optimization finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!