- 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:
@@ -17,8 +17,11 @@ 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.fixed_util_pkg.all;
|
||||
use work.cordic_pkg.all;
|
||||
use work.PCK_FIO.all;
|
||||
@@ -35,8 +38,8 @@ ENTITY tb_ddc IS
|
||||
cic_nstages : integer := 3;
|
||||
cic_max_ratio : integer := 4096;
|
||||
cic_max_diff_delay : integer := 1;
|
||||
cic_max_width : integer := 36;
|
||||
cic_max_width_frac : integer := 16;
|
||||
cic_scale_nbits_min : integer := 9;
|
||||
cic_scale_nbits_max : integer := 32;
|
||||
rfgen_nbits_phase : integer := 20;
|
||||
rfgen_nbits_freq : integer := 20
|
||||
);
|
||||
@@ -57,8 +60,8 @@ ARCHITECTURE behavior OF tb_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
|
||||
(
|
||||
@@ -70,7 +73,7 @@ ARCHITECTURE behavior OF tb_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;
|
||||
@@ -130,7 +133,7 @@ ARCHITECTURE behavior OF tb_ddc IS
|
||||
SIGNAL ddc_phase_in : unsigned(lo_nbits_phase-1 downto 0) := (others => '0');
|
||||
SIGNAL ddc_diff_delay : natural := 1;
|
||||
SIGNAL ddc_ratio : natural := 64;
|
||||
SIGNAL ddc_shift_in : natural := 18;
|
||||
SIGNAL ddc_shift_in : natural := 18-cic_scale_nbits_min;
|
||||
|
||||
--Outputs
|
||||
SIGNAL ddc_din_i : sfixed(shi(nbits_in, nbits_in_frac) downto slo(nbits_in, nbits_in_frac));
|
||||
@@ -187,8 +190,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
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user