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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [mdct/] [ROME.VHD] - Blame information for rev 31

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

Line No. Rev Author Line
1 25 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.STD_LOGIC_arith.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
       clk          : in  STD_LOGIC;
36
 
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
     conv_std_logic_vector( AP,ROMDATA_W ),
50
     conv_std_logic_vector( AP,ROMDATA_W ),
51
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
52
     conv_std_logic_vector( AP,ROMDATA_W ),
53
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
54
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
55
     conv_std_logic_vector( AP+AP+AP,ROMDATA_W ),
56
     conv_std_logic_vector( AP,ROMDATA_W ),
57
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
58
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
59
     conv_std_logic_vector( AP+AP+AP,ROMDATA_W ),
60
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
61
     conv_std_logic_vector( AP+AP+AP,ROMDATA_W ),
62
     conv_std_logic_vector( AP+AP+AP,ROMDATA_W ),
63
     conv_std_logic_vector( AP+AP+AP+AP,ROMDATA_W ),
64
 
65
 
66
     (others => '0'),
67
     conv_std_logic_vector( BM,ROMDATA_W ),
68
     conv_std_logic_vector( CM,ROMDATA_W ),
69
     conv_std_logic_vector( CM+BM,ROMDATA_W ),
70
     conv_std_logic_vector( CP,ROMDATA_W ),
71
     conv_std_logic_vector( CP+BM,ROMDATA_W ),
72
     (others => '0'),
73
     conv_std_logic_vector( BM,ROMDATA_W ),
74
     conv_std_logic_vector( BP,ROMDATA_W ),
75
     (others => '0'),
76
     conv_std_logic_vector( BP+CM,ROMDATA_W ),
77
     conv_std_logic_vector( CM,ROMDATA_W ),
78
     conv_std_logic_vector( BP+CP,ROMDATA_W ),
79
     conv_std_logic_vector( CP,ROMDATA_W ),
80
     conv_std_logic_vector( BP,ROMDATA_W ),
81
     (others => '0'),
82
 
83
 
84
     (others => '0'),
85
     conv_std_logic_vector( AP,ROMDATA_W ),
86
     conv_std_logic_vector( AM,ROMDATA_W ),
87
     (others => '0'),
88
     conv_std_logic_vector( AM,ROMDATA_W ),
89
     (others => '0'),
90
     conv_std_logic_vector( AM+AM,ROMDATA_W ),
91
     conv_std_logic_vector( AM,ROMDATA_W ),
92
     conv_std_logic_vector( AP,ROMDATA_W ),
93
     conv_std_logic_vector( AP+AP,ROMDATA_W ),
94
     (others => '0'),
95
     conv_std_logic_vector( AP,ROMDATA_W ),
96
     (others => '0'),
97
     conv_std_logic_vector( AP,ROMDATA_W ),
98
     conv_std_logic_vector( AM,ROMDATA_W ),
99
     (others => '0'),
100
 
101
 
102
     (others => '0'),
103
     conv_std_logic_vector( CM,ROMDATA_W ),
104
     conv_std_logic_vector( BP,ROMDATA_W ),
105
     conv_std_logic_vector( BP+CM,ROMDATA_W ),
106
     conv_std_logic_vector( BM,ROMDATA_W ),
107
     conv_std_logic_vector( BM+CM,ROMDATA_W ),
108
     (others => '0'),
109
     conv_std_logic_vector( CM,ROMDATA_W ),
110
     conv_std_logic_vector( CP,ROMDATA_W ),
111
     (others => '0'),
112
     conv_std_logic_vector( CP+BP,ROMDATA_W ),
113
     conv_std_logic_vector( BP,ROMDATA_W ),
114
     conv_std_logic_vector( CP+BM,ROMDATA_W ),
115
     conv_std_logic_vector( BM,ROMDATA_W ),
116
     conv_std_logic_vector( CP,ROMDATA_W ),
117
     (others => '0')
118
     );
119
 
120
begin
121
 
122
 
123
  process(clk)
124
  begin
125
   if clk = '1' and clk'event then
126
    datao <= rom(CONV_INTEGER(UNSIGNED(addr)) );
127
   end if;
128
  end process;
129
 
130
end RTL;
131
 
132
 
133
 

powered by: WebSVN 2.1.0

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