OpenCores
URL https://opencores.org/ocsvn/mdct/mdct/trunk

Subversion Repositories mdct

[/] [mdct/] [trunk/] [source/] [ROMO.VHD] - Diff between revs 11 and 21

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 11 Rev 21
Line 11... Line 11...
--
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
--
-- File        : ROMO.VHD
-- File        : ROMO.VHD
-- Created     : Sat Mar 5 7:37 2006
-- Created     : Sat Mar 5 7:37 2006
 
-- Modified    : Dez. 30 2008 - Andreas Bergmann
 
--               Libs and Typeconversion fixed due Xilinx Synthesis errors
--
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
--
--  Description : ROM for DCT matrix constant cosine coefficients (odd part)
--  Description : ROM for DCT matrix constant cosine coefficients (odd part)
--
--
Line 24... Line 26...
-- 5:4 = select matrix row (1 out of 4)
-- 5:4 = select matrix row (1 out of 4)
-- 3:0 = select precomputed MAC ( 1 out of 16)
-- 3:0 = select precomputed MAC ( 1 out of 16)
 
 
library IEEE;
library IEEE;
  use IEEE.STD_LOGIC_1164.all;
  use IEEE.STD_LOGIC_1164.all;
  use ieee.numeric_std.all;
--  use ieee.STD_LOGIC_signed.all;
 
  use IEEE.STD_LOGIC_arith.all;
  use WORK.MDCT_PKG.all;
  use WORK.MDCT_PKG.all;
 
 
entity ROMO is
entity ROMO is
  port(
  port(
       addr         : in  STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
       addr         : in  STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
Line 43... Line 46...
  type ROM_TYPE is array (0 to 2**ROMADDR_W-1)
  type ROM_TYPE is array (0 to 2**ROMADDR_W-1)
            of STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0);
            of STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0);
  constant rom : ROM_TYPE :=
  constant rom : ROM_TYPE :=
    (
    (
       (others => '0'),
       (others => '0'),
       std_logic_vector( GP ),
       conv_std_logic_vector( GP,ROMDATA_W ),
       std_logic_vector( FP ),
       conv_std_logic_vector( FP,ROMDATA_W ),
       std_logic_vector( FP+GP ),
       conv_std_logic_vector( FP+GP,ROMDATA_W ),
       std_logic_vector( EP ),
       conv_std_logic_vector( EP,ROMDATA_W ),
       std_logic_vector( EP+GP ),
       conv_std_logic_vector( EP+GP,ROMDATA_W ),
       std_logic_vector( EP+FP ),
       conv_std_logic_vector( EP+FP,ROMDATA_W ),
       std_logic_vector( EP+FP+GP ),
       conv_std_logic_vector( EP+FP+GP,ROMDATA_W ),
       std_logic_vector( DP ),
       conv_std_logic_vector( DP,ROMDATA_W ),
       std_logic_vector( DP+GP ),
       conv_std_logic_vector( DP+GP,ROMDATA_W ),
       std_logic_vector( DP+FP ),
       conv_std_logic_vector( DP+FP,ROMDATA_W ),
       std_logic_vector( DP+FP+GP ),
       conv_std_logic_vector( DP+FP+GP,ROMDATA_W ),
       std_logic_vector( DP+EP ),
       conv_std_logic_vector( DP+EP,ROMDATA_W ),
       std_logic_vector( DP+EP+GP ),
       conv_std_logic_vector( DP+EP+GP,ROMDATA_W ),
       std_logic_vector( DP+EP+FP ),
       conv_std_logic_vector( DP+EP+FP,ROMDATA_W ),
       std_logic_vector( DP+EP+FP+GP ),
       conv_std_logic_vector( DP+EP+FP+GP,ROMDATA_W ),
 
 
       (others => '0'),
       (others => '0'),
       std_logic_vector( FM ),
       conv_std_logic_vector( FM,ROMDATA_W ),
       std_logic_vector( DM ),
       conv_std_logic_vector( DM,ROMDATA_W ),
       std_logic_vector( DM+FM ),
       conv_std_logic_vector( DM+FM,ROMDATA_W ),
       std_logic_vector( GM ),
       conv_std_logic_vector( GM,ROMDATA_W ),
       std_logic_vector( GM+FM ),
       conv_std_logic_vector( GM+FM,ROMDATA_W ),
       std_logic_vector( GM+DM ),
       conv_std_logic_vector( GM+DM,ROMDATA_W ),
       std_logic_vector( GM+DM+FM ),
       conv_std_logic_vector( GM+DM+FM,ROMDATA_W ),
       std_logic_vector( EP ),
       conv_std_logic_vector( EP,ROMDATA_W ),
       std_logic_vector( EP+FM ),
       conv_std_logic_vector( EP+FM,ROMDATA_W ),
       std_logic_vector( EP+DM ),
       conv_std_logic_vector( EP+DM,ROMDATA_W ),
       std_logic_vector( EP+DM+FM ),
       conv_std_logic_vector( EP+DM+FM,ROMDATA_W ),
       std_logic_vector( EP+GM ),
       conv_std_logic_vector( EP+GM,ROMDATA_W ),
       std_logic_vector( EP+GM+FM ),
       conv_std_logic_vector( EP+GM+FM,ROMDATA_W ),
       std_logic_vector( EP+GM+DM ),
       conv_std_logic_vector( EP+GM+DM,ROMDATA_W ),
       std_logic_vector( EP+GM+DM+FM ),
       conv_std_logic_vector( EP+GM+DM+FM,ROMDATA_W ),
 
 
       (others => '0'),
       (others => '0'),
       std_logic_vector( EP ),
       conv_std_logic_vector( EP,ROMDATA_W ),
       std_logic_vector( GP ),
       conv_std_logic_vector( GP,ROMDATA_W ),
       std_logic_vector( EP+GP ),
       conv_std_logic_vector( EP+GP,ROMDATA_W ),
       std_logic_vector( DM ),
       conv_std_logic_vector( DM,ROMDATA_W ),
       std_logic_vector( DM+EP ),
       conv_std_logic_vector( DM+EP,ROMDATA_W ),
       std_logic_vector( DM+GP ),
       conv_std_logic_vector( DM+GP,ROMDATA_W ),
       std_logic_vector( DM+GP+EP ),
       conv_std_logic_vector( DM+GP+EP,ROMDATA_W ),
       std_logic_vector( FP ),
       conv_std_logic_vector( FP,ROMDATA_W ),
       std_logic_vector( FP+EP ),
       conv_std_logic_vector( FP+EP,ROMDATA_W ),
       std_logic_vector( FP+GP ),
       conv_std_logic_vector( FP+GP,ROMDATA_W ),
       std_logic_vector( FP+GP+EP ),
       conv_std_logic_vector( FP+GP+EP,ROMDATA_W ),
       std_logic_vector( FP+DM ),
       conv_std_logic_vector( FP+DM,ROMDATA_W ),
       std_logic_vector( FP+DM+EP ),
       conv_std_logic_vector( FP+DM+EP,ROMDATA_W ),
       std_logic_vector( FP+DM+GP ),
       conv_std_logic_vector( FP+DM+GP,ROMDATA_W ),
       std_logic_vector( FP+DM+GP+EP ),
       conv_std_logic_vector( FP+DM+GP+EP,ROMDATA_W ),
 
 
       (others => '0'),
       (others => '0'),
       std_logic_vector( DM ),
       conv_std_logic_vector( DM,ROMDATA_W ),
       std_logic_vector( EP ),
       conv_std_logic_vector( EP,ROMDATA_W ),
       std_logic_vector( EP+DM ),
       conv_std_logic_vector( EP+DM,ROMDATA_W ),
       std_logic_vector( FM ),
       conv_std_logic_vector( FM,ROMDATA_W ),
       std_logic_vector( FM+DM ),
       conv_std_logic_vector( FM+DM,ROMDATA_W ),
       std_logic_vector( FM+EP ),
       conv_std_logic_vector( FM+EP,ROMDATA_W ),
       std_logic_vector( FM+EP+DM ),
       conv_std_logic_vector( FM+EP+DM,ROMDATA_W ),
       std_logic_vector( GP ),
       conv_std_logic_vector( GP,ROMDATA_W ),
       std_logic_vector( GP+DM ),
       conv_std_logic_vector( GP+DM,ROMDATA_W ),
       std_logic_vector( GP+EP ),
       conv_std_logic_vector( GP+EP,ROMDATA_W ),
       std_logic_vector( GP+EP+DM ),
       conv_std_logic_vector( GP+EP+DM,ROMDATA_W ),
       std_logic_vector( GP+FM ),
       conv_std_logic_vector( GP+FM,ROMDATA_W ),
       std_logic_vector( GP+FM+DM ),
       conv_std_logic_vector( GP+FM+DM,ROMDATA_W ),
       std_logic_vector( GP+FM+EP ),
       conv_std_logic_vector( GP+FM+EP,ROMDATA_W ),
       std_logic_vector( GP+FM+EP+DM )
       conv_std_logic_vector( GP+FM+EP+DM,ROMDATA_W )
       );
       );
 
 
  signal addr_reg : STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
 
begin
begin
 
 
  datao <= rom( TO_INTEGER(UNSIGNED(addr_reg)) );
 
 
 
  process(clk)
  process(clk)
  begin
  begin
   if clk = '1' and clk'event then
   if clk = '1' and clk'event then
     addr_reg <= addr;
          datao <= rom( CONV_INTEGER(UNSIGNED(addr)) );
   end if;
   end if;
  end process;
  end process;
 
 
end RTL;
end RTL;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.