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

Subversion Repositories mdct

[/] [mdct/] [trunk/] [source/] [ROME.VHD] - Blame information for rev 11

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 11 mikel262
       addr         : in  STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
35
       clk          : in  STD_LOGIC;
36 2 mikel262
 
37
       datao        : out STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0)
38
  );
39
 
40
end ROME;
41
 
42
architecture RTL of ROME is
43
 
44
  type ROM_TYPE is array (0 to 2**ROMADDR_W-1)
45
            of STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0);
46
  constant rom : ROM_TYPE :=
47
    (
48
    (others => '0'),
49
     std_logic_vector( AP ),
50
     std_logic_vector( AP ),
51
     std_logic_vector( AP+AP ),
52
     std_logic_vector( AP ),
53
     std_logic_vector( AP+AP ),
54
     std_logic_vector( AP+AP ),
55
     std_logic_vector( AP+AP+AP ),
56
     std_logic_vector( AP ),
57
     std_logic_vector( AP+AP ),
58
     std_logic_vector( AP+AP ),
59
     std_logic_vector( AP+AP+AP ),
60
     std_logic_vector( AP+AP ),
61
     std_logic_vector( AP+AP+AP ),
62
     std_logic_vector( AP+AP+AP ),
63
     std_logic_vector( AP+AP+AP+AP ),
64
 
65
 
66
     (others => '0'),
67
     std_logic_vector( BM ),
68
     std_logic_vector( CM ),
69
     std_logic_vector( CM+BM ),
70
     std_logic_vector( CP ),
71
     std_logic_vector( CP+BM ),
72
     (others => '0'),
73
     std_logic_vector( BM ),
74
     std_logic_vector( BP ),
75
     (others => '0'),
76
     std_logic_vector( BP+CM ),
77
     std_logic_vector( CM ),
78
     std_logic_vector( BP+CP ),
79
     std_logic_vector( CP ),
80
     std_logic_vector( BP ),
81
     (others => '0'),
82
 
83
 
84
     (others => '0'),
85
     std_logic_vector( AP ),
86
     std_logic_vector( AM ),
87
     (others => '0'),
88
     std_logic_vector( AM ),
89
     (others => '0'),
90
     std_logic_vector( AM+AM ),
91
     std_logic_vector( AM ),
92
     std_logic_vector( AP ),
93
     std_logic_vector( AP+AP ),
94
     (others => '0'),
95
     std_logic_vector( AP ),
96
     (others => '0'),
97
     std_logic_vector( AP ),
98
     std_logic_vector( AM ),
99
     (others => '0'),
100
 
101
 
102
     (others => '0'),
103
     std_logic_vector( CM ),
104
     std_logic_vector( BP ),
105
     std_logic_vector( BP+CM ),
106
     std_logic_vector( BM ),
107
     std_logic_vector( BM+CM ),
108
     (others => '0'),
109
     std_logic_vector( CM ),
110
     std_logic_vector( CP ),
111
     (others => '0'),
112
     std_logic_vector( CP+BP ),
113
     std_logic_vector( BP ),
114
     std_logic_vector( CP+BM ),
115
     std_logic_vector( BM ),
116
     std_logic_vector( CP ),
117
     (others => '0')
118
     );
119 11 mikel262
  signal addr_reg : STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
120 2 mikel262
 
121
begin
122
 
123 11 mikel262
  datao <= rom( TO_INTEGER(UNSIGNED(addr_reg)) );
124
 
125
  process(clk)
126 2 mikel262
  begin
127 11 mikel262
   if clk = '1' and clk'event then
128
     addr_reg <= addr;
129
   end if;
130
  end process;
131 2 mikel262
 
132
end RTL;
133
--------------------------------------------------------------------------------
134
 
135
 
136
 

powered by: WebSVN 2.1.0

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