Skip to content

Commit

Permalink
treewide: Further work on doc, add CVA6 SDK submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsc96 committed Jul 21, 2023
1 parent f84a75e commit 9dc1a26
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [email protected]:pulp-platform/cva6-sdk.git
4 changes: 1 addition & 3 deletions docs/tg/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
1 change: 0 additions & 1 deletion docs/tg/integr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

48 changes: 48 additions & 0 deletions docs/um/arch.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tabulate
yapf
mkdocs
mkdocs-material
markdown-grid-tables
1 change: 1 addition & 0 deletions sw/deps/cva6-sdk
Submodule cva6-sdk added at 3b08b0
5 changes: 4 additions & 1 deletion sw/sw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 9dc1a26

Please sign in to comment.