Skip to content
Snippets Groups Projects
Commit 8bb76ddf authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Use COMPLEX_RADIUS().

parent e4ef4b47
No related branches found
No related tags found
1 merge request!219No functional change. Use short index variables names in capitals, to ease...
......@@ -566,7 +566,7 @@ PACKAGE BODY tb_diag_pkg IS
CONSTANT c_Q : REAL := COS(c_angle); -- Q = quadrature reference
CONSTANT c_dat : REAL := REAL(TO_SINT(in_dat));
CONSTANT c_phase : REAL := ARCTAN(accum_Q, accum_I + c_eps);
CONSTANT c_ampl : REAL := SQRT((ABS(accum_I))**2.0 + (ABS(accum_Q))**2.0) * 2.0 / c_Nsamples;
CONSTANT c_ampl : REAL := COMPLEX_RADIUS(accum_I, accum_Q) * 2.0 / c_Nsamples;
BEGIN
IF rising_edge(dp_clk) THEN
-- Output reference I and Q for debugging in wave window
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment