1 |
2 |
mikel262 |
--------------------------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
-- V H D L F I L E --
|
4 |
|
|
-- COPYRIGHT (C) 2006 --
|
5 |
|
|
-- --
|
6 |
|
|
--------------------------------------------------------------------------------
|
7 |
|
|
--
|
8 |
|
|
-- Title : MDCT_PKG
|
9 |
|
|
-- Design : MDCT Core
|
10 |
|
|
-- Author : Michal Krepa
|
11 |
|
|
--
|
12 |
|
|
--------------------------------------------------------------------------------
|
13 |
|
|
--
|
14 |
|
|
-- File : MDCT_PKG.VHD
|
15 |
|
|
-- Created : Sat Mar 5 2006
|
16 |
|
|
--
|
17 |
|
|
--------------------------------------------------------------------------------
|
18 |
|
|
--
|
19 |
|
|
-- Description : Package for MDCT core
|
20 |
|
|
--
|
21 |
|
|
--------------------------------------------------------------------------------
|
22 |
|
|
|
23 |
|
|
library IEEE;
|
24 |
|
|
use IEEE.STD_LOGIC_1164.all;
|
25 |
|
|
use ieee.numeric_std.all;
|
26 |
|
|
|
27 |
|
|
package MDCT_PKG is
|
28 |
|
|
|
29 |
|
|
constant CLK_FREQ_C : INTEGER := 10;
|
30 |
|
|
constant IP_W : INTEGER := 8;
|
31 |
|
|
constant OP_W : INTEGER := 12;
|
32 |
|
|
constant N : INTEGER := 8;
|
33 |
|
|
constant COE_W : INTEGER := 12;
|
34 |
|
|
constant ROMDATA_W : INTEGER := COE_W+2;
|
35 |
|
|
constant ROMADDR_W : INTEGER := 6;
|
36 |
|
|
constant RAMDATA_W : INTEGER := 10;
|
37 |
|
|
constant RAMADRR_W : INTEGER := 6;
|
38 |
|
|
constant COL_MAX : INTEGER := N-1;
|
39 |
|
|
constant ROW_MAX : INTEGER := N-1;
|
40 |
|
|
constant LEVEL_SHIFT : INTEGER := 128;
|
41 |
|
|
constant DA_W : INTEGER := ROMDATA_W+IP_W;
|
42 |
|
|
constant DA2_W : INTEGER := DA_W+2;
|
43 |
|
|
-- 2's complement numbers
|
44 |
|
|
constant AP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "010110101000";
|
45 |
|
|
constant BP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "011101100100";
|
46 |
|
|
constant CP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "001100010000";
|
47 |
|
|
constant DP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "011111011001";
|
48 |
|
|
constant EP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "011010100111";
|
49 |
|
|
constant FP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "010001110010";
|
50 |
|
|
constant GP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "000110010000";
|
51 |
|
|
|
52 |
|
|
constant AM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "101001011000";
|
53 |
|
|
constant BM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "100010011100";
|
54 |
|
|
constant CM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "110011110000";
|
55 |
|
|
constant DM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "100000100111";
|
56 |
|
|
constant EM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "100101011001";
|
57 |
|
|
constant FM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "101110001110";
|
58 |
|
|
constant GM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "111001110000";
|
59 |
|
|
|
60 |
|
|
end MDCT_PKG;
|