- uses ieee_proposed.fixed_pkg

- din scaled to more fraction precision at integrator input.
  Number of integer bits are the same as din
- min_gain intrduced (reduces complexity of barrel shifter).
 Din always constant scaled by min_gain.


git-svn-id: http://moon:8086/svn/vhdl/trunk@172 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2008-12-30 06:03:56 +00:00
parent 75f8ddd340
commit 61d5c40cd2
5 changed files with 119 additions and 94 deletions
+12 -9
View File
@@ -16,8 +16,11 @@ use IEEE.STD_LOGIC_1164.ALL;
use IEEE.MATH_REAL.ALL;
USE ieee.numeric_std.ALL;
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.fixed_util_pkg.all;
use work.cordic_pkg.all;
@@ -33,8 +36,8 @@ use work.cordic_pkg.all;
cic_nstages : integer := 3;
cic_max_ratio : integer := 1024;
cic_max_diff_delay : integer := 2;
cic_max_width : integer := 48;
cic_max_width_frac : integer := 16
cic_scale_nbits_min : integer := 9;
cic_scale_nbits_max : integer := 32
);
PORT
(
@@ -46,7 +49,7 @@ use work.cordic_pkg.all;
lo_phase_in : in unsigned(lo_nbits_phase-1 downto 0);
cic_ratio : in natural range 1 to cic_max_ratio;
cic_diff_delay : in natural range 1 to cic_max_diff_delay;
cic_shift_in : in natural range 0 to cic_max_width-1;
cic_shift_in : in natural range 0 to cic_scale_nbits_max;
din_i : in signed(nbits_in-1 downto 0);
din_q : in signed(nbits_in-1 downto 0);
dout_i : out signed(nbits_out-1 downto 0);
@@ -71,8 +74,8 @@ ARCHITECTURE behavior OF syn_ddc IS
cic_nstages : integer;
cic_max_ratio : integer;
cic_max_diff_delay : integer;
cic_max_width : integer;
cic_max_width_frac : integer
cic_scale_nbits_min : integer;
cic_scale_nbits_max : integer
);
PORT
(
@@ -84,7 +87,7 @@ ARCHITECTURE behavior OF syn_ddc IS
lo_phase_in : in unsigned(lo_nbits_phase-1 downto 0);
cic_ratio : in natural range 1 to cic_max_ratio;
cic_diff_delay : in natural range 1 to cic_max_diff_delay;
cic_shift_in : in natural range 0 to cic_max_width-1;
cic_shift_in : in natural range 0 to cic_scale_nbits_max;
din_i : in sfixed;
din_q : in sfixed;
dout_i : out sfixed;
@@ -115,8 +118,8 @@ BEGIN
cic_nstages => cic_nstages,
cic_max_ratio => cic_max_ratio,
cic_max_diff_delay => cic_max_diff_delay,
cic_max_width => cic_max_width,
cic_max_width_frac => cic_max_width_frac
cic_scale_nbits_min => cic_scale_nbits_min,
cic_scale_nbits_max => cic_scale_nbits_max
)
PORT MAP
(