add new urjtag-based code, fjmem
[fleet.git] / src / edu / berkeley / fleet / fpga / fjmem / fjmem_config_pack.vhd
1 -------------------------------------------------------------------------------
2 --
3 -- $Id: fjmem_config_pack_spartan3-p.vhd 1071 2008-02-21 20:34:04Z arniml $
4 --
5 -- This program is free software; you can redistribute it and/or
6 -- modify it under the terms of the GNU General Public License
7 -- as published by the Free Software Foundation; either version 2
8 -- of the License, or (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 -- 02111-1307, USA.
19 --
20 -- Written by Arnim Laeuger <arniml@users.sourceforge.net>, 2008.
21 --
22 -------------------------------------------------------------------------------
23
24 library ieee;
25 use ieee.std_logic_1164.all;
26
27 package fjmem_config_pack is
28
29   -----------------------------------------------------------------------------
30   -- Specify the active levels of trst_i, shift_i and res_i
31   --
32   constant trst_act_level_c  : std_logic := '1';
33   constant shift_act_level_c : std_logic := '1';
34   constant res_act_level_c   : std_logic := '1';
35   --
36   -----------------------------------------------------------------------------
37
38
39   -----------------------------------------------------------------------------
40   -- Adapt the number of used blocks and the number of bits that are
41   -- required for the block field (2 ** num_block_field_c >= num_blocks_c)
42   --
43   -- number of used blocks
44   constant num_blocks_c      : natural := 4;
45   -- number of bits for block field
46   constant num_block_field_c : natural := 2;
47   --
48   -----------------------------------------------------------------------------
49
50
51   -----------------------------------------------------------------------------
52   -- Don't change the array type
53   --
54   type block_desc_t is
55     record
56       addr_width : natural;
57       data_width : natural;
58     end record;
59   type block_array_t is array (natural range 0 to num_blocks_c-1) of block_desc_t;
60   --
61   -----------------------------------------------------------------------------
62
63
64   -----------------------------------------------------------------------------
65   -- Fill in the array for all your used blocks
66   --
67   constant blocks_c : block_array_t :=
68     (
69      (addr_width =>  1,                 -- block #3, embedded RAM
70       data_width =>  10),
71      (addr_width =>  1,                 -- block #3, embedded RAM
72       data_width =>  10),
73      (addr_width =>  1,                 -- block #3, embedded RAM
74       data_width =>  10),
75      (addr_width =>  1,                 -- block #3, embedded RAM
76       data_width =>  10)
77     );
78   --
79   -- And specify the maximum address and data width
80   --
81   constant max_addr_width_c : natural := 1;
82   constant max_data_width_c : natural := 10;
83   --
84   -----------------------------------------------------------------------------
85
86 end;