Skip to content

Commit

Permalink
[GVSOC] Updated to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain Haugou authored and haugoug committed Dec 2, 2022
1 parent 929262c commit f86ca18
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 71 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if(CCACHE_FOUND)
set(CMAKE_CXX_COMPILER_LAUNCHER ccache)
endif()

add_subdirectory(tools/gvsoc)
add_subdirectory(tools/gvsoc/common)

## Install pip requirements, note: does not install nntool reqs as building
## will do that
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ CMAKE ?= cmake

build:
$(CMAKE) -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DTARGET=$(GAPY_V2_TARGET) \
-DTARGET_OPT="$(GAPY_NEW_TARGET_OPT)" \
-DCMAKE_INSTALL_PREFIX=$(PULP_SDK_HOME)/install/workstation
-DCMAKE_INSTALL_PREFIX=$(PULP_SDK_HOME)/install/workstation \
-DGVSOC_MODULES="$(GVSOC_MODULES)" \
-DGVSOC_TARGETS=${GVSOC_TARGETS}

$(CMAKE) --build build $(CMAKE_FLAGS)
$(CMAKE) --install build

Expand Down
17 changes: 6 additions & 11 deletions configs/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,16 @@ export PYTHONPATH=$INSTALL_DIR/python:$PYTHONPATH


# Gapy
export PATH=$PULP_SDK_HOME/tools/gapy:$PATH
export PYTHONPATH=$PULP_SDK_HOME/tools/gapy:$PYTHONPATH
export PULP_CONFIGS_PATH=$PULP_SDK_HOME/tools/gap-configs/configs:$PULP_CONFIGS_PATH

# Gapy v2 (for gvsoc)
export PATH=$PULP_SDK_HOME/tools/gapy_v2/bin:$PATH

# GVSOC
export PULP_SDK_INSTALL=$INSTALL_DIR
export GVSOC_PATH=$INSTALL_DIR/python
export XTENSOR_INCLUDE_DIR=$PULP_SDK_HOME/ext/xtensor/include
export GVSOC_INC_PATHS="$PULP_SDK_HOME/rtos/pulpos/gap_archi/include/archi/chips/$TARGET_NAME $PULP_SDK_HOME/rtos/pulpos/gap_archi/include $PULP_SDK_HOME/rtos/pulpos/pulp_archi/include"
export GVSOC_ISS_PATH=$PULP_SDK_HOME/tools/gvsoc/common/models/cpu/iss
export GVSOC_SRC_PATH=$PULP_SDK_HOME/tools/gvsoc/common
export GVSOC_PULP_SRC_PATH=$PULP_SDK_HOME/tools/gvsoc/pulp
export PYTHONPATH=$PULP_SDK_HOME/tools/gvsoc/common/models:$PYTHONPATH
export PYTHONPATH=$PULP_SDK_HOME/tools/gvsoc/pulp/models:$PYTHONPATH
export PYTHONPATH=$PULP_SDK_HOME/tools/gvsoc/common/engine:$PYTHONPATH
export GVSOC_MODULES="${GAP_SDK_HOME}/tools/gvsoc/common;${GAP_SDK_HOME}/tools/gvsoc/pulp"
export GVSOC_TARGETS="$GAPY_V2_TARGET"


# FPGA
#export PULP_
Expand Down
19 changes: 10 additions & 9 deletions rtos/pulpos/common/rules/pulpos/default_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,11 @@ use_gvsoc_target = 1
endif

ifeq '$(use_gvsoc_target)' '1'
GAPY_TARGET_OPT += --target-dir=$(GVSOC_PULP_SRC_PATH)/targets
endif

GAPY_TARGET_OPT += $(foreach module,$(subst ;, , $(GVSOC_MODULES)),--target-dir=$(module)/models)
GAPY_TARGET_OPT += --install-dir=$(INSTALL_DIR)/python
else
GAPY_TARGET_OPT += --target-dir=$(PULP_SDK_HOME)/tools/gapy/targets
endif

override runner_args += --flash-property=boot@flash:rom:boot \
--flash-property=$(TARGETS)@flash:rom:binary
Expand Down Expand Up @@ -343,22 +344,22 @@ gvsoc.run_debug:

else

GAPY = gapy
GAPY = $(PULP_SDK_HOME)/tools/gapy/gapy

image:
gapy $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --image --binary=$(TARGETS) $(runner_args)
$(GAPY) $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --image --binary=$(TARGETS) $(runner_args)

flash:
gapy $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --flash --binary=$(TARGETS) $(runner_args)
$(GAPY) $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --flash --binary=$(TARGETS) $(runner_args)

run.prepare:
gapy $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --exec-prepare --binary=$(TARGETS) $(runner_args)
$(GAPY) $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --exec-prepare --binary=$(TARGETS) $(runner_args)

run.exec:
gapy $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --exec --binary=$(TARGETS) $(runner_args)
$(GAPY) $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --exec --binary=$(TARGETS) $(runner_args)

run:
gapy $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --exec-prepare --exec --binary=$(TARGETS) $(runner_args)
$(GAPY) $(GAPY_TARGET_OPT) --platform=$(platform) --work-dir=$(TARGET_BUILD_DIR) $(config_args) $(gapy_args) run --exec-prepare --exec --binary=$(TARGETS) $(runner_args)

endif

Expand Down
45 changes: 0 additions & 45 deletions tools/gvsoc/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tools/gvsoc/common
Submodule common updated 62 files
+46 −3 CMakeLists.txt
+0 −35 Makefile
+0 −159 bin/pulp-pc-info
+10 −10 cmake/vp_model.cmake
+0 −61 dpi-wrapper/Makefile
+0 −160 engine/Makefile
+4 −0 engine/include/vp/component.hpp
+1 −5 engine/include/vp/vp.hpp
+21 −2 engine/src/vp.cpp
+0 −8 engine/vp/Makefile
+0 −57 launcher/Makefile
+5 −0 models/CMakeLists.txt
+0 −44 models/Makefile
+0 −2 models/board/Makefile
+0 −2 models/cache/Makefile
+9 −1 models/cpu/iss/CMakeLists.txt
+0 −98 models/cpu/iss/Makefile
+56 −0 models/cpu/iss/include/archi/riscv/pcer_v2.h
+55 −0 models/cpu/iss/include/archi/riscv/priv_1_10.h
+4 −0 models/cpu/iss/isa_gen/isa_generator
+0 −23 models/cpu/iss/iss.mk
+2 −1 models/cpu/iss/src/csr.cpp
+2 −2 models/cpu/iss/src/trace.cpp
+0 −3 models/devices/ble/Makefile
+0 −16 models/devices/camera/Makefile
+0 −9 models/devices/hyperbus/Makefile
+0 −2 models/devices/i2c/Makefile
+0 −6 models/devices/i2c/corruptor/Makefile
+0 −6 models/devices/i2c/eeprom/Makefile
+0 −2 models/devices/jtag/Makefile
+0 −22 models/devices/sound/Makefile
+0 −2 models/devices/spiflash/Makefile
+0 −10 models/devices/testbench/Makefile
+0 −6 models/devices/uart/Makefile
+0 −3 models/gdbserver/Makefile
+6 −5 models/gsystree.py
+0 −0 models/gv/__init.py__
+0 −0 models/gv/__init__.py
+0 −0 models/gv/chips/gap8.py
+0 −0 models/gv/chips/gap9_v2.py
+0 −0 models/gv/chips/pulp.py
+0 −0 models/gv/chips/vega.py
+0 −0 models/gv/gtkw_new.py
+0 −0 models/gv/gtkwave.py
+0 −0 models/gv/gvsoc.py
+0 −0 models/gv/gvsoc_control.py
+104 −103 models/gv/gvsoc_runner.py
+0 −11 models/interco/Makefile
+0 −0 models/json_tools.py
+0 −38 models/memory/Makefile
+0 −0 models/regmap/regmap.py
+0 −0 models/regmap/regmap_c_header.py
+0 −0 models/regmap/regmap_ipxact.py
+0 −0 models/regmap/regmap_json.py
+0 −0 models/regmap/regmap_md.py
+0 −0 models/regmap/regmap_md_mistune.py
+0 −0 models/regmap/regmap_rst.py
+0 −0 models/regmap/regmap_table.py
+0 −0 models/regmap/regmap_xls.py
+0 −20 models/utils/Makefile
+0 −0 models/vp/clock_domain.py
+0 −220 vp_models.mk
2 changes: 1 addition & 1 deletion tools/gvsoc/pulp
Submodule pulp updated 50 files
+1 −0 models/pulp-open.py
+1 −1 models/pulp/chips/pulp/apb_soc_impl.cpp
+121 −0 models/pulp/chips/pulp/archi/apb_soc.h
+1 −1 models/pulp/chips/siracusa/l1_subsystem.py
+1 −1 models/pulp/chips/siracusa/pulp_open_board.py
+2 −2 models/pulp/chips/siracusa/soc.py
+38 −0 models/pulp/cluster/archi/cluster_ctrl_v2.h
+1 −1 models/pulp/cluster/cluster_ctrl_v2_impl.cpp
+0 −1 models/pulp/cpu/iss/pulp_iss_wrapper.cpp
+206 −0 models/pulp/event_unit/archi/eu_v3.h
+1 −1 models/pulp/event_unit/eu_v3_impl.cpp
+231 −0 models/pulp/fll/archi/fll_v1.h
+1 −1 models/pulp/fll/fll_v1_impl.cpp
+347 −0 models/pulp/gpio/archi/builtins_v2_emu.h
+992 −0 models/pulp/gpio/archi/gpio_v3.h
+73 −0 models/pulp/gpio/archi/utils.h
+1 −1 models/pulp/gpio/gpio_v3_impl.cpp
+347 −0 models/pulp/itc/archi/builtins_v2_emu.h
+268 −0 models/pulp/itc/archi/itc_v1.h
+73 −0 models/pulp/itc/archi/utils.h
+1 −1 models/pulp/itc/itc_v1_impl.cpp
+347 −0 models/pulp/mchan/archi/builtins_v2_emu.h
+486 −0 models/pulp/mchan/archi/mchan_v7.h
+74 −0 models/pulp/mchan/archi/utils.h
+1 −1 models/pulp/mchan/mchan_v7_impl.cpp
+61 −0 models/pulp/soc_eu/archi/soc_eu_v2.h
+1 −1 models/pulp/soc_eu/soc_eu_v2_impl.cpp
+347 −0 models/pulp/timer/archi/builtins_v2_emu.h
+617 −0 models/pulp/timer/archi/timer_v2.h
+73 −0 models/pulp/timer/archi/utils.h
+1 −1 models/pulp/timer/timer_v2_impl.cpp
+347 −0 models/pulp/udma/archi/builtins_v2_emu.h
+151 −0 models/pulp/udma/archi/udma_cpi_v1_old.h
+152 −0 models/pulp/udma/archi/udma_hyper_v3.h
+808 −0 models/pulp/udma/archi/udma_i2s_v2.h
+196 −0 models/pulp/udma/archi/udma_spim_v3.h
+82 −0 models/pulp/udma/archi/udma_uart_v1.h
+176 −0 models/pulp/udma/archi/udma_v3.h
+73 −0 models/pulp/udma/archi/utils.h
+2 −2 models/pulp/udma/cpi/udma_cpi_v1.cpp
+2 −2 models/pulp/udma/hyper/udma_hyper_v3.cpp
+1 −1 models/pulp/udma/i2s/udma_i2s_v2.cpp
+1 −1 models/pulp/udma/i2s/udma_i2s_v2.hpp
+2 −2 models/pulp/udma/spim/udma_spim_v3.cpp
+1 −1 models/pulp/udma/spim/udma_spim_v3.hpp
+2 −2 models/pulp/udma/uart/udma_uart_v1.cpp
+1 −1 models/pulp/udma/udma_v3_impl.cpp
+2 −2 models/pulp/udma/udma_v3_impl.hpp
+2 −0 models/rv64.py
+1 −0 models/siracusa.py

0 comments on commit f86ca18

Please sign in to comment.