From a2db318564b3494311877b403a139f7e88f1c4c5 Mon Sep 17 00:00:00 2001 From: Diyou Shen Date: Mon, 25 Nov 2024 15:01:53 +0100 Subject: [PATCH] [SRC][CFG] Add configuration of N_FPU and N_IPU from cfg files to source. --- hw/system/spatz_cluster/src/spatz_cluster.sv | 5 +++++ hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/system/spatz_cluster/src/spatz_cluster.sv b/hw/system/spatz_cluster/src/spatz_cluster.sv index 5cd94d5c..f5c5da97 100644 --- a/hw/system/spatz_cluster/src/spatz_cluster.sv +++ b/hw/system/spatz_cluster/src/spatz_cluster.sv @@ -60,6 +60,9 @@ module spatz_cluster /// # Core-global parameters /// FPU configuration. parameter fpu_implementation_t FPUImplementation [NrCores] = '{default: fpu_implementation_t'(0)}, + /// Spatz FPU/IPU Configuration + parameter int unsigned NumSpatzFPUs = 4, + parameter int unsigned NumSpatzIPUs = 1, /// Per-core enabling of the custom `Xdma` ISA extensions. parameter bit [NrCores-1:0] Xdma = '{default: '0}, /// # Per-core parameters @@ -1031,6 +1034,8 @@ module spatz_cluster .RegisterOffloadRsp (RegisterOffloadRsp ), .RegisterCoreReq (RegisterCoreReq ), .RegisterCoreRsp (RegisterCoreRsp ), + .NumSpatzFPUs (NumSpatzFPUs ), + .NumSpatzIPUs (NumSpatzIPUs ), .TCDMAddrWidth (SPMAddrWidth ) ) i_spatz_cc ( .clk_i (clk_i ), diff --git a/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl b/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl index 8f72d676..f57c014b 100644 --- a/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl +++ b/hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl @@ -537,6 +537,8 @@ module ${cfg['name']}_wrapper .ICacheLineCount (${cfg['pkg_name']}::ICacheLineCount), .ICacheSets (${cfg['pkg_name']}::ICacheSets), .FPUImplementation (${cfg['pkg_name']}::FPUImplementation), + .NumSpatzFPUs (${cfg['n_fpu']}), + .NumSpatzIPUs (${cfg['n_ipu']}), .SnitchPMACfg (${cfg['pkg_name']}::SnitchPMACfg), .NumIntOutstandingLoads (NumIntOutstandingLoads), .NumIntOutstandingMem (NumIntOutstandingMem),