diff --git a/Bender.lock b/Bender.lock index afb4b2807..fb8ea5b57 100644 --- a/Bender.lock +++ b/Bender.lock @@ -24,8 +24,8 @@ packages: - obi_peripherals - register_interface axi: - revision: 78831b6feba265d5ee2683bbf42b4150f8a35c43 - version: 0.39.8 + revision: a256a3b86394fedf19e361047fccfdd7f6ef83e4 + version: 0.39.9 source: Git: https://github.com/pulp-platform/axi.git dependencies: @@ -48,8 +48,8 @@ packages: dependencies: - axi_slice axi_llc: - revision: 559bcbd09a5a884dbe31e2d72fd95d024e357f39 - version: 0.2.1 + revision: 59bb8a681347e1133f11a82190fbf4bc11900d9e + version: 0.2.2 source: Git: https://github.com/pulp-platform/axi_llc.git dependencies: @@ -68,8 +68,8 @@ packages: - common_cells - common_verification axi_rt: - revision: 50153a346b753dc2bc7723c446656a43db35d02d - version: 0.0.0-alpha.10 + revision: d5f857e74d0a5db4e4a2cc3652ca4f40f29a1484 + version: 0.0.0-alpha.8 source: Git: https://github.com/pulp-platform/axi_rt.git dependencies: @@ -131,8 +131,8 @@ packages: - serial_link - unbent clic: - revision: 8ed76ffc779a435d0ed034f3068e4c3334fe2ecf - version: 2.0.0 + revision: 40ae266dab5768f63ca8dabe70e7474feb403bab + version: null source: Git: https://github.com/pulp-platform/clic.git dependencies: @@ -165,15 +165,15 @@ packages: dependencies: - common_cells cluster_peripherals: - revision: 0b8e8ab9e6be3a5030a18256bb7e75cf6b6f6cac + revision: 56b5c9212c71c515b9f68f8abdf5dedb3d0f57bf version: null source: Git: https://github.com/pulp-platform/cluster_peripherals.git dependencies: - hci common_cells: - revision: 9afda9abb565971649c2aa0985639c096f351171 - version: 1.38.0 + revision: 9ca8a7655f741e7dd5736669a20a301325194c28 + version: 1.39.0 source: Git: https://github.com/pulp-platform/common_cells.git dependencies: @@ -195,7 +195,7 @@ packages: - fpnew - tech_cells_generic cv32e40x: - revision: 96b933ac2f723351872da55e7d2e9a82abd5df34 + revision: baba1eeb3b845306c45be714f677ff786753f136 version: null source: Git: https://github.com/pulp-platform/cv32e40x.git @@ -211,8 +211,8 @@ packages: - fpnew - tech_cells_generic dram_rtl_sim: - revision: 2cac4a9e12a60537567276b539ab6c919c87b5dc - version: 0.1.1 + revision: a764d5200a19cdd72a5237cbfb16985515a3058d + version: 0.1.2 source: Git: https://github.com/pulp-platform/dram_rtl_sim.git dependencies: @@ -261,7 +261,7 @@ packages: dependencies: - common_cells hci: - revision: 2a5a5081a2b32f1a04e7e28c00d3762d92602b84 + revision: d6a4872b6327a4da7749cd0c4ac8bd24e1b0d73b version: null source: Git: https://github.com/pulp-platform/hci.git @@ -285,15 +285,16 @@ packages: - scm - tech_cells_generic hwpe-ctrl: - revision: 3690a3c648f120546d8de2bc583d5170c36d2f20 - version: 2.0.0 + revision: dfcf1cb746709de206377388bbcb4a3571e24f7b + version: null source: Git: https://github.com/pulp-platform/hwpe-ctrl.git dependencies: + - common_cells - tech_cells_generic hwpe-stream: - revision: b3d33afdd27e79bcda1348d0ab5f4afd52c03106 - version: 1.9.0 + revision: 24ce836892e244ac00ce607d26a3b3df8650dbff + version: null source: Git: https://github.com/pulp-platform/hwpe-stream.git dependencies: @@ -322,10 +323,10 @@ packages: Git: https://github.com/pulp-platform/icache-intc.git dependencies: [] idma: - revision: ff5d56fffb3767814db88d6bf8f381974ea33aa5 - version: 0.6.4 + revision: 28a36e5e07705549e59fc33db96ab681bc1ca88e + version: 0.6.5 source: - Git: https://github.com/pulp-platform/iDMA.git + Git: https://github.com/pulp-platform/idma.git dependencies: - axi - axi_stream @@ -430,7 +431,7 @@ packages: - idma - register_interface pulp_cluster: - revision: 8d52225e9c3f0cb2ea3761658e05479f2ca48862 + revision: dbdbff4bda1461ff128bd908a91a5208773a9ab5 version: null source: Git: https://github.com/pulp-platform/pulp_cluster.git @@ -444,6 +445,7 @@ packages: - common_cells - cv32e40p - event_unit_flex + - flex-v - hci - hier-icache - ibex @@ -454,13 +456,12 @@ packages: - redmule - redundancy_cells - register_interface - - flex-v - scm - softex - tech_cells_generic - timer_unit redmule: - revision: 78696fb0d6d429bdad2e38740792648d44095605 + revision: 7fa9fbe8a29e8572810ae12b92c19749045ac860 version: null source: Git: https://github.com/pulp-platform/redmule.git @@ -473,8 +474,6 @@ packages: - hwpe-ctrl - hwpe-stream - ibex - - obi - - register_interface - tech_cells_generic redundancy_cells: revision: 9e31f7c6c24877eaf58279903e7a162b16c9a721 @@ -487,8 +486,8 @@ packages: - register_interface - tech_cells_generic register_interface: - revision: 5daa85d164cf6b54ad061ea1e4c6f3624556e467 - version: 0.4.5 + revision: d6e1d4cdaab7870f4faf3f88a1c788eaf5ac129d + version: 0.4.7 source: Git: https://github.com/pulp-platform/register_interface.git dependencies: @@ -497,8 +496,8 @@ packages: - common_cells - common_verification riscv-dbg: - revision: 358f90110220adf7a083f8b65d157e836d706236 - version: 0.8.1 + revision: 138d74bcaa90c70180c12215db3776813d2a95f2 + version: 0.8.0 source: Git: https://github.com/pulp-platform/riscv-dbg.git dependencies: diff --git a/Bender.yml b/Bender.yml index 83f3f4723..cb14fc198 100644 --- a/Bender.yml +++ b/Bender.yml @@ -16,7 +16,7 @@ dependencies: cheshire: { git: https://github.com/pulp-platform/cheshire.git, rev: b3bb66bc3d4ca2b691061e060d93f0231aa132f0 } # branch: main hyperbus: { git: https://github.com/pulp-platform/hyperbus.git, rev: 841deb9d821b63bf05a1c85d3a4746352a8bcae2 } # branch: aottaviano/nonfree dyn_mem: { git: https://github.com/pulp-platform/dyn_spm.git, rev: 6753d2046da6dfc8efbef5e6f22053a621f111d9 } # branch: astral - pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: 8d52225e9c3f0cb2ea3761658e05479f2ca48862 } # branch: lg/isolde + pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: a85af003454c2a2314241e2b55638bbc4e0fdf8e } # branch: lg/isolde opentitan: { git: https://github.com/pulp-platform/opentitan.git, rev: 42df2697ad3d07608df942cb7e1928c05558af26 } # branch: mc/astral mailbox_unit: { git: https://github.com/pulp-platform/mailbox_unit.git, version: 1.1.0 } apb: { git: https://github.com/pulp-platform/apb.git, version: 0.2.3 } diff --git a/doc/mini_doc.md b/doc/mini_doc.md index 0dbbe4d50..9695d6b6a 100644 --- a/doc/mini_doc.md +++ b/doc/mini_doc.md @@ -46,7 +46,7 @@ To build Astral, you will need: - `tabulate` package - RISCV GCC toolchain `>= 11.2.0` - PULP RV32 GCC toolchain [`1.0.16`](https://github.com/pulp-platform/pulp-riscv-gnu-toolchain/releases/tag/v1.0.16) -- Bender `>= 0.27.1` (see [Install Bender](#0-install-bender)) +- Bender `>= 0.27.1, <=0.28.2` (see [Install Bender](#0-install-bender)) - Vivado`== 2020.2`* *At the moment it is required to use this specific Vivado version. Newer versions have shown to be problematic. @@ -80,6 +80,18 @@ This bash script set some env variables and check for the presence of RISCV{32,6 To check if the IPs initialization went good, it's better to compile the whole architecture with QuestaSim (this is the only tool supported at the moment). To do so: - Ensure that QuestaSim is in the `$PATH`. By default, the `QUESTA` variable is left empty. If the QuestaSim binaries directory is included in your `$PATH`, no further configuration is required. Otherwise, adjust it according to your setup. +- Fix buggy download of hyperbus models. +``` +cd .bender/git/checkouts/hyperbus-358c17d6f73a3e33/models +git clone git@iis-git.ee.ethz.ch:astral/hyp_vip.git s27ks0641 +cd - +# manually fix stuff +cd .bender/git/checkouts/opentitan-7d9ffd8b698d2da4/ +sed -i '18s|hw/ip/lowrisc_ibex/rtl|hw/vendor/lowrisc_ibex/rtl|' Bender.yml +sed -i 's|hw/ip/prim/rtl/prim_flop_macros\.svh|hw/ip/prim/rtl/prim_flop_macros.sv|; s|hw/ip/sysrst_ctrl/rtl/sysrst_ctrl_detect\.vs|hw/ip/sysrst_ctrl/rtl/sysrst_ctrl_detect.sv|' Bender.yml +sed -i '200d' Bender.yml +``` +- `make isolde-vsim-sim-clean`: clean up mess from previous builds - `make isolde-vsim-sim-init`: initialize the simulation environment by fetching verification IP for HyperRam from Infineon website. Next, using Bender, it generates a TCL script that includes a list of all source files for each IP present in the design. - `make isolde-vsim-sim-build`: launch QuestaSim sourcing the sourcefiles TCL script to build the design. @@ -110,6 +122,11 @@ Generate the bitstream in `target/xilinx/out/` by running: make isolde-xil-all XILINX_FLAVOR=vanilla XILINX_BOARD=vcu118 GEN_NO_HYPERBUS={0,1} GEN_EXT_JTAG={0,1} CARFIELD_CONFIG= ``` +My command: +```bash +VIVADO_MODE=batch VIVADO=vivado make isolde-xil-clean-vanilla isolde-xil-all XILINX_FLAVOR=vanilla XILINX_BOARD=vcu118 GEN_NO_HYPERBUS=1 GEN_EXT_JTAG=1 CARFIELD_CONFIG=carfield_l2dual_pulp_periph +``` + See the argument list below: @@ -176,6 +193,7 @@ sw The global command to build software is: ```bash +sed -i 's/-Wall -Wextra -static/-Wall -Wextra -Wno-int-conversion -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -static/' cheshire/sw/sw.mk # for GCC CVA6 make isolde-sw-build ``` @@ -221,6 +239,11 @@ According to the memory location where the baremetal test will be executed. This section describes how to simulate Astral to execute baremetal programs. +```bash +. env/pulpd-env.sh +make pulpd-sw-init pulpd-sw-build +``` + ### Testbench Astral comprises several bootable domains, as briefly described earlier. diff --git a/hw/configs/carfield_l2dual_pulp_periph.sv b/hw/configs/carfield_l2dual_pulp_periph.sv index a642288a6..a2f0362cb 100644 --- a/hw/configs/carfield_l2dual_pulp_periph.sv +++ b/hw/configs/carfield_l2dual_pulp_periph.sv @@ -13,7 +13,7 @@ import cheshire_pkg::*; //L2, port 0 localparam bit L2Port0Enable = 1; localparam doub_bt L2Port0Base = 'h78000000; -localparam doub_bt L2Port0Size = 'h00080000; +localparam doub_bt L2Port0Size = 'h00180000; // L2, port 1 localparam bit L2Port1Enable = 1; localparam doub_bt L2Port1Base = L2Port0Base + L2Port0Size; diff --git a/hw/configs/carfield_l2dual_secure_pulp_periph.sv b/hw/configs/carfield_l2dual_secure_pulp_periph.sv index 110a9105a..99295956c 100644 --- a/hw/configs/carfield_l2dual_secure_pulp_periph.sv +++ b/hw/configs/carfield_l2dual_secure_pulp_periph.sv @@ -13,7 +13,7 @@ import cheshire_pkg::*; //L2, port 0 localparam bit L2Port0Enable = 1; localparam doub_bt L2Port0Base = 'h78000000; -localparam doub_bt L2Port0Size = 'h00080000; +localparam doub_bt L2Port0Size = 'h00180000; // L2, port 1 localparam bit L2Port1Enable = 1; localparam doub_bt L2Port1Base = L2Port0Base + L2Port0Size; diff --git a/requirements.txt b/requirements.txt index d23474b2a..0ae43a34e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ hjson jsonref jsonschema -Mako==1.1.6 -PyYAML==6.0 pyelftools==0.29 requests mako @@ -13,3 +11,4 @@ mkdocs mkdocs-material mkdocs-glightbox pandas +setuptools<81 diff --git a/sw/tests/bare-metal/hostd/addressability_test.c b/sw/tests/bare-metal/hostd/addressability_test.c index e1a7fec18..f82092428 100644 --- a/sw/tests/bare-metal/hostd/addressability_test.c +++ b/sw/tests/bare-metal/hostd/addressability_test.c @@ -193,7 +193,7 @@ int main(void) { } // HyperRAM - error += probe_range_lfsr_wrwr((uint64_t *)CAR_HYPERRAM_BASE_ADDR, (uint64_t *)CAR_HYPERRAM_END_ADDR, N_SAMPLES); + error += probe_range_lfsr_wrwr(CAR_HYPERRAM_BASE_ADDR, CAR_HYPERRAM_END_ADDR, N_SAMPLES); if (error) { printf("L3: WRWR failed."); @@ -248,7 +248,7 @@ int main(void) { } // HyperRAM - error += probe_range_lfsr_wwrr((uint64_t *)CAR_HYPERRAM_BASE_ADDR, (uint64_t *)CAR_HYPERRAM_END_ADDR, N_SAMPLES); + error += probe_range_lfsr_wwrr(CAR_HYPERRAM_BASE_ADDR, CAR_HYPERRAM_END_ADDR, N_SAMPLES); if (error) { printf("L3: WWRR failed."); diff --git a/target/sim/sim.mk b/target/sim/sim.mk index 9b19a02a6..76ae687b4 100644 --- a/target/sim/sim.mk +++ b/target/sim/sim.mk @@ -53,7 +53,7 @@ ifdef DEBUG VSIM_FLAGS := $(QUESTA_FLAGS) RUN_AND_EXIT := log -r /*; run -all else - VOPT_FLAGS := $(QUESTA_FLAGS) -O5 +acc=p+$(TBENCH). -sdf + VOPT_FLAGS := $(QUESTA_FLAGS) -O5 +acc=npr+$(TBENCH). -sdf VSIM_FLAGS := $(QUESTA_FLAGS) -c RUN_AND_EXIT := run -all; exit endif diff --git a/target/xilinx/constraints/carfield_islands.tcl b/target/xilinx/constraints/carfield_islands.tcl index 9fd95f821..f2ac90513 100644 --- a/target/xilinx/constraints/carfield_islands.tcl +++ b/target/xilinx/constraints/carfield_islands.tcl @@ -33,7 +33,7 @@ proc handle_domain_clock_mux { clk_sel_path clk_sel_val clk_name } { handle_domain_clock_mux [get_cells -hier u_periph_clk_sel] 2 periph_domain_clk handle_domain_clock_mux [get_cells -hier u_safety_island_clk_sel] 1 safety_domain_clk handle_domain_clock_mux [get_cells -hier u_security_island_clk_sel] 1 security_domain_clk -handle_domain_clock_mux [get_cells -hier u_pulp_cluster_clk_sel] 1 pulp_domain_clk +handle_domain_clock_mux [get_cells -hier u_pulp_cluster_clk_sel] 0 pulp_domain_clk handle_domain_clock_mux [get_cells -hier u_spatz_cluster_clk_sel] 1 spatz_domain_clk handle_domain_clock_mux [get_cells -hier u_l2_clk_sel] 0 l2_domain_clk diff --git a/target/xilinx/flavor_vanilla/scripts/run.tcl b/target/xilinx/flavor_vanilla/scripts/run.tcl index a6c37559a..e8da2d08a 100644 --- a/target/xilinx/flavor_vanilla/scripts/run.tcl +++ b/target/xilinx/flavor_vanilla/scripts/run.tcl @@ -4,6 +4,9 @@ # # Author: Cyril Koenig +# It fixes the long delays during update_compile_order step +set_param project.hsv.draftModeDefault only + set project $::env(XILINX_PROJECT) create_project $project . -force -part $::env(XILINX_PART) diff --git a/target/xilinx/flavor_vanilla/src/carfield_top_xilinx.sv b/target/xilinx/flavor_vanilla/src/carfield_top_xilinx.sv index 01c7c9ed6..24234557e 100644 --- a/target/xilinx/flavor_vanilla/src/carfield_top_xilinx.sv +++ b/target/xilinx/flavor_vanilla/src/carfield_top_xilinx.sv @@ -249,7 +249,7 @@ module carfield_top_xilinx localparam rtc_clk_divider = 4; assign soc_clk = clk_50; assign host_clk = soc_clk; - assign alt_clk = clk_20; + assign alt_clk = clk_50; assign secd_clk = clk_20; assign periph_clk = clk_10;