1 |
2 |
madsilicon |
-----------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
-----------------------------------------------------------------
|
4 |
|
|
-- --
|
5 |
|
|
-- Copyright (C) 2015 Stefano Tonello --
|
6 |
|
|
-- --
|
7 |
|
|
-- This source file may be used and distributed without --
|
8 |
|
|
-- restriction provided that this copyright statement is not --
|
9 |
|
|
-- removed from the file and that any derivative work contains --
|
10 |
|
|
-- the original copyright notice and the associated disclaimer.--
|
11 |
|
|
-- --
|
12 |
|
|
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY --
|
13 |
|
|
-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED --
|
14 |
|
|
-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS --
|
15 |
|
|
-- FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR --
|
16 |
|
|
-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, --
|
17 |
|
|
-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES --
|
18 |
|
|
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE --
|
19 |
|
|
-- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR --
|
20 |
|
|
-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
|
21 |
|
|
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
|
22 |
|
|
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT --
|
23 |
|
|
-- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE --
|
24 |
|
|
-- POSSIBILITY OF SUCH DAMAGE. --
|
25 |
|
|
-- --
|
26 |
|
|
-----------------------------------------------------------------
|
27 |
|
|
|
28 |
|
|
---------------------------------------------------------------
|
29 |
|
|
-- RV01 configuration package ("C" core version)
|
30 |
|
|
---------------------------------------------------------------
|
31 |
|
|
|
32 |
|
|
library IEEE;
|
33 |
|
|
use IEEE.std_logic_1164.all;
|
34 |
|
|
use IEEE.numeric_std.all;
|
35 |
|
|
|
36 |
|
|
library work;
|
37 |
|
|
use work.RV01_CONSTS_PKG.all;
|
38 |
|
|
use work.RV01_TYPES_PKG.all;
|
39 |
|
|
use WORK.RV01_FUNCS_PKG.all;
|
40 |
|
|
use WORK.RV01_PLIC_PKG.all;
|
41 |
|
|
|
42 |
|
|
package RV01_CFG_PKG is
|
43 |
|
|
|
44 |
|
|
-- Pay attention: these values make reference to 32-bit
|
45 |
|
|
-- words, not to bytes (for instance, actual instruction
|
46 |
|
|
-- memory address range is [0:IMEM_SIZE*4-1]).
|
47 |
|
|
|
48 |
|
|
constant ASPC_SIZE : natural := 1024*64; -- 256Kb
|
49 |
|
|
constant IMEM_SIZE : natural := 1024*32; -- 128Kb
|
50 |
|
|
constant DMEM_SIZE : natural := 1024*12; -- 48Kb -- 64Kb for syn.
|
51 |
|
|
constant IOMEM_SIZE : natural := 0; -- 0Kb (no I/O mem.)
|
52 |
|
|
|
53 |
|
|
constant IMEM_SIZE_PO2 : std_logic := '1';
|
54 |
|
|
constant DMEM_SIZE_PO2 : std_logic := '0';
|
55 |
|
|
|
56 |
|
|
constant IMEM_LOWM : std_logic := '1';
|
57 |
|
|
|
58 |
|
|
constant PARALLEL_EXECUTION_ENABLED : std_logic := '1';
|
59 |
|
|
constant DELAYED_EXECUTION_ENABLED : std_logic := '1';
|
60 |
|
|
constant BRANCH_PREDICTION_ENABLED : std_logic := '1';
|
61 |
|
|
constant JALR_PREDICTION_ENABLED : std_logic := '1';
|
62 |
|
|
constant FPU_PRESENT : std_logic := '0';
|
63 |
|
|
constant DM_PRESENT : std_logic := '0';
|
64 |
|
|
constant PLIC_PRESENT : std_logic := '0';
|
65 |
|
|
|
66 |
|
|
-- Branch History Table size
|
67 |
|
|
-- (this paramter makes sense only if BRANCH_PREDICTION_ENABLED = '1')
|
68 |
|
|
constant BHT_SIZE : natural := 256;
|
69 |
|
|
|
70 |
|
|
-- PLIC parameters (PLIC_PRESENT must be = '1')
|
71 |
|
|
constant EI_SRC_CNT : natural := 1;
|
72 |
|
|
constant EI_TRIG_TYPE : PLIC_TRIG_TYPE := LEVEL;
|
73 |
|
|
constant EI_REQ_MAXCNT : natural := 0;
|
74 |
|
|
|
75 |
|
|
end package;
|
76 |
|
|
|
77 |
|
|
package body RV01_CFG_PKG is
|
78 |
|
|
end package body;
|