Skip to content
Snippets Groups Projects
Commit b8cb3a81 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Merge branch 'master' into L2SDP-176

parents 12dbca4f 37dfdaea
No related branches found
No related tags found
1 merge request!226Resolve L2SDP-176
Pipeline #26751 failed
lofar2_unb2b_sdp_station_bf-r087d98be6.tar.gz
\ No newline at end of file
lofar2_unb2b_sdp_station_full-r9ff51058a.tar.gz
\ No newline at end of file
......@@ -29,12 +29,13 @@
-- .
-------------------------------------------------------------------------------
LIBRARY IEEE, common_lib, dp_lib, reorder_lib, st_lib, mm_lib;
LIBRARY IEEE, common_lib, dp_lib, reorder_lib, st_lib, mm_lib, ring_lib;
USE IEEE.STD_LOGIC_1164.ALL;
USE common_lib.common_pkg.ALL;
USE common_lib.common_mem_pkg.ALL;
USE common_lib.common_network_layers_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL;
USE ring_lib.ring_pkg.ALL;
USE work.sdp_pkg.ALL;
ENTITY node_sdp_beamformer IS
......
......@@ -387,6 +387,10 @@ PACKAGE common_pkg IS
FUNCTION func_slv_extract( a_w, b_w, c_w : NATURAL; vec : STD_LOGIC_VECTOR; sel : NATURAL) RETURN STD_LOGIC_VECTOR;
FUNCTION func_slv_extract( a_w, b_w : NATURAL; vec : STD_LOGIC_VECTOR; sel : NATURAL) RETURN STD_LOGIC_VECTOR;
-- Number formats, see:
-- . https://support.astron.nl/confluence/display/L2M/L3+SDP+Decision%3A+Definition+of+fixed+point+numbers
-- . https://support.astron.nl/confluence/display/L2M/L4+SDPFW+Decision%3A+Number+representation%2C+resizing+and+rounding
FUNCTION TO_UINT(vec : STD_LOGIC_VECTOR) RETURN NATURAL; -- beware: NATURAL'HIGH = 2**31-1, not 2*32-1, use TO_SINT to avoid warning
FUNCTION TO_SINT(vec : STD_LOGIC_VECTOR) RETURN INTEGER;
......@@ -2073,6 +2077,9 @@ PACKAGE BODY common_pkg IS
RETURN sel_a_b(c_pos, c_real, -c_real);
END;
-- Fixed point format
-- . https://support.astron.nl/confluence/display/L2M/L3+SDP+Decision%3A+Definition+of+fixed+point+numbers
FUNCTION TO_UREAL(uvec : STD_LOGIC_VECTOR; resolution_w : INTEGER) RETURN REAL IS
BEGIN
-- First convert as unsigned integer, then scale to real. See TO_SREAL()
......@@ -2505,7 +2512,8 @@ PACKAGE BODY common_pkg IS
END;
-------------------------------------------------------------------------------------------------
-- Rounding schemes:
-- Rounding schemes
-- . https://support.astron.nl/confluence/display/L2M/L4+SDPFW+Decision%3A+Number+representation%2C+resizing+and+rounding
-------------------------------------------------------------------------------------------------
--
-- From https://en.wikipedia.org/wiki/Rounding it follows that there are three main
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment