diff --git a/Bender.local b/Bender.local index 9f104646..1fd7ef34 100644 --- a/Bender.local +++ b/Bender.local @@ -13,4 +13,4 @@ overrides: hier-icache: { git: "https://github.com/pulp-platform/hier-icache.git" , rev: a7e3f4e4c7fe607bcd6b9d94db77f612fd6ef6be } scm: { git: "https://github.com/pulp-platform/scm.git" , rev: f7b51416f3c407e4c31e9c016616d57aae2687bd } cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", rev: 89e1019d64a86425211be6200770576cbdf3e8b3 } # branch: assertion-fix - obi: { git: "https://github.com/pulp-platform/obi.git" , rev: c54a7374bce9f4239c07f950ced339af926b5ff8 } # branch: atops + obi: { git: "https://github.com/pulp-platform/obi.git" , rev: c54a7374bce9f4239c07f950ced339af926b5ff8 } # branch: atops \ No newline at end of file diff --git a/Bender.lock b/Bender.lock index fc41a889..ea248444 100644 --- a/Bender.lock +++ b/Bender.lock @@ -189,7 +189,7 @@ packages: revision: 9c07fa860593b2caabd9b5681740c25fac04b878 version: 0.2.3 source: - Git: https://github.com/pulp-platform/common_verification.git + Git: https://github.com/pulp-platform/common_verification dependencies: [] cv32e40p: revision: 9b77611a1d0c681f4819798d95422b0b895528a2 @@ -348,7 +348,7 @@ packages: - common_cells - common_verification opentitan: - revision: ed1e7f1d53e28de556a3b02bc1bd1b855f51af15 + revision: cce5a6e0bacba31374109969adcd7abb0f70f7ec version: null source: Git: https://github.com/alsaqr-platform/opentitan.git @@ -371,7 +371,7 @@ packages: dependencies: - axi_slice pulp_cluster: - revision: bd8182aaa33f2b0ac7bf924621f094a382d8ab17 + revision: a746000f9dc9965e1351186905b59bca36edef57 version: null source: Git: https://github.com/pulp-platform/pulp_cluster.git @@ -433,7 +433,7 @@ packages: - common_cells - common_verification riscv: - revision: 4ceb402db8619718a9170058bb31f75fcdf7ed1c + revision: 4eac53237c6d0062715d17016fe95462eb81ebc3 version: null source: Git: git@github.com:AlSaqr-platform/riscv_nn.git @@ -486,7 +486,7 @@ packages: - common_cells - register_interface spatz: - revision: dbc4c442bd54a538bcafd0d62fec2b608a359dc3 + revision: 05b01d6a0045496ad82d393355158e3b3438438e version: null source: Git: git@iis-git.ee.ethz.ch:spatz/spatz.git diff --git a/Bender.yml b/Bender.yml index 5ad9d03f..983a11cb 100644 --- a/Bender.yml +++ b/Bender.yml @@ -16,14 +16,14 @@ dependencies: hyperbus: { git: https://github.com/pulp-platform/hyperbus.git, rev: 2adb7271438cdb96c19fbaf3e2a6bf89ffeee568 } # branch: lv/phys_in_use car_l2: { git: git@iis-git.ee.ethz.ch:carfield/carfield_l2_mem.git, rev: 08503a05307ef556ed5439619c70c039ff93d77a } # branch: main safety_island: { git: git@iis-git.ee.ethz.ch:carfield/safety-island.git, rev: 60e768a3ef29f47339e31674d497293f5a768893 } # branch: atops - pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: bd8182aaa33f2b0ac7bf924621f094a382d8ab17 } # branch: yt/carfield-integration - opentitan: { git: https://github.com/alsaqr-platform/opentitan.git, rev: ed1e7f1d53e28de556a3b02bc1bd1b855f51af15 } # branch: lowRISC-rebase + pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: a746000f9dc9965e1351186905b59bca36edef57 } # branch: yt/carfield-integration + opentitan: { git: https://github.com/alsaqr-platform/opentitan.git, rev: cce5a6e0bacba31374109969adcd7abb0f70f7ec } # branch: yt/hartid mailbox_unit: { git: git@github.com:pulp-platform/mailbox_unit.git, version: 1.1.0 } apb: { git: https://github.com/pulp-platform/apb.git, version: 0.2.3 } timer_unit: { git: https://github.com/pulp-platform/timer_unit.git, version: 1.0.2 } apb_adv_timer: { git: https://github.com/pulp-platform/apb_adv_timer.git, version: 1.0.4 } can_bus: { git: git@github.com:AlSaqr-platform/can_bus.git, rev: 230222cc568b49b39a3385b12edaf680657bc69d } - spatz: { git: git@iis-git.ee.ethz.ch:spatz/spatz.git, rev: dbc4c442bd54a538bcafd0d62fec2b608a359dc3 } # branch: main + spatz: { git: git@iis-git.ee.ethz.ch:spatz/spatz.git, rev: 05b01d6a0045496ad82d393355158e3b3438438e } # branch: yt/hartid bus_err_unit: { git: git@iis-git.ee.ethz.ch:carfield/bus_err_unit.git, rev: 47a6436dc4b4b7f4a44f7786033b22c6d01530b2 } # branch: main common_cells: { git: https://github.com/pulp-platform/common_cells.git, version: 1.30.0 } diff --git a/carfield.mk b/carfield.mk index 8a1548f9..6cfdb270 100644 --- a/carfield.mk +++ b/carfield.mk @@ -131,6 +131,7 @@ $(CAR_ROOT)/tb/hyp_vip: cp model_tmp/exe_folder/S27ks0641/model/s27ks0641.v model_tmp/exe_folder/S27ks0641/model/s27ks0641_verilog.sdf $@ rm -rf model_tmp +.PHONY: scripts/carfield_compile.tcl scripts/carfield_compile.tcl: $(BENDER) script vsim $(TARGETS) $(DEFINES) --vlog-arg="$(VLOG_ARGS)" > $@ echo 'vlog "$(CURDIR)/$(CHS_ROOT)/target/sim/src/elfloader.cpp" -ccflags "-std=c++11"' >> $@ diff --git a/hw/carfield.sv b/hw/carfield.sv index 2f521a83..d1b943ab 100644 --- a/hw/carfield.sv +++ b/hw/carfield.sv @@ -1505,6 +1505,7 @@ spatz_cluster_wrapper #( logic secd_mbox_intr; secure_subsystem_synth_wrap #( + .HartIdOffs ( OpnTitHartIdOffs ), .AxiAddrWidth ( Cfg.AddrWidth ), .AxiDataWidth ( Cfg.AxiDataWidth ), .AxiUserWidth ( Cfg.AxiUserWidth ), diff --git a/hw/carfield_pkg.sv b/hw/carfield_pkg.sv index 78552f3b..f61b6f30 100644 --- a/hw/carfield_pkg.sv +++ b/hw/carfield_pkg.sv @@ -152,9 +152,20 @@ localparam bit [3:0] AxiNumExtSlv = 3'd2 + 3'd1 + 3'd1 + 3'd1 + 3'd1 + 3'd1 + 3' // Ext Masters: Integer Cluster + Security Island + Safety Island + Floating Point Cluster localparam bit [2:0] AxiNumExtMst = 3'd1 + 3'd1 + 3'd1 + 3'd1; +// Hart IDs +typedef bit [5:0] hartid_t; + +typedef enum hartid_t { + ChsHartIdOffs = 'd0 , + OpnTitHartIdOffs = 'd4 , + SafetyIslHartIdOffs = 'd8 , + SpatzHartIdOffs = 'd16, + PulpHartIdOffs = 'd32 +} hartid_offs_e; + // Safety island configuration localparam safety_island_cfg_t SafetyIslandCfg = '{ - HartId: 32'd8, + HartId: SafetyIslHartIdOffs, BankNumBytes: 32'h0001_0000, // JTAG ID code: // LSB [0]: 1'h1 @@ -362,8 +373,8 @@ localparam int unsigned IntClusterAxiIdInWidth = $clog2(IntClusterNumCacheBanks) localparam int unsigned IntClusterAxiIdOutWidth = IntClusterAxiIdInWidth + $clog2(IntClusterNumAxiSlv); localparam int unsigned IntClusterMaxUniqId = 1; -localparam logic [ 5:0] IntClusterIndex = '0; localparam int unsigned IntClusterNumEoc = 1; +localparam logic [ 5:0] IntClusterIndex = (PulpHartIdOffs >> 5); /*******************************/ /* Narrow Parameters: A32, D32 */