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 |
18 |
mikel262 |
|
29 |
2 |
mikel262 |
constant IP_W : INTEGER := 8;
|
30 |
|
|
constant OP_W : INTEGER := 12;
|
31 |
|
|
constant N : INTEGER := 8;
|
32 |
|
|
constant COE_W : INTEGER := 12;
|
33 |
|
|
constant ROMDATA_W : INTEGER := COE_W+2;
|
34 |
|
|
constant ROMADDR_W : INTEGER := 6;
|
35 |
|
|
constant RAMDATA_W : INTEGER := 10;
|
36 |
|
|
constant RAMADRR_W : INTEGER := 6;
|
37 |
|
|
constant COL_MAX : INTEGER := N-1;
|
38 |
|
|
constant ROW_MAX : INTEGER := N-1;
|
39 |
|
|
constant LEVEL_SHIFT : INTEGER := 128;
|
40 |
|
|
constant DA_W : INTEGER := ROMDATA_W+IP_W;
|
41 |
|
|
constant DA2_W : INTEGER := DA_W+2;
|
42 |
|
|
-- 2's complement numbers
|
43 |
|
|
constant AP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "010110101000";
|
44 |
|
|
constant BP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "011101100100";
|
45 |
|
|
constant CP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "001100010000";
|
46 |
|
|
constant DP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "011111011001";
|
47 |
|
|
constant EP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "011010100111";
|
48 |
|
|
constant FP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "010001110010";
|
49 |
|
|
constant GP : SIGNED(ROMDATA_W-1 downto 0) := "00" & "000110010000";
|
50 |
|
|
|
51 |
|
|
constant AM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "101001011000";
|
52 |
|
|
constant BM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "100010011100";
|
53 |
|
|
constant CM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "110011110000";
|
54 |
|
|
constant DM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "100000100111";
|
55 |
|
|
constant EM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "100101011001";
|
56 |
|
|
constant FM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "101110001110";
|
57 |
|
|
constant GM : SIGNED(ROMDATA_W-1 downto 0) := "11" & "111001110000";
|
58 |
|
|
|
59 |
|
|
end MDCT_PKG;
|