orca-sim
MemoryMap.h
Go to the documentation of this file.
1 /******************************************************************************
2  * This file is part of project ORCA. More information on the project
3  * can be found at the following repositories at GitHub's website.
4  *
5  * http://https://github.com/andersondomingues/orca-sim
6  * http://https://github.com/andersondomingues/orca-software
7  * http://https://github.com/andersondomingues/orca-mpsoc
8  * http://https://github.com/andersondomingues/orca-tools
9  *
10  * Copyright (C) 2018-2020 Anderson Domingues, <ti.andersondomingues@gmail.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 ******************************************************************************/
26 #ifndef PLATFORMS_HFRISCV_WITH_EXTCOMM_INCLUDE_MEMORYMAP_H_
27 #define PLATFORMS_HFRISCV_WITH_EXTCOMM_INCLUDE_MEMORYMAP_H_
28 
29 #define ORCA_MEMORY_BASE 0x40000000
30 #define ORCA_MEMORY_SIZE 0x0041FFFF
31 #define ORCA_MEMORY_SIZE_1 0x00000080
32 #define ORCA_MEMORY_BASE_1 0x00000000
33 #define ORCA_MEMORY_SIZE_1 0x00000080
34 #define ORCA_MEMORY_BASE_2 0x00000000
35 #define ORCA_MEMORY_SIZE_2 0x00000080
36 
37 //pull the range of address so that memory won't split
38 #define PERIPHERAL_BASE (ORCA_MEMORY_BASE + ORCA_MEMORY_SIZE) - 0x00010000
39 //#define PERIPHERAL_BASE 0xe0ff8000
40 
41 #define SIGNAL_TILE_ID (PERIPHERAL_BASE + 0x00000000)
42 #define SIGNAL_STATUS (PERIPHERAL_BASE + 0x00000010)
43 #define SIGNAL_PROG_ADDR (PERIPHERAL_BASE + 0x00000020)
44 #define SIGNAL_PROG_SIZE (PERIPHERAL_BASE + 0x00000030)
45 #define SIGNAL_PROG_DEST (PERIPHERAL_BASE + 0x00000040)
46 #define SIGNAL_PROG_SEND (PERIPHERAL_BASE + 0x00000050)
47 #define SIGNAL_PROG_RECV (PERIPHERAL_BASE + 0x00000060)
48 
49 // 0x403F1xxx => memory mapped counters
50 #ifdef MEMORY_ENABLE_COUNTERS
51 #define M0_COUNTER_STORE_ADDR (0x40411010)
52 #define M0_COUNTER_LOAD_ADDR (0x40411014)
53 #define M1_COUNTER_STORE_ADDR (0x40411018)
54 #define M1_COUNTER_LOAD_ADDR (0x4041101C)
55 #define M2_COUNTER_STORE_ADDR (0x40411020)
56 #define M2_COUNTER_LOAD_ADDR (0x40411024)
57 #endif
58 
59 #ifdef HFRISCV_ENABLE_COUNTERS
60 #define CPU_COUNTER_ARITH_ADDR (0x40411128)
61 #define CPU_COUNTER_LOGICAL_ADDR (0x4041112C)
62 #define CPU_COUNTER_SHIFT_ADDR (0x40411130)
63 #define CPU_COUNTER_BRANCHES_ADDR (0x40411134)
64 #define CPU_COUNTER_JUMPS_ADDR (0x40411138)
65 #define CPU_COUNTER_LOADSTORE_ADDR (0x4041113C)
66 #define CPU_COUNTER_HOSTTIME_ADDR (0x40411140)
67 #define CPU_COUNTER_CYCLES_TOTAL_ADDR (0x40411144)
68 #define CPU_COUNTER_CYCLES_STALL_ADDR (0x40411148)
69 #endif
70 
71 #endif // PLATFORMS_HFRISCV_WITH_EXTCOMM_INCLUDE_MEMORYMAP_H_