diff --git a/.gitmodules b/.gitmodules index bcd9fb62..788785c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = sw/deps/printf url = https://github.com/mpaland/printf ignore = dirty +[submodule "sw/deps/cva6-sdk"] + path = sw/deps/cva6-sdk + url = git@github.com:pulp-platform/cva6-sdk.git diff --git a/docs/tg/index.md b/docs/tg/index.md index f416a467..a82bc57d 100644 --- a/docs/tg/index.md +++ b/docs/tg/index.md @@ -15,6 +15,4 @@ Each included target has a *documentation page* in this chapter: ## External Targets -For integration into other SoCs, Cheshire may be included either as a Bender dependency or Git submodule. The use of Bender for dependency management is strongly encouraged. - -For further information and best pratices, see [SoC Integration](integr.md). +For integration into other SoCs, Cheshire may be included either as a Bender dependency or Git submodule. For further information and best pratices, see [SoC Integration](integr.md). diff --git a/docs/tg/integr.md b/docs/tg/integr.md index 23a03e10..eda9399e 100644 --- a/docs/tg/integr.md +++ b/docs/tg/integr.md @@ -17,6 +17,5 @@ include $(shell bender path cheshire)/cheshire.mk All of Cheshire's build targets are now available with the prefix `chs-`. You can leverage this to ensure your Cheshire build is up to date and rebuild hardware and software whenever necessary. You can change the default value of any build parameter, replace source files to adapt Cheshire, or reuse parts of its build system, such as the software stack or the register and ROM generators. - ## Instantiating Cheshire diff --git a/docs/um/arch.md b/docs/um/arch.md index 4434ab77..3d6e5a16 100644 --- a/docs/um/arch.md +++ b/docs/um/arch.md @@ -1,3 +1,51 @@ # Architecture +## Memory Map + ++--------------------+-------------------+-------------+------+-------+ +| Block | Device | Start | Size | Flags | ++====================+===================+=============+======+=======+ +| 256K periphs @ AXI | Debug ROM | 0x0000_0000 | 256K | E | ++--------------------+-------------------+-------------+------+-------+ +| 4K periphs @ AXI | AXI DMA (Cfg) | 0x0100_0000 | 4K | | ++--------------------+-------------------+-------------+------+-------+ +| 256K periphs @ Reg | Boot ROM | 0x0200_0000 | 256K | E | +| +-------------------+-------------+------+-------+ +| | (A)CLINT(s) | 0x0204_0000 | 256K | | +| +-------------------+-------------+------+-------+ +| | CLIC | 0x0208_0000 | 256K | | +| +-------------------+-------------+------+-------+ +| | IRQ router | 0x0210_0000 | 256K | | ++--------------------+-------------------+-------------+------+-------+ +| 4K periphs @ Reg | Regs | 0x0300_0000 | 4K | | +| +-------------------+-------------+------+-------+ +| | LLC (Cfg) | 0x0300_1000 | 4K | | +| +-------------------+-------------+------+-------+ +| | UART | 0x0300_2000 | 4K | | +| +-------------------+-------------+------+-------+ +| | I2C | 0x0300_3000 | 4K | | +| +-------------------+-------------+------+-------+ +| | SPI Host | 0x0300_4000 | 4K | | +| +-------------------+-------------+------+-------+ +| | GPIO | 0x0300_5000 | 4K | | +| +-------------------+-------------+------+-------+ +| | Serial Link (Cfg) | 0x0300_6000 | 4K | | +| +-------------------+-------------+------+-------+ +| | VGA (Cfg) | 0x0300_7000 | 4K | | +| +-------------------+-------------+------+-------+ +| | AXI RT | 0x0300_8000 | 4K | | ++--------------------+-------------------+-------------+------+-------+ +| PLIC @ Reg | PLIC | 0x0400_0000 | 64M | | ++--------------------+-------------------+-------------+------+-------+ +| SPM @ AXI | cached | 0x1000_0000 | 64M | CIE | +| +-------------------+-------------+------+-------+ +| | uncached | 0x1400_0000 | 64M | IE | ++--------------------+-------------------+-------------+------+-------+ +| External | CIE | 0x2000_0000 | 512M | CIE | +| +-------------------+-------------+------+-------+ +| | non-CIE | 0x4000_0000 | 1G | | ++--------------------+-------------------+-------------+------+-------+ +| LLC out (DRAM) | | 0x8000_0000 | ? | CIE | ++--------------------+-------------------+-------------+------+-------+ + ## Boot ROM diff --git a/mkdocs.yml b/mkdocs.yml index d33d9b5b..163b62f8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,6 +17,7 @@ theme: markdown_extensions: - toc: toc_depth: 2 + - markdown_grid_tables: repo_url: https://github.com/pulp-platform/cheshire repo_name: pulp-platform/cheshire diff --git a/requirements.txt b/requirements.txt index 06716f50..58ded7d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ tabulate yapf mkdocs mkdocs-material +markdown-grid-tables diff --git a/sw/deps/cva6-sdk b/sw/deps/cva6-sdk new file mode 160000 index 00000000..3b08b0ea --- /dev/null +++ b/sw/deps/cva6-sdk @@ -0,0 +1 @@ +Subproject commit 3b08b0ea40a259c13443c50e506e6998e73ae1f5 diff --git a/sw/sw.mk b/sw/sw.mk index 6f4edf5d..74ea6ef4 100644 --- a/sw/sw.mk +++ b/sw/sw.mk @@ -137,8 +137,11 @@ $(foreach link,$(patsubst $(CHS_SW_LD_DIR)/%.ld,%,$(wildcard $(CHS_SW_LD_DIR)/*. %.gpt.memh: %.gpt.bin $(CHS_SW_OBJCOPY) -I binary -O verilog $< $@ +# Images from CVA6 SDK (built externally) +CHS_CVA6_SDK_IMGS ?= $(addprefix $(CHS_SW_DIR)/deps/cva6-sdk/install64/,fw_payload.bin uImage) + # Create full Linux disk image -$(CHS_SW_DIR)/boot/linux.gpt.bin: $(CHS_SW_DIR)/boot/zsl.rom.bin $(CHS_SW_DIR)/boot/cheshire.dtb $(CHS_SW_DIR)/boot/install64/fw_payload.bin $(CHS_SW_DIR)/boot/install64/uImage +$(CHS_SW_DIR)/boot/linux.gpt.bin: $(CHS_SW_DIR)/boot/zsl.rom.bin $(CHS_SW_DIR)/boot/cheshire.dtb $(CHS_CVA6_SDK_IMGS) truncate -s $(CHS_SW_DISK_SIZE) $@ sgdisk --clear -g --set-alignment=1 \ --new=1:64:96 --typecode=1:$(CHS_SW_ZSL_TGUID) \