Line 81... |
Line 81... |
signal ramwe_d4 : STD_LOGIC;
|
signal ramwe_d4 : STD_LOGIC;
|
signal ramwaddro_d1 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d1 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d2 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d2 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d3 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d3 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d4 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal ramwaddro_d4 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
|
signal ramwaddro_d5 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
|
signal ramwaddro_d6 : STD_LOGIC_VECTOR(RAMADRR_W-1 downto 0);
|
signal wmemsel_d1 : STD_LOGIC;
|
signal wmemsel_d1 : STD_LOGIC;
|
signal wmemsel_d2 : STD_LOGIC;
|
signal wmemsel_d2 : STD_LOGIC;
|
signal wmemsel_d3 : STD_LOGIC;
|
signal wmemsel_d3 : STD_LOGIC;
|
signal wmemsel_d4 : STD_LOGIC;
|
signal wmemsel_d4 : STD_LOGIC;
|
|
signal wmemsel_d5 : STD_LOGIC;
|
|
signal wmemsel_d6 : STD_LOGIC;
|
signal romedatao_d1 : T_ROM1DATAO;
|
signal romedatao_d1 : T_ROM1DATAO;
|
signal romodatao_d1 : T_ROM1DATAO;
|
signal romodatao_d1 : T_ROM1DATAO;
|
signal romedatao_d2 : T_ROM1DATAO;
|
signal romedatao_d2 : T_ROM1DATAO;
|
signal romodatao_d2 : T_ROM1DATAO;
|
signal romodatao_d2 : T_ROM1DATAO;
|
signal romedatao_d3 : T_ROM1DATAO;
|
signal romedatao_d3 : T_ROM1DATAO;
|
Line 96... |
Line 100... |
signal dcto_1 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_1 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_2 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_2 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_3 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_3 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_4 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
signal dcto_4 : STD_LOGIC_VECTOR(DA_W-1 downto 0);
|
|
|
|
signal fpr_out : STD_LOGIC_VECTOR(DA_W-12-1 downto 0);
|
|
|
|
component FinitePrecRndNrst is
|
|
generic
|
|
(
|
|
C_IN_SZ : natural := 37;
|
|
C_OUT_SZ : natural := 16;
|
|
C_FRAC_SZ : natural := 15
|
|
);
|
|
port (
|
|
CLK : in std_logic;
|
|
RST : in std_logic;
|
|
datain : in STD_LOGIC_VECTOR(C_IN_SZ-1 downto 0);
|
|
dataval : in std_logic;
|
|
dataout : out STD_LOGIC_VECTOR(C_OUT_SZ-1 downto 0);
|
|
|
|
clip_inc : out std_logic;
|
|
dval_out : out std_logic
|
|
);
|
|
end component;
|
|
|
begin
|
begin
|
|
|
ramwaddro <= ramwaddro_d4;
|
ramwaddro <= ramwaddro_d6;
|
ramwe <= ramwe_d4;
|
--ramwe <= ramwe_d4;
|
ramdatai <= dcto_4(DA_W-1 downto 12);
|
--ramdatai <= dcto_4(DA_W-1 downto 12);
|
wmemsel <= wmemsel_d4;
|
wmemsel <= wmemsel_d4;
|
|
|
|
odv <= ramwe_d4;
|
|
dcto <= STD_LOGIC_VECTOR(RESIZE(SIGNED(fpr_out),12));
|
|
|
|
ramdatai <= fpr_out;
|
|
|
|
U_FinitePrecRndNrst : FinitePrecRndNrst
|
|
generic map(
|
|
C_IN_SZ => DA_W,
|
|
C_OUT_SZ => DA_W-12,
|
|
C_FRAC_SZ => 12
|
|
)
|
|
port map(
|
|
CLK => clk,
|
|
RST => rst,
|
|
|
|
datain => dcto_4,
|
|
dataval => ramwe_d4,
|
|
dataout => fpr_out,
|
|
|
|
clip_inc => open,
|
|
dval_out => ramwe
|
|
);
|
|
|
process(clk,rst)
|
process(clk,rst)
|
begin
|
begin
|
if rst = '1' then
|
if rst = '1' then
|
inpcnt_reg <= (others => '0');
|
inpcnt_reg <= (others => '0');
|
latchbuf_reg <= (others => (others => '0'));
|
latchbuf_reg <= (others => (others => '0'));
|
Line 222... |
Line 270... |
ramwe_d4 <= ramwe_d3;
|
ramwe_d4 <= ramwe_d3;
|
ramwaddro_d1 <= ramwaddro_s;
|
ramwaddro_d1 <= ramwaddro_s;
|
ramwaddro_d2 <= ramwaddro_d1;
|
ramwaddro_d2 <= ramwaddro_d1;
|
ramwaddro_d3 <= ramwaddro_d2;
|
ramwaddro_d3 <= ramwaddro_d2;
|
ramwaddro_d4 <= ramwaddro_d3;
|
ramwaddro_d4 <= ramwaddro_d3;
|
|
ramwaddro_d5 <= ramwaddro_d4;
|
|
ramwaddro_d6 <= ramwaddro_d5;
|
wmemsel_d1 <= wmemsel_reg;
|
wmemsel_d1 <= wmemsel_reg;
|
wmemsel_d2 <= wmemsel_d1;
|
wmemsel_d2 <= wmemsel_d1;
|
wmemsel_d3 <= wmemsel_d2;
|
wmemsel_d3 <= wmemsel_d2;
|
wmemsel_d4 <= wmemsel_d3;
|
wmemsel_d4 <= wmemsel_d3;
|
|
wmemsel_d5 <= wmemsel_d4;
|
|
wmemsel_d6 <= wmemsel_d5;
|
|
|
if even_not_odd = '0' then
|
if even_not_odd = '0' then
|
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
|
dcto_1 <= STD_LOGIC_VECTOR(RESIZE
|
(RESIZE(SIGNED(romedatao(0)),DA_W) +
|
(RESIZE(SIGNED(romedatao(0)),DA_W) +
|
(RESIZE(SIGNED(romedatao(1)),DA_W-1) & '0') +
|
(RESIZE(SIGNED(romedatao(1)),DA_W-1) & '0') +
|