FPGA->ASIC in platforms/sparrow/matcha_hw.mk BUG: 325672220 Change-Id: I60e217ad0b8bda204bc0b3b7b02b8844e9ff0524
diff --git a/platforms/sparrow/matcha_hw.mk b/platforms/sparrow/matcha_hw.mk index 3dd470c..73af09b 100644 --- a/platforms/sparrow/matcha_hw.mk +++ b/platforms/sparrow/matcha_hw.mk
@@ -16,9 +16,9 @@ MATCHA_OUT_DIR := $(OUT)/matcha/hw MATCHA_VERILATOR_TB := $(MATCHA_OUT_DIR)/sim-verilator/Vchip_sim_tb MATCHA_TESTLOG_DIR := $(MATCHA_OUT_DIR)/test-log -MATCHA_FPGA_BINARY_DIR := $(MATCHA_OUT_DIR)/fpga_tests -MATCHA_FPGA_MATCHA_BINARY_DIR := $(MATCHA_FPGA_BINARY_DIR)/matcha -MATCHA_FPGA_KELVIN_BINARY_DIR := $(MATCHA_FPGA_BINARY_DIR)/kelvin +MATCHA_ASIC_BINARY_DIR := $(MATCHA_OUT_DIR)/asic_tests +MATCHA_ASIC_MATCHA_BINARY_DIR := $(MATCHA_ASIC_BINARY_DIR)/matcha +MATCHA_ASIC_KELVIN_BINARY_DIR := $(MATCHA_ASIC_BINARY_DIR)/kelvin BOOT_ROM_ELF := boot_rom.elf $(MATCHA_OUT_DIR): @@ -62,54 +62,54 @@ # matcha_sw_all: | $(MATCHA_OUT_DIR) cd $(MATCHA_SRC_DIR) && \ - bazel build --define DISABLE_VERILATOR_BUILD=true --build_tag_filters="-kelvin_fpga" \ + bazel build --define DISABLE_VERILATOR_BUILD=true --build_tag_filters="-kelvin_asic" \ //sw/device/... cd $(MATCHA_SRC_DIR) && \ find "bazel-out/" \( -type f -name "*.elf" -o -name "*.bin" -o -name "*.vmem" \) \ -exec cp -f --parents "{}" "$(MATCHA_OUT_DIR)" \; -$(MATCHA_FPGA_MATCHA_BINARY_DIR): - mkdir -p $(MATCHA_FPGA_MATCHA_BINARY_DIR) +$(MATCHA_ASIC_MATCHA_BINARY_DIR): + mkdir -p $(MATCHA_ASIC_MATCHA_BINARY_DIR) -## Build test binaries that run on FPGA -matcha_fpga_tests: | $(MATCHA_FPGA_MATCHA_BINARY_DIR) +## Build test binaries that run on ASIC +matcha_asic_tests: | $(MATCHA_ASIC_MATCHA_BINARY_DIR) cd $(MATCHA_SRC_DIR) && \ bazel query //sw/device/tests/... \ - | grep 'fpga_nexus' \ + | grep 'asic' \ | egrep '_bin$$' \ | grep -v '/smc:' \ | grep -v 'kelvin' \ - | grep -v 'example_test_from_rom_rom_prog_fpga_nexus_bin' \ + | grep -v 'example_test_from_rom_rom_prog_asic_bin' \ | xargs bazel build cd $(MATCHA_SRC_DIR) && \ find 'bazel-out/' \ -type f \ - \( -wholename "*ST-*/*fpga_nexus.elf" -o -wholename "*ST-*/*fpga_nexus.bin" \) \ - -exec cp -f '{}' "$(MATCHA_FPGA_MATCHA_BINARY_DIR)" \; + \( -wholename "*ST-*/*asic.elf" -o -wholename "*ST-*/*asic.bin" \) \ + -exec cp -f '{}' "$(MATCHA_ASIC_MATCHA_BINARY_DIR)" \; -$(MATCHA_FPGA_KELVIN_BINARY_DIR): - mkdir -p "$(MATCHA_FPGA_KELVIN_BINARY_DIR)" +$(MATCHA_ASIC_KELVIN_BINARY_DIR): + mkdir -p "$(MATCHA_ASIC_KELVIN_BINARY_DIR)" -## Build Matcha Kelvin SW FPGA test artifacts +## Build Matcha Kelvin SW ASIC test artifacts # -# Build kelvin artifacts and package it in a tarball and ready for use on the FPGA -# The output is at out/matcha/hw/fpga_tests/kelvin +# Build kelvin artifacts and package it in a tarball and ready for use on the ASIC +# The output is at out/matcha/hw/asic_tests/kelvin # -matcha_kelvin_fpga_tarballs: kelvin_sw | $(MATCHA_FPGA_KELVIN_BINARY_DIR) +matcha_kelvin_asic_tarballs: kelvin_sw | $(MATCHA_ASIC_KELVIN_BINARY_DIR) cd $(MATCHA_SRC_DIR) && \ bazel build --define DISABLE_VERILATOR_BUILD=true \ @kelvin-binary//... # Copy the tarballs and sc binary to out/. cd $(MATCHA_SRC_DIR) && \ - find "bazel-out/" -type f -wholename "*fastbuild-*/sw/device/tests/kelvin/fpga_tests/kelvin_test_sc_extflash_fpga_nexus.bin" |\ - xargs -I {} cp -f {} "$(MATCHA_FPGA_KELVIN_BINARY_DIR)" + find "bazel-out/" -type f -wholename "*fastbuild-*/sw/device/tests/kelvin/asic_tests/kelvin_test_sc_extflash_asic.bin" |\ + xargs -I {} cp -f {} "$(MATCHA_ASIC_KELVIN_BINARY_DIR)" cd $(MATCHA_SRC_DIR) && \ find "bazel-bin/external/kelvin-binary" -name "*.tar" |\ - xargs -I {} cp -f {} "$(MATCHA_FPGA_KELVIN_BINARY_DIR)" + xargs -I {} cp -f {} "$(MATCHA_ASIC_KELVIN_BINARY_DIR)" -## Build opentitantool for matcha FPGA tests +## Build opentitantool for matcha ASIC tests opentitantool_pkg: | $(MATCHA_OUT_DIR) cd $(MATCHA_SRC_DIR) && \ bazel build //sw:opentitantool_pkg @@ -133,9 +133,9 @@ # out/matcha/hw/ multihart_boot_rom: | $(MATCHA_OUT_DIR) cd $(MATCHA_SRC_DIR) && \ - bazel build --config=riscv32 //sw/device/lib/testing/test_rom:test_rom_no_otp_fpga_nexus.elf + bazel build --config=riscv32 //sw/device/lib/testing/test_rom:test_rom_no_otp_asic.elf cd $(MATCHA_SRC_DIR) && \ - find "bazel-out/" -wholename "*test_rom/test_rom_no_otp_fpga_nexus.elf" \ + find "bazel-out/" -wholename "*test_rom/test_rom_no_otp_asic.elf" \ -exec cp -f '{}' "$(MATCHA_OUT_DIR)/$(BOOT_ROM_ELF)" \; ## Clean Matcha HW artifact @@ -146,14 +146,14 @@ ## Build the spi_passthough binary # -# This builds the spi_passthrough_fpga_nexus.bin binary that can be used to +# This builds the spi_passthrough_asic.bin binary that can be used to # write flash tarballs to the nexus SPI boot flash. The binary will be copied -# to out/spi_passthrough_fpga_nexus.bin +# to out/spi_passthrough_asic.bin spi_passthrough: | $(OUT) cd $(MATCHA_SRC_DIR) && \ bazel build --define DISABLE_VERILATOR_BUILD=true \ sw/device/examples/spi_passthrough - find "$(MATCHA_SRC_DIR)/bazel-out/" -type f -wholename "*fastbuild-*/sw/device/examples/spi_passthrough/spi_passthrough_fpga_nexus.bin" |\ + find "$(MATCHA_SRC_DIR)/bazel-out/" -type f -wholename "*fastbuild-*/sw/device/examples/spi_passthrough/spi_passthrough_asic.bin" |\ xargs -I '{}' cp -f '{}' "$(OUT)" ## Fetch latest prebuilt opentitantool @@ -163,7 +163,7 @@ .PHONY:: matcha_hw_verilator_sim matcha_hw_clean matcha_hw_verilator_tests .PHONY:: matcha_sw_all opentitantool_pkg -.PHONY:: matcha_kelvin_fpga_tarballs +.PHONY:: matcha_kelvin_asic_tarballs .PHONY:: multihart_boot_rom .PHONY:: spi_passthrough .PHONY:: latest_opentitantool \ No newline at end of file