Skip to content

Commit

Permalink
Merge pull request #348 from pulp-platform/fix-spi-boot
Browse files Browse the repository at this point in the history
Fix spi boot and other minor issues
  • Loading branch information
bluewww authored Jun 13, 2022
2 parents 1448683 + 8677ed5 commit d016f81
Show file tree
Hide file tree
Showing 17 changed files with 1,767 additions and 790 deletions.
16 changes: 15 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,23 @@ sim_questa_multivers:
- make scripts
- make clean build
- source setup/vsim.sh
- source pulp-runtime/configs/pulpissimo.sh
- source pulp-runtime/configs/pulpissimo_cv32.sh
- make -C hello clean all run
dependencies:
- fetch_ips_bender
needs:
- fetch_ips_bender

spi_boot:
stage: test
before_script:
- git clone https://github.com/pulp-platform/pulp-runtime.git -b v0.0.15
- mkdir hello
- export PULP_RISCV_GCC_TOOLCHAIN=/usr/pack/riscv-1.0-kgf/pulp-gcc-2.5.0
- printf "#include <stdio.h>\nint main(){\n printf(\"Hello World\\\n\");\n return 0;\n}\n" > hello/hello.c
- printf "PULP_APP = hello\nPULP_APP_FC_SRCS = hello.c\nPULP_APP_HOST_SRCS = hello.c\nPULP_CFLAGS = -O3 -g\n\ninclude \$(PULP_SDK_HOME)/install/rules/pulp_rt.mk\n" > hello/Makefile
script:
- make scripts-bender-vsim-vips all
- source setup/vsim.sh
- source pulp-runtime/configs/pulpissimo_cv32.sh
- make -C hello clean all run bootmode=spi PULP_RUNTIME_GCC_TOOLCHAIN=/usr/pack/riscv-1.0-kgf/pulp-gcc-2.5.0
24 changes: 12 additions & 12 deletions Bender.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
---
packages:
L2_tcdm_hybrid_interco:
revision: fa55e72859dcfb117a2788a77352193bef94ff2b
version: 1.0.0
source:
Git: "https://github.com/pulp-platform/L2_tcdm_hybrid_interco.git"
dependencies: []
adv_dbg_if:
revision: 19eeef8cae1cbec7413877b3f29fe0bd078748d7
version: 0.0.2
Expand Down Expand Up @@ -95,7 +89,7 @@ packages:
Git: "https://github.com/pulp-platform/common_verification.git"
dependencies: []
cv32e40p:
revision: 443ce5e5db2535dcbf6e50143aa4482e4101856f
revision: 800a09d97a1e9418e127e8bbf1763c1d1097c92f
version: ~
source:
Git: "https://github.com/pulp-platform/cv32e40p.git"
Expand All @@ -118,7 +112,7 @@ packages:
Git: "https://github.com/pulp-platform/fpu_div_sqrt_mvp.git"
dependencies:
- common_cells
generic_FLL:
generic_fll:
revision: 1c92dc73a940392182fd4cb7b86f35649b349595
version: ~
source:
Expand Down Expand Up @@ -159,13 +153,18 @@ packages:
source:
Git: "https://github.com/pulp-platform/jtag_pulp.git"
dependencies: []
l2_tcdm_hybrid_interco:
revision: fa55e72859dcfb117a2788a77352193bef94ff2b
version: 1.0.0
source:
Git: "https://github.com/pulp-platform/L2_tcdm_hybrid_interco.git"
dependencies: []
pulp_soc:
revision: b3e0bc676399124e3ba50f983cb668b2ed3f95a7
version: 4.3.0
revision: 0573a85c8ec502ff5e3ef06946a75eaf567ce16a
version: 4.4.0
source:
Git: "https://github.com/pulp-platform/pulp_soc.git"
dependencies:
- L2_tcdm_hybrid_interco
- adv_dbg_if
- apb
- apb2per
Expand All @@ -180,10 +179,11 @@ packages:
- common_cells
- cv32e40p
- fpnew
- generic_FLL
- generic_fll
- hwpe-mac-engine
- ibex
- jtag_pulp
- l2_tcdm_hybrid_interco
- register_interface
- riscv-dbg
- scm
Expand Down
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package:
dependencies:
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.21.0 }
jtag_pulp: { git: "https://github.com/pulp-platform/jtag_pulp.git", version: 0.2.0 }
pulp_soc: { git: "https://github.com/pulp-platform/pulp_soc.git", version: 4.3.0 }
pulp_soc: { git: "https://github.com/pulp-platform/pulp_soc.git", version: 4.4.0 }
tbtools: { git: "https://github.com/pulp-platform/tbtools.git", version: 0.2.1 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.3 }

Expand Down
4 changes: 4 additions & 0 deletions boot/boot_code.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ void __attribute__((noreturn)) main(void)
* 2'b3 preloaded boot (jump to address in bootaddr register)
*/

/* On the cv32e40p, we need to enable all interrupts in the core because we
* intend to only use the apb_interrupt_cntrl to manage interrupts */
hal_spr_write(CSR_MIE, 0xffffffff);

switch (apb_soc_bootsel_get(ARCHI_APB_SOC_CTRL_ADDR) & 3) {
case BOOT_MODE_DEFAULT:
#ifdef CONFIG_FLL
Expand Down
Loading

0 comments on commit d016f81

Please sign in to comment.