diff --git a/lib/radio/mix/sim/tb_mix_cpx.fdo b/lib/radio/mix/sim/tb_mix_cpx.fdo index 14d9422..78a7729 100644 --- a/lib/radio/mix/sim/tb_mix_cpx.fdo +++ b/lib/radio/mix/sim/tb_mix_cpx.fdo @@ -1,8 +1,10 @@ +vmap ieee_proposed ../../../../Common/sim/ieee_proposed + vlib work -vcom -explicit -93 "../../../../lib/fixed/fixed_pkg_c.vhd" +vcom -explicit -93 "../../../fixed/fixed_util_pkg.vhd" +vcom -explicit -93 "../../../misc/utils_pkg.vhd" vcom -explicit -93 "../../../../lib/PCK_FIO-2002.7/PCK_FIO_1993.vhd" vcom -explicit -93 "../../../../lib/PCK_FIO-2002.7/PCK_FIO_1993_BODY.vhd" -vcom -explicit -93 "../src/mix_pkg.vhd" vcom -explicit -93 "../src/mix_cpx.vhd" vcom -explicit -93 "../src/tb_mix_cpx.vhd" vsim -t 1ps -lib work tb_mix_cpx diff --git a/lib/radio/mix/sim/tb_mix_real.fdo b/lib/radio/mix/sim/tb_mix_real.fdo index cbf7dd0..0dbc45f 100644 --- a/lib/radio/mix/sim/tb_mix_real.fdo +++ b/lib/radio/mix/sim/tb_mix_real.fdo @@ -1,8 +1,10 @@ +vmap ieee_proposed ../../../../Common/sim/ieee_proposed + vlib work -vcom -explicit -93 "../../../../lib/fixed/fixed_pkg_c.vhd" +vcom -explicit -93 "../../../fixed/fixed_util_pkg.vhd" +vcom -explicit -93 "../../../misc/utils_pkg.vhd" vcom -explicit -93 "../../../../lib/PCK_FIO-2002.7/PCK_FIO_1993.vhd" vcom -explicit -93 "../../../../lib/PCK_FIO-2002.7/PCK_FIO_1993_BODY.vhd" -vcom -explicit -93 "../src/mix_pkg.vhd" vcom -explicit -93 "../src/mix_real.vhd" vcom -explicit -93 "../src/tb_mix_real.vhd" vsim -t 1ps -lib work tb_mix_real diff --git a/lib/radio/mix/src/mix_cpx.vhd b/lib/radio/mix/src/mix_cpx.vhd index f77a312..3df161e 100644 --- a/lib/radio/mix/src/mix_cpx.vhd +++ b/lib/radio/mix/src/mix_cpx.vhd @@ -21,8 +21,13 @@ library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.MATH_REAL.ALL; USE ieee.numeric_std.ALL; -use work.fixed_pkg.all; -use work.mix_pkg.all; + +library ieee_proposed; +use ieee_proposed.math_utility_pkg.all; +use ieee_proposed.fixed_pkg.all; + +library work; +use work.fixed_util_pkg.all; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. @@ -39,8 +44,8 @@ Generic has_in_reg : boolean := false; has_pipe_reg : boolean := false; has_out_reg : boolean := false; - rounding : boolean := true; - saturating : boolean := true + rounding : fixed_round_style_type := fixed_round; + saturating : fixed_overflow_style_type := fixed_saturate ); Port ( @@ -141,8 +146,8 @@ begin variable sum_re : sfixed(sproto(nbits_out, nbits_out_frac)'high downto sproto(nbits_out, nbits_out_frac)'low); variable sum_im : sfixed(sproto(nbits_out, nbits_out_frac)'high downto sproto(nbits_out, nbits_out_frac)'low); begin - sum_re := resize(scalb(p_re_left - p_re_right, nbits_scale_z), re, rounding, saturating); - sum_im := resize(scalb(p_im_left + p_im_right, nbits_scale_z), im, rounding, saturating); + sum_re := resize(scalb(p_re_left - p_re_right, nbits_scale_z), re, saturating, rounding); + sum_im := resize(scalb(p_im_left + p_im_right, nbits_scale_z), im, saturating, rounding); if has_out_reg = true then if rising_edge(clk) then if srst = '1' then diff --git a/lib/radio/mix/src/mix_real.vhd b/lib/radio/mix/src/mix_real.vhd index 3dfe3cc..37e96de 100644 --- a/lib/radio/mix/src/mix_real.vhd +++ b/lib/radio/mix/src/mix_real.vhd @@ -21,8 +21,13 @@ library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.MATH_REAL.ALL; USE ieee.numeric_std.ALL; -use work.fixed_pkg.all; -use work.mix_pkg.all; + +library ieee_proposed; +use ieee_proposed.math_utility_pkg.all; +use ieee_proposed.fixed_pkg.all; + +library work; +use work.fixed_util_pkg.all; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. @@ -39,8 +44,8 @@ Generic has_in_reg : boolean := false; has_pipe_reg : boolean := false; has_out_reg : boolean := false; - rounding : boolean := true; - saturating : boolean := true + rounding : fixed_round_style_type := fixed_round; + saturating : fixed_overflow_style_type := fixed_saturate ); Port ( @@ -130,8 +135,8 @@ begin variable sum_re : sfixed(sproto(nbits_out, nbits_out_frac)'high downto sproto(nbits_out, nbits_out_frac)'low); variable sum_im : sfixed(sproto(nbits_out, nbits_out_frac)'high downto sproto(nbits_out, nbits_out_frac)'low); begin - sum_re := resize(scalb(p_re_left, nbits_scale_z), re, rounding, saturating); - sum_im := resize(scalb(p_im_left, nbits_scale_z), im, rounding, saturating); + sum_re := resize(scalb(p_re_left, nbits_scale_z), re, saturating, rounding); + sum_im := resize(scalb(p_im_left, nbits_scale_z), im, saturating, rounding); if has_out_reg = true then if rising_edge(clk) then if srst = '1' then diff --git a/lib/radio/mix/src/tb_mix_cpx.vhd b/lib/radio/mix/src/tb_mix_cpx.vhd index 7882185..5eac130 100644 --- a/lib/radio/mix/src/tb_mix_cpx.vhd +++ b/lib/radio/mix/src/tb_mix_cpx.vhd @@ -17,9 +17,12 @@ use IEEE.MATH_REAL.ALL; USE ieee.numeric_std.ALL; use std.textio.all; -- Imports the standard textio package. +library ieee_proposed; +use ieee_proposed.math_utility_pkg.all; +use ieee_proposed.fixed_pkg.all; + library work; -use work.fixed_pkg.all; -use work.mix_pkg.all; +use work.fixed_util_pkg.all; use work.PCK_FIO.all; ENTITY tb_mix_cpx IS @@ -32,8 +35,8 @@ ENTITY tb_mix_cpx IS has_in_reg : boolean := true; has_pipe_reg : boolean := true; has_out_reg : boolean := true; - rounding : boolean := true; - saturating : boolean := true + rounding : fixed_round_style_type := fixed_round; + saturating : fixed_overflow_style_type := fixed_saturate ); END tb_mix_cpx; @@ -51,8 +54,8 @@ ARCHITECTURE behavior OF tb_mix_cpx IS has_in_reg : boolean; has_pipe_reg : boolean; has_out_reg : boolean; - rounding : boolean; - saturating : boolean + rounding : fixed_round_style_type; + saturating : fixed_overflow_style_type ); PORT ( diff --git a/lib/radio/mix/src/tb_mix_real.vhd b/lib/radio/mix/src/tb_mix_real.vhd index a9e458e..8f0ce40 100644 --- a/lib/radio/mix/src/tb_mix_real.vhd +++ b/lib/radio/mix/src/tb_mix_real.vhd @@ -17,9 +17,12 @@ use IEEE.MATH_REAL.ALL; USE ieee.numeric_std.ALL; use std.textio.all; -- Imports the standard textio package. +library ieee_proposed; +use ieee_proposed.math_utility_pkg.all; +use ieee_proposed.fixed_pkg.all; + library work; -use work.fixed_pkg.all; -use work.mix_pkg.all; +use work.fixed_util_pkg.all; use work.PCK_FIO.all; ENTITY tb_mix_real IS @@ -32,8 +35,8 @@ ENTITY tb_mix_real IS has_in_reg : boolean := true; has_pipe_reg : boolean := true; has_out_reg : boolean := true; - rounding : boolean := true; - saturating : boolean := true + rounding : fixed_round_style_type := fixed_round; + saturating : fixed_overflow_style_type := fixed_saturate ); END tb_mix_real; @@ -51,8 +54,8 @@ ARCHITECTURE behavior OF tb_mix_real IS has_in_reg : boolean; has_pipe_reg : boolean; has_out_reg : boolean; - rounding : boolean; - saturating : boolean + rounding : fixed_round_style_type; + saturating : fixed_overflow_style_type ); PORT (