Skip to content

Commit 46aaccd

Browse files
committed
Add cv64a6_rt config package
1 parent ed87ca9 commit 46aaccd

2 files changed

Lines changed: 198 additions & 2 deletions

File tree

Bender.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ sources:
8989
files:
9090
- core/include/cv64a60ax_config_pkg_cvfpu-uvm.sv
9191

92+
- target: cv64a6_rt
93+
files:
94+
- core/include/cv64a6_rt_config_pkg.sv
95+
9296
# General config infrastructure
9397
- core/include/riscv_pkg.sv
9498
- core/include/ariane_pkg.sv
@@ -99,12 +103,12 @@ sources:
99103
- core/cva6_accel_first_pass_decoder_stub.sv
100104

101105
# CLIC controller
102-
- target: any(cv64a6_imafdchsclic_sv39, cv64a6_imafdchsclic_sv39_hpdcache, cv64a6_imafdchsclic_sv39_wb)
106+
- target: any(cv64a6_imafdchsclic_sv39, cv64a6_imafdchsclic_sv39_hpdcache, cv64a6_imafdchsclic_sv39_wb, cv64a6_rt)
103107
files:
104108
- core/cva6_clic_controller.sv
105109

106110
# MMU
107-
- target: any(cv64a6_imafdcv_sv39, cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb, cv64a6_imafdch_sv39, cv64a6_imafdc_sv39_hpdcache, cv64a6_imafdc_sv39_hpdcache_wb, cv64a6_imafdch_sv39_wb, cv64a6_imafdchsclic_sv39, cv64a6_imafdchsclic_sv39_wb, cv64a6_imafdchsclic_sv39_hpdcache, cv32a6_imac_sv0, cv32a6_imac_sv32, cv32a6_imafc_sv32)
111+
- target: any(cv64a6_imafdcv_sv39, cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb, cv64a6_imafdch_sv39, cv64a6_imafdc_sv39_hpdcache, cv64a6_imafdc_sv39_hpdcache_wb, cv64a6_imafdch_sv39_wb, cv64a6_imafdchsclic_sv39, cv64a6_imafdchsclic_sv39_wb, cv64a6_imafdchsclic_sv39_hpdcache, cv32a6_imac_sv0, cv32a6_imac_sv32, cv32a6_imafc_sv32, cv64a6_rt)
108112
files:
109113
- core/cva6_mmu/cva6_tlb.sv
110114
- core/cva6_mmu/cva6_shared_tlb.sv
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
// Copyright 2021 Thales DIS design services SAS
2+
//
3+
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
6+
// You may obtain a copy of the License at https://solderpad.org/licenses/
7+
//
8+
// Original Author: Enrico Zelioli <ezelioli@iis.ee.ethz.ch> - ETH Zurich
9+
10+
11+
package cva6_config_pkg;
12+
13+
localparam CVA6ConfigXlen = 64;
14+
15+
localparam CVA6ConfigRVF = 1;
16+
localparam CVA6ConfigRVD = 1;
17+
localparam CVA6ConfigF16En = 0;
18+
localparam CVA6ConfigF16AltEn = 0;
19+
localparam CVA6ConfigF8En = 0;
20+
localparam CVA6ConfigFVecEn = 0;
21+
22+
localparam CVA6ConfigCvxifEn = 0;
23+
localparam CVA6ConfigCExtEn = 1;
24+
localparam CVA6ConfigZcbExtEn = 1;
25+
localparam CVA6ConfigZcmpExtEn = 0;
26+
localparam CVA6ConfigAExtEn = 1;
27+
localparam CVA6ConfigHExtEn = 1;
28+
localparam CVA6ConfigBExtEn = 0;
29+
localparam CVA6ConfigVExtEn = 0;
30+
localparam CVA6ConfigRVZiCond = 1;
31+
localparam CVA6ConfigSclicExtEn = 1;
32+
localparam CVA6ConfigXhclicExtEn = 1;
33+
34+
localparam CVA6ConfigAxiIdWidth = 4;
35+
localparam CVA6ConfigAxiAddrWidth = 48;
36+
localparam CVA6ConfigAxiDataWidth = 64;
37+
localparam CVA6ConfigFetchUserEn = 0;
38+
localparam CVA6ConfigFetchUserWidth = CVA6ConfigXlen;
39+
localparam CVA6ConfigDataUserEn = 0;
40+
localparam CVA6ConfigDataUserWidth = 1;
41+
42+
localparam CVA6ConfigIcacheByteSize = 16384;
43+
localparam CVA6ConfigIcacheSetAssoc = 4;
44+
localparam CVA6ConfigIcacheLineWidth = 128;
45+
localparam CVA6ConfigDcacheByteSize = 32768;
46+
localparam CVA6ConfigDcacheSetAssoc = 8;
47+
localparam CVA6ConfigDcacheLineWidth = 128;
48+
49+
localparam CVA6ConfigICacheSpmAddrBase = 56'h01A0_0000;
50+
localparam CVA6ConfigDCacheSpmAddrBase = 56'h0180_0000;
51+
52+
localparam CVA6ConfigDcacheFlushOnFence = 1'b1;
53+
localparam CVA6ConfigDcacheFlushOnFenceI = 1'b1;
54+
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;
55+
56+
localparam CVA6ConfigDcacheIdWidth = 1; // Must be >= $clog2(CVA6Cfg.NrLoadBufEntries)
57+
localparam CVA6ConfigMemTidWidth = CVA6ConfigAxiIdWidth;
58+
59+
localparam CVA6ConfigWtDcacheWbufDepth = 8;
60+
61+
localparam CVA6ConfigNrScoreboardEntries = 8;
62+
63+
localparam CVA6ConfigNrLoadPipeRegs = 1;
64+
localparam CVA6ConfigNrStorePipeRegs = 0;
65+
localparam CVA6ConfigNrLoadBufEntries = 2;
66+
67+
localparam CVA6ConfigRASDepth = 2;
68+
localparam CVA6ConfigBTBEntries = 32;
69+
localparam CVA6ConfigBHTEntries = 128;
70+
71+
localparam CVA6ConfigTvalEn = 1;
72+
73+
localparam CVA6ConfigNrPMPEntries = 8;
74+
75+
localparam CVA6ConfigPerfCounterEn = 1;
76+
77+
localparam config_pkg::cache_type_t CVA6ConfigDcacheType = config_pkg::WB;
78+
79+
localparam CVA6ConfigMmuPresent = 1;
80+
81+
localparam CVA6ConfigRvfiTrace = 1;
82+
83+
localparam config_pkg::cva6_user_cfg_t cva6_cfg = '{
84+
XLEN: unsigned'(CVA6ConfigXlen),
85+
VLEN: unsigned'(64),
86+
FpgaEn: bit'(0), // for Xilinx and Altera
87+
FpgaAlteraEn: bit'(0), // for Altera (only)
88+
TechnoCut: bit'(0),
89+
SuperscalarEn: bit'(0), // TODO: enable once FPU fix is stable
90+
ALUBypass: bit'(0),
91+
NrCommitPorts: unsigned'(2),
92+
AxiAddrWidth: unsigned'(CVA6ConfigAxiAddrWidth),
93+
AxiDataWidth: unsigned'(CVA6ConfigAxiDataWidth),
94+
AxiIdWidth: unsigned'(CVA6ConfigAxiIdWidth),
95+
AxiUserWidth: unsigned'(CVA6ConfigDataUserWidth),
96+
MemTidWidth: unsigned'(CVA6ConfigMemTidWidth),
97+
NrLoadBufEntries: unsigned'(CVA6ConfigNrLoadBufEntries),
98+
RVF: bit'(CVA6ConfigRVF),
99+
RVD: bit'(CVA6ConfigRVD),
100+
XF16: bit'(CVA6ConfigF16En),
101+
XF16ALT: bit'(CVA6ConfigF16AltEn),
102+
XF8: bit'(CVA6ConfigF8En),
103+
RVA: bit'(CVA6ConfigAExtEn),
104+
RVB: bit'(CVA6ConfigBExtEn),
105+
ZKN: bit'(0),
106+
RVV: bit'(CVA6ConfigVExtEn),
107+
RVC: bit'(CVA6ConfigCExtEn),
108+
RVH: bit'(CVA6ConfigHExtEn),
109+
RVZCB: bit'(CVA6ConfigZcbExtEn),
110+
RVZCMT: bit'(0),
111+
RVZCMP: bit'(CVA6ConfigZcmpExtEn),
112+
RVSCLIC: bit'(CVA6ConfigSclicExtEn),
113+
RVXHCLIC: bit'(CVA6ConfigXhclicExtEn),
114+
XFVec: bit'(CVA6ConfigFVecEn),
115+
CvxifEn: bit'(CVA6ConfigCvxifEn),
116+
CoproType: config_pkg::COPRO_NONE,
117+
RVZiCond: bit'(CVA6ConfigRVZiCond),
118+
RVZiCbom: bit'(0),
119+
RVZicntr: bit'(1),
120+
RVZihpm: bit'(1),
121+
NrScoreboardEntries: unsigned'(CVA6ConfigNrScoreboardEntries),
122+
PerfCounterEn: bit'(CVA6ConfigPerfCounterEn),
123+
MmuPresent: bit'(CVA6ConfigMmuPresent),
124+
RVS: bit'(1),
125+
RVU: bit'(1),
126+
SoftwareInterruptEn: bit'(1),
127+
HaltAddress: 64'h800,
128+
ExceptionAddress: 64'h808,
129+
RASDepth: unsigned'(CVA6ConfigRASDepth),
130+
BTBEntries: unsigned'(CVA6ConfigBTBEntries),
131+
BPType: config_pkg::BHT,
132+
BHTEntries: unsigned'(CVA6ConfigBHTEntries),
133+
BHTHist: unsigned'(3),
134+
DmBaseAddress: 64'h0,
135+
TvalEn: bit'(CVA6ConfigTvalEn),
136+
DirectVecOnly: bit'(0),
137+
NrPMPEntries: unsigned'(CVA6ConfigNrPMPEntries),
138+
PMPCfgRstVal: {64{64'h0}},
139+
PMPAddrRstVal: {64{64'h0}},
140+
PMPEntryReadOnly: 64'd0,
141+
PMPNapotEn: bit'(1),
142+
NOCType: config_pkg::NOC_TYPE_AXI4_ATOP,
143+
CLICNumInterruptSrc: unsigned'(256),
144+
NrNonIdempotentRules: unsigned'(2),
145+
NonIdempotentAddrBase: 1024'({64'b0, 64'b0}),
146+
NonIdempotentLength: 1024'({64'b0, 64'b0}),
147+
NrExecuteRegionRules: unsigned'(4),
148+
ExecuteRegionAddrBase: 1024'({64'h8000_0000, 64'(CVA6ConfigICacheSpmAddrBase), 64'h1_0000, 64'h0}),
149+
ExecuteRegionLength: 1024'({64'h40000000, 64'(CVA6ConfigIcacheByteSize), 64'h10000, 64'h1000}),
150+
NrCachedRegionRules: unsigned'(1),
151+
CachedRegionAddrBase: 1024'({64'h8000_0000}),
152+
CachedRegionLength: 1024'({64'h40000000}),
153+
MaxOutstandingStores: unsigned'(7),
154+
DebugEn: bit'(1),
155+
SDTRIG: bit'(0),
156+
Mcontrol6: bit'(0),
157+
Icount: bit'(0),
158+
Etrigger: bit'(0),
159+
Itrigger: bit'(0),
160+
AxiBurstWriteEn: bit'(0),
161+
IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize),
162+
IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc),
163+
IcacheLineWidth: unsigned'(CVA6ConfigIcacheLineWidth),
164+
ICacheSpmAddrBase: 56'(CVA6ConfigICacheSpmAddrBase),
165+
ICacheSpmLength: 56'(CVA6ConfigIcacheByteSize),
166+
DCacheSpmAddrBase: 56'(CVA6ConfigDCacheSpmAddrBase),
167+
DCacheSpmLength: 56'(CVA6ConfigDcacheByteSize),
168+
DCacheType: CVA6ConfigDcacheType,
169+
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
170+
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
171+
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
172+
DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence),
173+
DcacheFlushOnFenceI: unsigned'(CVA6ConfigDcacheFlushOnFenceI),
174+
DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush),
175+
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
176+
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
177+
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
178+
FetchUserEn: unsigned'(CVA6ConfigFetchUserEn),
179+
InstrTlbEntries: int'(16),
180+
DataTlbEntries: int'(64),
181+
TlbColoring: bit'(1),
182+
NumTlbColors: int'(16),
183+
LockableTlbWays: int'(8),
184+
UseSharedTlb: bit'(0),
185+
SvnapotEn: bit'(0),
186+
SharedTlbDepth: int'(64),
187+
NrLoadPipeRegs: int'(CVA6ConfigNrLoadPipeRegs),
188+
NrStorePipeRegs: int'(CVA6ConfigNrStorePipeRegs),
189+
DcacheIdWidth: int'(CVA6ConfigDcacheIdWidth)
190+
};
191+
192+
endpackage

0 commit comments

Comments
 (0)