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

Subversion Repositories mdct

[/] [mdct/] [tags/] [MDCT_B10/] [source/] [ROME.VHD] - Blame information for rev 25

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mikel262
--------------------------------------------------------------------------------
2
--                                                                            --
3
--                          V H D L    F I L E                                --
4
--                          COPYRIGHT (C) 2006                                --
5
--                                                                            --
6
--------------------------------------------------------------------------------
7
--
8
-- Title       : DCT
9
-- Design      : MDCT Core
10
-- Author      : Michal Krepa
11
--
12
--------------------------------------------------------------------------------
13
--
14
-- File        : ROME.VHD
15
-- Created     : Sat Mar 5 7:37 2006
16
--
17
--------------------------------------------------------------------------------
18
--
19
--  Description : ROM for DCT matrix constant cosine coefficients (even part)
20
--
21
--------------------------------------------------------------------------------
22
 
23
-- 5:0
24
-- 5:4 = select matrix row (1 out of 4)
25
-- 3:0 = select precomputed MAC ( 1 out of 16)
26
 
27
library IEEE;
28
  use IEEE.STD_LOGIC_1164.all;
29
  use ieee.numeric_std.all;
30
  use WORK.MDCT_PKG.all;
31
 
32
entity ROME is
33
  port(
34
       addr         : in  STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
35
 
36
       datao        : out STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0)
37
  );
38
 
39
end ROME;
40
 
41
architecture RTL of ROME is
42
 
43
  type ROM_TYPE is array (0 to 2**ROMADDR_W-1)
44
            of STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0);
45
  constant rom : ROM_TYPE :=
46
    (
47
    (others => '0'),
48
     std_logic_vector( AP ),
49
     std_logic_vector( AP ),
50
     std_logic_vector( AP+AP ),
51
     std_logic_vector( AP ),
52
     std_logic_vector( AP+AP ),
53
     std_logic_vector( AP+AP ),
54
     std_logic_vector( AP+AP+AP ),
55
     std_logic_vector( AP ),
56
     std_logic_vector( AP+AP ),
57
     std_logic_vector( AP+AP ),
58
     std_logic_vector( AP+AP+AP ),
59
     std_logic_vector( AP+AP ),
60
     std_logic_vector( AP+AP+AP ),
61
     std_logic_vector( AP+AP+AP ),
62
     std_logic_vector( AP+AP+AP+AP ),
63
 
64
 
65
     (others => '0'),
66
     std_logic_vector( BM ),
67
     std_logic_vector( CM ),
68
     std_logic_vector( CM+BM ),
69
     std_logic_vector( CP ),
70
     std_logic_vector( CP+BM ),
71
     (others => '0'),
72
     std_logic_vector( BM ),
73
     std_logic_vector( BP ),
74
     (others => '0'),
75
     std_logic_vector( BP+CM ),
76
     std_logic_vector( CM ),
77
     std_logic_vector( BP+CP ),
78
     std_logic_vector( CP ),
79
     std_logic_vector( BP ),
80
     (others => '0'),
81
 
82
 
83
     (others => '0'),
84
     std_logic_vector( AP ),
85
     std_logic_vector( AM ),
86
     (others => '0'),
87
     std_logic_vector( AM ),
88
     (others => '0'),
89
     std_logic_vector( AM+AM ),
90
     std_logic_vector( AM ),
91
     std_logic_vector( AP ),
92
     std_logic_vector( AP+AP ),
93
     (others => '0'),
94
     std_logic_vector( AP ),
95
     (others => '0'),
96
     std_logic_vector( AP ),
97
     std_logic_vector( AM ),
98
     (others => '0'),
99
 
100
 
101
     (others => '0'),
102
     std_logic_vector( CM ),
103
     std_logic_vector( BP ),
104
     std_logic_vector( BP+CM ),
105
     std_logic_vector( BM ),
106
     std_logic_vector( BM+CM ),
107
     (others => '0'),
108
     std_logic_vector( CM ),
109
     std_logic_vector( CP ),
110
     (others => '0'),
111
     std_logic_vector( CP+BP ),
112
     std_logic_vector( BP ),
113
     std_logic_vector( CP+BM ),
114
     std_logic_vector( BM ),
115
     std_logic_vector( CP ),
116
     (others => '0')
117
     );
118
 
119
 
120
begin
121
 
122
  process( addr )
123
  begin
124
    datao <= rom( TO_INTEGER(UNSIGNED(addr)) );
125
  end process;
126
 
127
 
128
end RTL;
129
--------------------------------------------------------------------------------
130
 
131
 
132
 

powered by: WebSVN 2.1.0

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