From 87d4ca3a0e5a18ed46d9e3b8934e2da9b8832f5b Mon Sep 17 00:00:00 2001 From: Moritz Scherer Date: Wed, 14 Aug 2024 19:16:43 +0200 Subject: [PATCH 1/3] [HW]: Integration of IPs with bumping to relative dependencies - Update IPs dep to include LEF, LIB, DB, GDS - Update Chehsire to already include the built bootrom --- Bender.lock | 14 +++++++------- Bender.yml | 12 ++++++------ README.md | 10 ---------- hw/convolve/chimera_cluster_ethcluster.sv | 1 + target/sim/sim.mk | 4 ++-- 5 files changed, 16 insertions(+), 25 deletions(-) diff --git a/Bender.lock b/Bender.lock index 2aabc52..3c998a1 100644 --- a/Bender.lock +++ b/Bender.lock @@ -69,7 +69,7 @@ packages: - common_cells - register_interface cheshire: - revision: 586cb0225be5c57f5ffcf67bd490763efd9b4d24 + revision: 1f8c3eac515ac09dec98f89f67df6954dd89e17a version: null source: Git: https://github.com/pulp-platform/cheshire.git @@ -150,7 +150,7 @@ packages: - fpnew - tech_cells_generic ethcluster: - revision: 49adaab00aa652adf8601e296b13dedc3f3b6197 + revision: 8bc8ce1e3c63f4120c7055710f9769a9642c64a7 version: null source: Git: git@gitlab.tue.nl:es/convolve-private/ethcluster.git @@ -202,16 +202,16 @@ packages: - common_cells - register_interface kulcluster: - revision: 6da824eb38f6db629cdbca0d7727fec8be545d6b + revision: 6ecccdbe71edbbde6a5bf149938065369616c96e version: null source: Git: git@gitlab.tue.nl:es/convolve-private/kulcluster.git dependencies: [] memory_island: - revision: 64828cb7a9ccc1f1656ec92d06129072f445c319 + revision: 68c31664bfdba02b74bbaf73889fb306e99fe30b version: null source: - Git: https://github.com/pulp-platform/memory_island.git + Git: https://github.com/Lore0599/memory_island dependencies: - axi - cluster_interconnect @@ -291,13 +291,13 @@ packages: dependencies: - common_verification tuddcim: - revision: 5254a92569a24d1eac28cb8093ea2a8f81a855d5 + revision: 45bf36fc1649f8adcb43bb335ca193e6c9f7e566 version: null source: Git: git@gitlab.tue.nl:es/convolve-private/tuddcim.git dependencies: [] tuedcim: - revision: 8b3ec32ffe3487a59b45fa49391e8a36196a64c9 + revision: c7acd066b7e5ed60277078c6ce8c0b31f665e486 version: null source: Git: git@gitlab.tue.nl:es/convolve-private/tuedcim.git diff --git a/Bender.yml b/Bender.yml index 4737649..abf9803 100644 --- a/Bender.yml +++ b/Bender.yml @@ -11,19 +11,19 @@ package: dependencies: register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.4.3 } axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.39.2 } - cheshire: { git: "https://github.com/pulp-platform/cheshire.git", rev: 586cb0225be5c57f5ffcf67bd490763efd9b4d24} + cheshire: { git: "https://github.com/pulp-platform/cheshire.git", rev: 1f8c3eac515ac09dec98f89f67df6954dd89e17a} snitch_cluster: { git: "https://github.com/pulp-platform/snitch_cluster.git", rev: c12ce9b2af1ac8edf3d4feb18939e1ad20c42225} common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.31.1} idma: { git: "https://github.com/pulp-platform/iDMA.git", rev: 9edf489f57389dce5e71252c79e337f527d3aded} - memory_island: { git: "https://github.com/pulp-platform/memory_island.git", rev: 64828cb7a9ccc1f1656ec92d06129072f445c319 } # main branch + memory_island: { git: "https://github.com/Lore0599/memory_island", rev: main } # main branch apb: { git: "https://github.com/pulp-platform/apb.git", version: 0.2.4 } hyperbus: { git: "https://github.com/pulp-platform/hyperbus.git", rev: f039e601c8b6590181734e6d26ff8b77aa380412 } # branch: chi/add_fsm_with_Tcsh tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.12 } - TUEDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuedcim.git", rev: 10102024} + TUEDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuedcim.git", rev: 22112024-2} TUEMEGA: { git: "git@gitlab.tue.nl:es/convolve-private/tuemega.git", rev: 11102024} - TUDDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuddcim.git", rev: 11102024-6} - KULCLUSTER: { git: "git@gitlab.tue.nl:es/convolve-private/kulcluster.git", rev: 17102024} - ETHCluster: { git: "git@gitlab.tue.nl:es/convolve-private/ethcluster.git", rev: 17102024-4} + TUDDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuddcim.git", rev: 28112024-3} + KULCLUSTER: { git: "git@gitlab.tue.nl:es/convolve-private/kulcluster.git", rev: 29112024} + ETHCluster: { git: "git@gitlab.tue.nl:es/convolve-private/ethcluster.git", rev: 31102024-3} export_include_dirs: - hw/include diff --git a/README.md b/README.md index c0e864c..daf13ce 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,6 @@ pip install -r requirements.txt bender checkout ``` -If you have all needed dependencies and you want to build the entire Chimera SoC, both RTL and SW, just run - -``` shell -make chim-all -``` -If you want to build the system step by step, all the necessary make targets are listed below: To build Cheshire and Snitch run ``` shell @@ -53,10 +47,6 @@ To regenerate software tests and libraries: This step must be executed before building the hardware to ensure the correct generation of the bootrom. -To build the host device bootrom: - -`make chim-bootrom-init` - To build Chehsire simulation files for ModelSim: `make chs-sim-all` diff --git a/hw/convolve/chimera_cluster_ethcluster.sv b/hw/convolve/chimera_cluster_ethcluster.sv index 5149481..e95bd37 100644 --- a/hw/convolve/chimera_cluster_ethcluster.sv +++ b/hw/convolve/chimera_cluster_ethcluster.sv @@ -216,6 +216,7 @@ module chimera_cluster_ethcluster .hart_base_id_i (hart_base_id_i), .cluster_base_addr_i(cluster_base_addr_i), + .boot_addr_i ({16'h0, boot_addr_i}), .narrow_in_req_i (clu_axi_adapter_slv_req), .narrow_in_resp_o (clu_axi_adapter_slv_resp), diff --git a/target/sim/sim.mk b/target/sim/sim.mk index 9f0261f..3f28635 100644 --- a/target/sim/sim.mk +++ b/target/sim/sim.mk @@ -33,9 +33,10 @@ CHIM_VLOG_ARGS += +define+HYP0_PRELOAD_MEM_FILE=\"$(HYP0_PRELOAD_MEM_FILE)\" # an absolute path produce inter-CI-runner file accesses CHIM_VLOG_ARGS += +define+PATH_TO_HYP_SDF=\"../models/s27ks0641/s27ks0641.sdf\" + # Generate vsim compilation script $(CHIM_SIM_DIR)/vsim/compile.tcl: chs-hw-init snitch-hw-init - @bender script vsim $(SIM_TARGS) --vlog-arg="$(CHIM_VLOG_ARGS)" > $@ + @bender script vsim $(SIM_TARGS) $(EXT_TARGS) --vlog-arg="$(CHIM_VLOG_ARGS)" > $@ echo 'vlog "$(realpath $(CHS_ROOT))/target/sim/src/elfloader.cpp" -ccflags "-std=c++11"' >> $@ # Clean @@ -45,5 +46,4 @@ chim-sim-clean: @rm -rf $(CHIM_SIM_DIR)/vsim/transcript @rm -f $(CHIM_SIM_DIR)/vsim/compile.tcl - endif # chim_sim_mk From f1b8d06ea86b04320ed36dea6827fff830365ded Mon Sep 17 00:00:00 2001 From: Lorenzo Leone Date: Wed, 4 Dec 2024 12:13:52 +0100 Subject: [PATCH 2/3] Bump TUD with new RTL and correct mem instantiation --- Bender.lock | 10 +++++----- Bender.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Bender.lock b/Bender.lock index 3c998a1..dc847ee 100644 --- a/Bender.lock +++ b/Bender.lock @@ -15,8 +15,8 @@ packages: - apb - register_interface axi: - revision: 853ede23b2a9837951b74dbdc6d18c3eef5bac7d - version: 0.39.5 + revision: 39f5f2d51c5e524f6fc5cf8b6e901f7dcc5622d7 + version: 0.39.6 source: Git: https://github.com/pulp-platform/axi.git dependencies: @@ -134,8 +134,8 @@ packages: - common_verification - tech_cells_generic common_verification: - revision: 9c07fa860593b2caabd9b5681740c25fac04b878 - version: 0.2.3 + revision: fa2630f61666f61d9d78451c4d8b4d1ea403944e + version: 0.2.4 source: Git: https://github.com/pulp-platform/common_verification.git dependencies: [] @@ -291,7 +291,7 @@ packages: dependencies: - common_verification tuddcim: - revision: 45bf36fc1649f8adcb43bb335ca193e6c9f7e566 + revision: a8697fae66ebc68aa09380e3d26f1edf01f815d6 version: null source: Git: git@gitlab.tue.nl:es/convolve-private/tuddcim.git diff --git a/Bender.yml b/Bender.yml index abf9803..facd56d 100644 --- a/Bender.yml +++ b/Bender.yml @@ -21,7 +21,7 @@ dependencies: tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.12 } TUEDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuedcim.git", rev: 22112024-2} TUEMEGA: { git: "git@gitlab.tue.nl:es/convolve-private/tuemega.git", rev: 11102024} - TUDDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuddcim.git", rev: 28112024-3} + TUDDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuddcim.git", rev: 04122024-2} KULCLUSTER: { git: "git@gitlab.tue.nl:es/convolve-private/kulcluster.git", rev: 29112024} ETHCluster: { git: "git@gitlab.tue.nl:es/convolve-private/ethcluster.git", rev: 31102024-3} From 167a1db3246adc318d83dabefcdfd9d5c054282e Mon Sep 17 00:00:00 2001 From: Lorenzo Leone Date: Wed, 4 Dec 2024 18:03:46 +0100 Subject: [PATCH 3/3] Integrate new KUL cluster with only 2 cores. - Change the number of CLINT,PLIC and PLIC_INTRS cores to build the system - Modify offload.h and chimera_pkg.sv to map only 2 cores in KULCluster --- Bender.lock | 2 +- Bender.yml | 2 +- chimera.mk | 6 +++--- hw/chimera_pkg.sv | 2 +- sw/include/soc_addr_map.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Bender.lock b/Bender.lock index dc847ee..5c5ee08 100644 --- a/Bender.lock +++ b/Bender.lock @@ -202,7 +202,7 @@ packages: - common_cells - register_interface kulcluster: - revision: 6ecccdbe71edbbde6a5bf149938065369616c96e + revision: 40cc14bcae5b0a3a7346d8d45b027e5ab16170d3 version: null source: Git: git@gitlab.tue.nl:es/convolve-private/kulcluster.git diff --git a/Bender.yml b/Bender.yml index facd56d..028b70d 100644 --- a/Bender.yml +++ b/Bender.yml @@ -22,7 +22,7 @@ dependencies: TUEDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuedcim.git", rev: 22112024-2} TUEMEGA: { git: "git@gitlab.tue.nl:es/convolve-private/tuemega.git", rev: 11102024} TUDDCIM: { git: "git@gitlab.tue.nl:es/convolve-private/tuddcim.git", rev: 04122024-2} - KULCLUSTER: { git: "git@gitlab.tue.nl:es/convolve-private/kulcluster.git", rev: 29112024} + KULCLUSTER: { git: "git@gitlab.tue.nl:es/convolve-private/kulcluster.git", rev: 04122024-3} ETHCluster: { git: "git@gitlab.tue.nl:es/convolve-private/ethcluster.git", rev: 31102024-3} export_include_dirs: diff --git a/chimera.mk b/chimera.mk index 444a5d3..8e41a5d 100644 --- a/chimera.mk +++ b/chimera.mk @@ -6,9 +6,9 @@ # Lorenzo Leone -CLINTCORES = 19 -PLICCORES = 38 -PLIC_NUM_INTRS = 38 +CLINTCORES = 18 +PLICCORES = 36 +PLIC_NUM_INTRS = 36 .PHONY: update_plic diff --git a/hw/chimera_pkg.sv b/hw/chimera_pkg.sv index 90404d4..6299c25 100644 --- a/hw/chimera_pkg.sv +++ b/hw/chimera_pkg.sv @@ -36,7 +36,7 @@ package chimera_pkg; localparam cluster_config_t ChimeraClusterCfg = '{ hasWideMasterPort: {1'b1, 1'b1, 1'b1, 1'b1, 1'b1}, - NrCores: {8'h9, 8'h3, 8'h2, 8'h2, 8'h2} + NrCores: {8'h9, 8'h2, 8'h2, 8'h2, 8'h2} }; function automatic int _sumVector(byte_bt [iomsb(ExtClusters):0] vector, int vectorLen); diff --git a/sw/include/soc_addr_map.h b/sw/include/soc_addr_map.h index bdd175f..a1d5e1c 100644 --- a/sw/include/soc_addr_map.h +++ b/sw/include/soc_addr_map.h @@ -23,7 +23,7 @@ #define CLUSTER_0_NUMCORES 2 #define CLUSTER_1_NUMCORES 2 #define CLUSTER_2_NUMCORES 2 -#define CLUSTER_3_NUMCORES 3 +#define CLUSTER_3_NUMCORES 2 #define CLUSTER_4_NUMCORES 9 static uint8_t _chimera_numCores[] = {CLUSTER_0_NUMCORES, CLUSTER_1_NUMCORES, CLUSTER_2_NUMCORES,