| # | ATTR | BASE | MODE | END / SIZE |
|---|
本工具用于生成和编辑 Nuclei CPU IP 的 PMA(Physical Memory Attribute) 区域配置。
Generate and edit PMA (Physical Memory Attribute) region configuration for Nuclei platforms.
PA SIZE 32-48; PREFIX e.g. N600. Each row is a region: ATTR, BASE, and END (exclusive [BASE,END)) or SIZE (hex or 32KB/1MB). Max 8 blocks per attribute; add button rotates to the next free attribute.
统一使用高位 MASK (0xFF000000)。
MASK 位宽需要符合 PA SIZE。
MASK 规则: (Addr & Mask) == Base。
对于导入的配置,自动将输出 MASK 格式转换为高位 MASK。
Always output 1s-leading mask (high bits 1), e.g. 'hF0000000 for 256MB. Low-mask input ('h0FFFFFFF) is auto-converted on import.
| 颜色 | 含义 |
|---|---|
| Device | |
| Cacheable | |
| Non-Cacheable | |
| Cacheable (Default) |
Vertical bar: 0x0 at bottom, address-space end at top. Block height proportional to size with a readable minimum. Light blue background = CACHEABLE (Default).
区域配置不满足对齐要求时,底部校验面板提供修复方案:
WRAP (default): enclose in a larger power-of-two block. SPLIT: break into power-of-two blocks (red warning if >8). APPLY writes the fix into the region table.
导入区域配置文件,以便检查区域配置的正确性和修改区域配置。
导入区域配置之后,可以在生成页面修改区域配置。
导入配置页面支持两种导入方式:
工具将自动解析导入文件或代码的 PMA 相关配置,并显示在解析结果面板。使用者可以在该面板查看解析出的结果是否正确。
导入生成面板时,只会导入解析正确的区域配置,将舍弃错误的配置。
Import from a .config file or paste the PMA section. From code: paste the snippet and the tool parses the PMA-related lines; click IMPORT once verified. From file: pick a config file or a Verilog `define file; the tool extracts and parses the PMA-related lines into the code box; click IMPORT once verified. The PARSE RESULT panel shows every parsed block (ok/error/unused); only correct regions are imported, invalid ones are dropped.
通过地址映射面板右上角的 CSV 按钮,可以将区域配置导出为 CSV 文件。
| region | attr | base | end | size_hex | size_human |
|---|---|---|---|---|---|
| CA_region0 | Cacheable | 0x10000000 | 0x20000000 | 0x10000000 | 256 MB |
EXPORT CSV (top-right of the address map) downloads regions sorted by base address: attr, base, end (exclusive), size_hex, size_human.