Skip to content

Commit

Permalink
Create caliptra-rtl 1.0 submodule, update latest to 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
korran committed Feb 27, 2024
1 parent af9d5a6 commit b305b01
Show file tree
Hide file tree
Showing 57 changed files with 22,726 additions and 39 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-test-verilator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
- name: Check that generated register code matches caliptra-rtl submodule
run: |
cargo run --locked -p caliptra_registers_generator -- --check hw/latest/rtl registers/bin/extra-rdl hw/latest/registers/src
cargo run --locked -p caliptra_registers_generator -- --check hw/1.0/rtl registers/bin/extra-rdl hw/1.0/registers/src
- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fpga.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: |
# Compute the key from the tree hash of the fpga directory and the rtl
# root directory.
echo "rtl_cache_key=$(git rev-parse HEAD:hw/fpga/src)-$(git hash-object hw/fpga/fpga_configuration.tcl)-$(cd hw/latest/rtl && git rev-parse HEAD:)-${{ inputs.fpga-itrng }}-${{ env.CACHE_BUSTER }}" >> $GITHUB_OUTPUT
echo "rtl_cache_key=$(git rev-parse HEAD:hw/fpga/src)-$(git hash-object hw/fpga/fpga_configuration.tcl)-$(cd hw/1.0/rtl && git rev-parse HEAD:)-${{ inputs.fpga-itrng }}-${{ env.CACHE_BUSTER }}" >> $GITHUB_OUTPUT
echo "kmod_cache_key=fpga-kernel-modules-$(git rev-parse HEAD:hw/fpga/io_module)-$(git rev-parse HEAD:hw/fpga/rom_backdoor)-${{ env.CACHE_BUSTER }}" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
while git tag | grep ${TAG_BASE}${INDEX}; do
((INDEX+=1))
done
git submodule update --remote hw/1.0/rtl
git submodule update --remote hw/latest/rtl
CHECK_RELEASE_SYNC=$(git status --porcelain | head -1)
MOST_RECENT_RELEASE=None
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/rtl-repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ jobs:

- uses: actions/checkout@v3
with:
submodules: 'true'
ref: 'main'

- name: Update the Caliptra RTL submodule and rebuild registers
run: |
echo "RTL-REPO-SYNC: release_ref=$(git rev-parse HEAD)"
# Submodules need to be initialized here rather than actions/checkout
# so that git can find the main_1.0 branch when updating the
# hw/1.0/rtl submodule below. Otherwise, it hides the non-main
# branches.
git submodule update --init
git submodule update --remote hw/latest/rtl
git submodule update --remote hw/1.0/rtl
./registers/update.sh
- name: Find available branch name
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
path = hw/latest/rtl
url = https://github.com/chipsalliance/caliptra-rtl
branch = main
[submodule "hw/1.0/rtl"]
path = hw/1.0/rtl
url = https://github.com/chipsalliance/caliptra-rtl
branch = main_1.0
[submodule "dpe"]
path = dpe
url = https://github.com/chipsalliance/caliptra-dpe.git
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ members = [
"drivers/test-fw/scripts/vector_gen",
"fmc",
"fmc/test-fw/test-rt",
"hw/1.0/registers",
"hw/latest/registers",
"hw/verilated",
"hw-model",
Expand Down Expand Up @@ -121,6 +122,7 @@ caliptra-image-verify = { path = "image/verify", default-features = false }
caliptra-kat = { path = "kat" }
caliptra-lms-types = { path = "lms-types" }
caliptra-registers = { path = "registers" }
caliptra-registers-1_0 = { path = "hw/1.0/registers" }
caliptra-registers-latest = { path = "hw/latest/registers" }
caliptra-runtime = { path = "runtime", default-features = false }
caliptra-systemrdl = { path = "systemrdl" }
Expand Down
1 change: 1 addition & 0 deletions ci-tools/file-header-fix/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const IGNORED_PATHS: &[&str] = &[
"./runtime/dpe",
"./hw-latest/fpga/caliptra_build",
"./hw/fpga/caliptra_build",
"./hw/1.0/rtl",
"./hw/latest/rtl",
"./ci-tools/fpga-boss/image/mnt",
"./ci-tools/fpga-image/out",
Expand Down
4 changes: 2 additions & 2 deletions ci-tools/release/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cp -a target/riscv32imc-unknown-none-elf/firmware/caliptra-fmc $WORKSPACE_DIR/fa
cp -a target/riscv32imc-unknown-none-elf/firmware/caliptra-runtime $WORKSPACE_DIR/fake-caliptra-runtime.elf

# Copy RTL
cp -rf hw/latest/rtl $WORKSPACE_DIR/caliptra-rtl
cp -rf hw/1.0/rtl $WORKSPACE_DIR/caliptra-rtl
# Copy libcaliptra
cp -rf libcaliptra $WORKSPACE_DIR/libcaliptra
# Copy FPGA Model
Expand All @@ -64,7 +64,7 @@ cp $release_scripts_path/tools/rtl_hash.sh $WORKSPACE_DIR/
# Generate Notes
echo -e "Caliptra HW Release Note " > $WORKSPACE_DIR/release_notes.txt
echo -e "Nightly $1" >> $WORKSPACE_DIR/release_notes.txt
echo -e "Caliptra-RTL Rev: $(git rev-parse HEAD:hw/latest/rtl)" >> $WORKSPACE_DIR/release_notes.txt
echo -e "Caliptra-RTL Rev: $(git rev-parse HEAD:hw/1.0/rtl)" >> $WORKSPACE_DIR/release_notes.txt
echo -e "Caliptra-SW Rev: $(git rev-parse HEAD)" >> $WORKSPACE_DIR/release_notes.txt
echo -e "RTL hash (see rtl_hash.sh): $rtl_hash" >> $WORKSPACE_DIR/release_notes.txt
echo -e "Content:" >> $WORKSPACE_DIR/release_notes.txt
Expand Down
2 changes: 1 addition & 1 deletion hw-model/c-binding/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
EXTRA_CARGO_CONFIG = target.'cfg(all())'.rustflags = [\"-Dwarnings\"]
OUT = out
TARGET = $(OUT)/smoke_test
RTL_SOC_IFC_INCLUDE_PATH = ../../../hw/latest/rtl/src/soc_ifc/rtl
RTL_SOC_IFC_INCLUDE_PATH = ../../../hw/1.0/rtl/src/soc_ifc/rtl
BUILDER_PATH = ../../../builder
CALIPTRA_MODEL_PATH = ../out
CFLAGS += -I$(RTL_SOC_IFC_INCLUDE_PATH) -I$(CALIPTRA_MODEL_PATH)
Expand Down
11 changes: 11 additions & 0 deletions hw/1.0/registers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Licensed under the Apache-2.0 license.

[package]
name = "caliptra-registers-1_0"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ureg.workspace = true
Loading

0 comments on commit b305b01

Please sign in to comment.