Commit b5c2f4c
authored
feat: support parameterized addr width with
By default, XiangShan uses a fixed 48-bit physical address width, which
is not configurable. However, some SoCs require support for different
address widths (e.g., CHI buses support 44-52-bit addressing). To
accommodate these SoC needs, this pr introduces a parameterized physical
address width configured via `CHI_ADDR_WIDTH`. Key notes:
1. `CHI_ADDR_WIDTH` only modifies the address width for interactions
between CoupledL2 and the CHI bus. Addresses within CoupledL2 and XSCore
remain 48-bit, incurring some area overhead but functionally correct.
2. If `CHI_ADDR_WIDTH` < 48, CoupledL2 truncates the upper bits of
addresses. As for snoops, truncated bits are treated as zero. Therefore
It is critical to configure PMA at compile time to prevent XiangShan
from generating address beyond the `CHI_ADDR_WIDTH`-defined address
space.CHI_ADDR_WIDTH (#4620)1 parent 9680387 commit b5c2f4c
File tree
4 files changed
+13
-2
lines changed- src/main/scala
- top
- xiangshan
4 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
0 commit comments