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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [mdct/] [ROMO.VHD] - Blame information for rev 25

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        : ROMO.VHD
15
-- Created     : Sat Mar 5 7:37 2006
16
-- Modified    : Dez. 30 2008 - Andreas Bergmann
17
--               Libs and Typeconversion fixed due Xilinx Synthesis errors
18
--
19
--------------------------------------------------------------------------------
20
--
21
--  Description : ROM for DCT matrix constant cosine coefficients (odd part)
22
--
23
--------------------------------------------------------------------------------
24
 
25
-- 5:0
26
-- 5:4 = select matrix row (1 out of 4)
27
-- 3:0 = select precomputed MAC ( 1 out of 16)
28
 
29
library IEEE;
30
  use IEEE.STD_LOGIC_1164.all;
31
--  use ieee.STD_LOGIC_signed.all;
32
  use IEEE.STD_LOGIC_arith.all;
33
  use WORK.MDCT_PKG.all;
34
 
35
entity ROMO is
36
  port(
37
       addr         : in  STD_LOGIC_VECTOR(ROMADDR_W-1 downto 0);
38
       clk          : in  STD_LOGIC;
39
 
40
       datao        : out STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0)
41
  );
42
 
43
end ROMO;
44
 
45
architecture RTL of ROMO is
46
  type ROM_TYPE is array (0 to 2**ROMADDR_W-1)
47
            of STD_LOGIC_VECTOR(ROMDATA_W-1 downto 0);
48
  constant rom : ROM_TYPE :=
49
    (
50
       (others => '0'),
51
       conv_std_logic_vector( GP,ROMDATA_W ),
52
       conv_std_logic_vector( FP,ROMDATA_W ),
53
       conv_std_logic_vector( FP+GP,ROMDATA_W ),
54
       conv_std_logic_vector( EP,ROMDATA_W ),
55
       conv_std_logic_vector( EP+GP,ROMDATA_W ),
56
       conv_std_logic_vector( EP+FP,ROMDATA_W ),
57
       conv_std_logic_vector( EP+FP+GP,ROMDATA_W ),
58
       conv_std_logic_vector( DP,ROMDATA_W ),
59
       conv_std_logic_vector( DP+GP,ROMDATA_W ),
60
       conv_std_logic_vector( DP+FP,ROMDATA_W ),
61
       conv_std_logic_vector( DP+FP+GP,ROMDATA_W ),
62
       conv_std_logic_vector( DP+EP,ROMDATA_W ),
63
       conv_std_logic_vector( DP+EP+GP,ROMDATA_W ),
64
       conv_std_logic_vector( DP+EP+FP,ROMDATA_W ),
65
       conv_std_logic_vector( DP+EP+FP+GP,ROMDATA_W ),
66
 
67
       (others => '0'),
68
       conv_std_logic_vector( FM,ROMDATA_W ),
69
       conv_std_logic_vector( DM,ROMDATA_W ),
70
       conv_std_logic_vector( DM+FM,ROMDATA_W ),
71
       conv_std_logic_vector( GM,ROMDATA_W ),
72
       conv_std_logic_vector( GM+FM,ROMDATA_W ),
73
       conv_std_logic_vector( GM+DM,ROMDATA_W ),
74
       conv_std_logic_vector( GM+DM+FM,ROMDATA_W ),
75
       conv_std_logic_vector( EP,ROMDATA_W ),
76
       conv_std_logic_vector( EP+FM,ROMDATA_W ),
77
       conv_std_logic_vector( EP+DM,ROMDATA_W ),
78
       conv_std_logic_vector( EP+DM+FM,ROMDATA_W ),
79
       conv_std_logic_vector( EP+GM,ROMDATA_W ),
80
       conv_std_logic_vector( EP+GM+FM,ROMDATA_W ),
81
       conv_std_logic_vector( EP+GM+DM,ROMDATA_W ),
82
       conv_std_logic_vector( EP+GM+DM+FM,ROMDATA_W ),
83
 
84
       (others => '0'),
85
       conv_std_logic_vector( EP,ROMDATA_W ),
86
       conv_std_logic_vector( GP,ROMDATA_W ),
87
       conv_std_logic_vector( EP+GP,ROMDATA_W ),
88
       conv_std_logic_vector( DM,ROMDATA_W ),
89
       conv_std_logic_vector( DM+EP,ROMDATA_W ),
90
       conv_std_logic_vector( DM+GP,ROMDATA_W ),
91
       conv_std_logic_vector( DM+GP+EP,ROMDATA_W ),
92
       conv_std_logic_vector( FP,ROMDATA_W ),
93
       conv_std_logic_vector( FP+EP,ROMDATA_W ),
94
       conv_std_logic_vector( FP+GP,ROMDATA_W ),
95
       conv_std_logic_vector( FP+GP+EP,ROMDATA_W ),
96
       conv_std_logic_vector( FP+DM,ROMDATA_W ),
97
       conv_std_logic_vector( FP+DM+EP,ROMDATA_W ),
98
       conv_std_logic_vector( FP+DM+GP,ROMDATA_W ),
99
       conv_std_logic_vector( FP+DM+GP+EP,ROMDATA_W ),
100
 
101
       (others => '0'),
102
       conv_std_logic_vector( DM,ROMDATA_W ),
103
       conv_std_logic_vector( EP,ROMDATA_W ),
104
       conv_std_logic_vector( EP+DM,ROMDATA_W ),
105
       conv_std_logic_vector( FM,ROMDATA_W ),
106
       conv_std_logic_vector( FM+DM,ROMDATA_W ),
107
       conv_std_logic_vector( FM+EP,ROMDATA_W ),
108
       conv_std_logic_vector( FM+EP+DM,ROMDATA_W ),
109
       conv_std_logic_vector( GP,ROMDATA_W ),
110
       conv_std_logic_vector( GP+DM,ROMDATA_W ),
111
       conv_std_logic_vector( GP+EP,ROMDATA_W ),
112
       conv_std_logic_vector( GP+EP+DM,ROMDATA_W ),
113
       conv_std_logic_vector( GP+FM,ROMDATA_W ),
114
       conv_std_logic_vector( GP+FM+DM,ROMDATA_W ),
115
       conv_std_logic_vector( GP+FM+EP,ROMDATA_W ),
116
       conv_std_logic_vector( GP+FM+EP+DM,ROMDATA_W )
117
       );
118
 
119
begin
120
 
121
  process(clk)
122
  begin
123
   if clk = '1' and clk'event then
124
          datao <= rom( CONV_INTEGER(UNSIGNED(addr)) );
125
   end if;
126
  end process;
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.