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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.accelerator/] [dctqidct/] [1.0/] [hdl/] [idct/] [IDCT1D_DA.vhd] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
------------------------------------------------------------------------------
2
-- Author        : Timo Alho
3
-- e-mail        : timo.a.alho@tut.fi
4
-- Date          : 11.08.2004 13:28:14
5
-- File          : IDCT1D_DA.vhd
6
-- Design        : VHDL Entity for idct.IDCT1D_DA.symbol
7
-- Generated by Mentor Graphics' HDL Designer 2003.1 (Build 399)
8
------------------------------------------------------------------------------
9
LIBRARY ieee;
10
USE ieee.std_logic_1164.all;
11
USE ieee.std_logic_arith.all;
12
LIBRARY idct;
13
USE idct.IDCT_pkg.all;
14
LIBRARY common_da;
15
 
16
ENTITY IDCT1D_DA IS
17
   PORT(
18
      clk             : IN     std_logic;
19
      idct_input_data : IN     std_logic_vector (8*IDCT_dataw_co-1 DOWNTO 0);
20
      last_bit        : IN     std_logic;
21
      rst_n           : IN     std_logic;
22
      start           : IN     std_logic;
23
      idct_out        : OUT    std_logic_vector (8*IDCT_dataw_co-1 DOWNTO 0)
24
   );
25
 
26
-- Declarations
27
 
28
END IDCT1D_DA ;
29
 
30
------------------------------------------------------------------------------
31
-- Author        : Timo Alho
32
-- e-mail        : timo.a.alho@tut.fi
33
-- Date          : 11.08.2004 13:28:15
34
-- File          : IDCT1D_DA.vhd
35
-- Design        : VHDL Architecture for idct.IDCT1D_DA.symbol
36
-- Generated by Mentor Graphics' HDL Designer 2003.1 (Build 399)
37
------------------------------------------------------------------------------
38
LIBRARY ieee;
39
USE ieee.std_logic_1164.all;
40
USE ieee.std_logic_arith.all;
41
LIBRARY idct;
42
USE idct.IDCT_pkg.all;
43
LIBRARY common_da;
44
 
45
 
46
ARCHITECTURE struct OF IDCT1D_DA IS
47
 
48
   -- Architecture declarations
49
 
50
   -- Internal signal declarations
51
   SIGNAL Vec              : std_logic_vector(7 DOWNTO 0);
52
   SIGNAL VecEven          : std_logic_vector(3 DOWNTO 0);
53
   SIGNAL VecOdd           : std_logic_vector(3 DOWNTO 0);
54
   SIGNAL coeff_even       : std_logic_vector(4*IDCT_coeffw_co-1 DOWNTO 0);
55
   SIGNAL coeff_odd        : std_logic_vector(4*IDCT_coeffw_co-1 DOWNTO 0);
56
   SIGNAL mult_to_post_sum : std_logic_vector(8*IDCT_dataw_co-1 DOWNTO 0);
57
   SIGNAL start_mul        : std_logic;
58
 
59
 
60
   -- ModuleWare signal declarations(v1.0) for instance 'I7' of 'adff'
61
   SIGNAL mw_I7creg : std_logic := '0';
62
 
63
   -- Component Declarations
64
   COMPONENT Parallel2Serial
65
   GENERIC (
66
      dataw_g : integer := 18
67
   );
68
   PORT (
69
      clk   : IN     std_logic ;
70
      d_in  : IN     std_logic_vector (dataw_g-1 DOWNTO 0); --parallel input data
71
      load  : IN     std_logic ;                            --'1' => d_in is loaded in
72
      rst_n : IN     std_logic ;
73
      d_out : OUT    std_logic                              --serial output data
74
   );
75
   END COMPONENT;
76
   COMPONENT Serial_multiplier4idct
77
   GENERIC (
78
      coeffw_g    : integer := 14;
79
      i_dataw_g   : integer := 18;
80
      round_val_g : integer := 64
81
   );
82
   PORT (
83
      clk        : IN     std_logic ;
84
      last_value : IN     std_logic ;
85
      mul_in     : IN     std_logic_vector (coeffw_g-1 DOWNTO 0);
86
      rst_n      : IN     std_logic ;
87
      start      : IN     std_logic ;
88
      mul_out    : OUT    std_logic_vector (i_dataw_g-1 DOWNTO 0)
89
   );
90
   END COMPONENT;
91
   COMPONENT IDCT_post_sum
92
   PORT (
93
      post_sum_in  : IN     std_logic_vector (8*IDCT_dataw_co-1 DOWNTO 0);
94
      post_sum_out : OUT    std_logic_vector (8*IDCT_dataw_co-1 DOWNTO 0)
95
   );
96
   END COMPONENT;
97
   COMPONENT Rom_idct_even
98
   GENERIC (
99
      coeffw_g : integer := 14
100
   );
101
   PORT (
102
      addr_in  : IN     std_logic_vector (3 DOWNTO 0);
103
      clk      : IN     std_logic ;
104
      data_out : OUT    std_logic_vector (4*coeffw_g-1 DOWNTO 0)
105
   );
106
   END COMPONENT;
107
   COMPONENT Rom_idct_odd
108
   GENERIC (
109
      coeffw_g : integer := 14
110
   );
111
   PORT (
112
      addr_in  : IN     std_logic_vector (3 DOWNTO 0);
113
      clk      : IN     std_logic ;
114
      data_out : OUT    std_logic_vector (4*coeffw_g-1 DOWNTO 0)
115
   );
116
   END COMPONENT;
117
 
118
 
119
BEGIN
120
   -- Architecture concurrent statements
121
   -- HDL Embedded Text Block 1 eb1
122
   -- eb1 1                           
123
   VecOdd <=Vec(6)&Vec(4)&Vec(2)&Vec(0);
124
   VecEven<=Vec(7) &Vec(5)&Vec(3)&Vec(1);
125
 
126
 
127
   -- ModuleWare code(v1.0) for instance 'I7' of 'adff'
128
   start_mul <= mw_I7creg;
129
   -- exemplar async_set_reset_local of I7seq "rst_n"
130
   I7seq: PROCESS (clk, rst_n)
131
   BEGIN
132
      IF (rst_n = '0' OR rst_n = 'L') THEN
133
         mw_I7creg <= '0';
134
      ELSIF (clk'EVENT AND clk='1') THEN
135
         mw_I7creg <= start;
136
      END IF;
137
   END PROCESS I7seq;
138
 
139
   -- Instance port mappings.
140
   post_sum : IDCT_post_sum
141
      PORT MAP (
142
         post_sum_in  => mult_to_post_sum,
143
         post_sum_out => idct_out
144
      );
145
   eventerm_rom : Rom_idct_even
146
      GENERIC MAP (
147
         coeffw_g => IDCT_coeffw_co
148
      )
149
      PORT MAP (
150
         addr_in  => VecEven,
151
         clk      => clk,
152
         data_out => coeff_even
153
      );
154
   oddterm_rom : Rom_idct_odd
155
      GENERIC MAP (
156
         coeffw_g => IDCT_coeffw_co
157
      )
158
      PORT MAP (
159
         addr_in  => VecOdd,
160
         clk      => clk,
161
         data_out => coeff_odd
162
      );
163
 
164
   g1: FOR i IN 0 TO 7 GENERATE
165
      input_p2s : Parallel2Serial
166
         GENERIC MAP (
167
            dataw_g => IDCT_dataw_co
168
         )
169
         PORT MAP (
170
            clk=>clk,
171
            rst_n=>rst_n,
172
            load=>start,
173
            d_in=>idct_input_data((i+1)*IDCT_dataw_co-1 DOWNTO i*IDCT_dataw_co),
174
            d_out => Vec(i)
175
         );
176
   END GENERATE g1;
177
 
178
   g4: FOR i IN 0 TO 3 GENERATE
179
      oddterm_mul : Serial_multiplier4idct
180
         GENERIC MAP (
181
            coeffw_g    => IDCT_coeffw_co,
182
            i_dataw_g   => IDCT_dataw_co,
183
            round_val_g => IDCT_rounding_value_co
184
         )
185
         PORT MAP (
186
            clk=>clk,
187
            rst_n=>rst_n,
188
            last_value=>last_bit,
189
            start=>start_mul,
190
            mul_out=>mult_to_post_sum((i+1)*IDCT_dataw_co-1 DOWNTO i*IDCT_dataw_co),
191
            mul_in=>coeff_odd((4-i)*IDCT_coeffw_co-1 DOWNTO (3-i)*IDCT_coeffw_co)
192
         );
193
   END GENERATE g4;
194
 
195
   g5: FOR i IN 0 TO 3 GENERATE
196
      eventerm_mul : Serial_multiplier4idct
197
         GENERIC MAP (
198
            coeffw_g    => IDCT_coeffw_co,
199
            i_dataw_g   => IDCT_dataw_co,
200
            round_val_g => IDCT_rounding_value_co
201
         )
202
         PORT MAP (
203
            clk=>clk,
204
            rst_n=>rst_n,
205
            last_value=>last_bit,
206
            start=>start_mul,
207
            mul_out=>mult_to_post_sum((4+i+1)*IDCT_dataw_co-1 DOWNTO (4+i)*IDCT_dataw_co),
208
            mul_in=>coeff_even((4-i)*IDCT_coeffw_co-1 DOWNTO (3-i)*IDCT_coeffw_co)
209
         );
210
   END GENERATE g5;
211
 
212
END struct;

powered by: WebSVN 2.1.0

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