cva6/docs/design/build.mk
slgth ab2283c075
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled
doc: keep documentation in sync with the code (#2558)
Both the ISA and design documentations use some parameters generated from the RTL (ports, parameters).
As of now, they are committed to the repository and can be out of sync with the code.

This PR removes them from the repository and freshly generates them from the code when building HTML files.

This PR also removes prebuilt HTML files (design & ISA docs) and generates them when building the top-level Read the Docs documentation (make -C docs).
2024-10-25 12:27:09 +02:00

44 lines
1.8 KiB
Makefile

# Copyright 2024 Thales DIS France SAS
# Licensed under the Solderpad Hardware License, Version 2.1 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
# You may obtain a copy of the License at https://solderpad.org/licenses/
#
# Original Author: Jean-Roch COULON - Thales
ifeq ($(CONFIG),)
$(error CONFIG must be defined)
endif
current_dir = $(shell pwd)
# Path of current file, intended to be included by a configuration subfolder
design_dir := $(dir $(lastword $(MAKEFILE_LIST)))
all: design-pdf design-html
setup:
mkdir -p build
cp -r $(design_dir)/design-manual/* build
cp -r $(design_dir)/../riscv-isa/riscv-isa-manual/docs-resources build
cp $(design_dir)/../common/*.adoc build/source
cp -rf source/* build/source
cd ../../../config/gen_from_riscv_config && python3 scripts/riscv_config_gen.py -s ../riscv-config/$(CONFIG)/generated/isa_gen.yaml -i templates/isa_template.yaml -m updaters/$(CONFIG)/isa_updater.yaml -t $(CONFIG) -f adoc
cd ../../../config/gen_from_riscv_config && python3 scripts/riscv_config_gen.py -s ../riscv-config/$(CONFIG)/generated/isa_gen.yaml -c ../riscv-config/$(CONFIG)/generated/custom_gen.yaml -m updaters/$(CONFIG)/csr_updater.yaml -t $(CONFIG) -f adoc
cp -r $(design_dir)/../../config/gen_from_riscv_config/$(CONFIG)/* build/source
cd ../.. && python3 scripts/spec_builder.py --target $(CONFIG) --gen-config $(current_dir)/build/source/config.adoc --gen-parameters $(current_dir)/build/source/parameters.adoc --gen-ports $(current_dir)/build/source
design-pdf: setup
cd build; make SKIP_DOCKER=true build/design.pdf
cp ./build/build/design.pdf design-$(CONFIG).pdf
design-html: setup
cd build; make SKIP_DOCKER=true build/design.html
cp ./build/build/design.html design-$(CONFIG).html
clean:
rm -rf build