| # | ATTR | BASE | MODE | END / SIZE |
|---|
| NAME | START | MODE | VALUE |
|---|
本工具用于生成和编辑 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). Attributes: Cacheable (CA, cached access), Non-Cacheable (NC, direct main-memory access), Device (DEV, no cache/prefetch/reorder, in-order peripheral access); unconfigured space defaults to Cacheable. Device rows (IREGION/CPPI/PPI/VLM/DLM/ILM/FLASH) emit the matching device lines in the generated config; CPPI/PPI become standalone Device regions, VLM/FLASH are forbidden inside a DEV region and DLM/ILM are not recommended there. 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 相关配置,并显示在解析结果面板。使用者可以在该面板查看解析出的结果是否正确。
导入生成面板时,只会导入解析正确的区域配置,将舍弃错误的配置。
代码框锁定:代码框只在空置时可编辑;载入配置或执行导入/导出后自动只读,此后只有工具可以改写,点击“清空”可重新解锁。
导出:把生成页配置同步回代码框,仅改写发生变化的宏,数值未变的宏按原文保留,因此导出前后对比只显示出实际改动。另存为:把代码框内容通过保存对话框写入本地文件,默认文件名为 .config(不带前缀)。
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.
The code box locks once a config is loaded (CLEAR unlocks it). EXPORT syncs the GENERATE page config back into the box and rewrites only the macros that changed, so the diff shows exactly what the page changed; SAVE AS writes the box to a local file (imported source name, or <PREFIX>.config).
通过地址映射面板右上角的 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.