mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-24 13:57:19 -04:00
Updates in Makefile.tools
This commit is contained in:
parent
d35937d2ba
commit
397bd5af2f
4 changed files with 59 additions and 18 deletions
|
@ -15,7 +15,7 @@ VERIL_SRC_ROOT ?= $(prj_path)/vendor
|
|||
VERIL_INSTALL_DIR ?= ${INSTALL_DIR}/verilator
|
||||
VERIL_VERSION ?= v5.028
|
||||
|
||||
all: verilator riscv32-elf-gcc dev-dep
|
||||
all: verilator riscv32-gcc riscv32-llvm dev-dep
|
||||
# Verilator
|
||||
verilator: ${VERIL_INSTALL_DIR}/bin/verilator
|
||||
|
||||
|
@ -38,9 +38,9 @@ cores:
|
|||
num_cores=$$((num_cores / 2)); \
|
||||
echo "Number of cores available on this machine (divided by 2): $$num_cores"
|
||||
|
||||
riscv32-elf-gcc: $(GCC_INSTALL_DIR)
|
||||
riscv32-gcc: $(GCC_INSTALL_DIR)
|
||||
|
||||
$(GCC_INSTALL_DIR): vendor/riscv32-elf-gcc.url
|
||||
$(GCC_INSTALL_DIR): vendor/riscv32-gcc.url
|
||||
rm -fr $(GCC_INSTALL_DIR)
|
||||
mkdir -p $(INSTALL_DIR)
|
||||
cd vendor && \
|
||||
|
@ -54,15 +54,15 @@ riscv32-llvm: $(LLVM_INSTALL_DIR)
|
|||
|
||||
vendor/riscv32-elf-llvm.tar.gz: vendor/riscv32-elf-llvm.url
|
||||
cd vendor && \
|
||||
wget `cat $(CURDIR)/$<` -O riscv32-elf-llvm.tar.gz
|
||||
wget `cat $(CURDIR)/$<` -O riscv32-elf-llvm.tar.gz && \
|
||||
touch riscv32-elf-llvm.tar.gz
|
||||
|
||||
$(LLVM_INSTALL_DIR): vendor/riscv32-llvm.tar.gz
|
||||
$(LLVM_INSTALL_DIR): vendor/riscv32-elf-llvm.tar.gz
|
||||
rm -fr $(LLVM_INSTALL_DIR)
|
||||
mkdir -p $(INSTALL_DIR)
|
||||
cd vendor && \
|
||||
tar -xzvf riscv32-elf-llvm.tar.gz -C $(INSTALL_DIR)/ riscv
|
||||
mv $(INSTALL_DIR)/riscv32-embecosm-ubuntu2004-clang16.0.2 $(LLVM_INSTALL_DIR)
|
||||
mv $(INSTALL_DIR)/riscv $(LLVM_INSTALL_DIR)
|
||||
touch $(LLVM_INSTALL_DIR)
|
||||
|
||||
riscv32-llvm-patch:
|
||||
|
|
|
@ -8,10 +8,16 @@ First time:
|
|||
```sh
|
||||
. ./setup.sh
|
||||
```
|
||||
* install toolchain
|
||||
|
||||
```sh
|
||||
make -f Makefile.tools
|
||||
```
|
||||
otherwise:
|
||||
```sh
|
||||
. ./eth.sh
|
||||
```
|
||||
see also [isolde/simple_system/README.md](isolde/simple_system/README.md)
|
||||
## Run hello-world
|
||||
```sh
|
||||
fusesoc --cores-root=. run --target=sim --setup --build lowrisc:ibex:ibex_simple_system $(util/ibex_config.py small fusesoc_opts)
|
||||
|
|
|
@ -1,25 +1,58 @@
|
|||
# ISOLDE
|
||||
## Prerequisites
|
||||
in root folder execute
|
||||
```
|
||||
. ./eth.sh
|
||||
```
|
||||
## Building Simulation
|
||||
default value for **IBEX_CONFIG**=*isolde*.
|
||||
For a list of possible configurations, see [ibex_configs.yaml](../../ibex_configs.yaml)
|
||||
## Build the simulator
|
||||
|
||||
For a list of possible configurations, see [ibex_configs.yaml](../../ibex_configs.yaml)
|
||||
in folder **isolde/simple_system**:
|
||||
* get a clean slate:
|
||||
```
|
||||
make clean
|
||||
```
|
||||
## build the simulation
|
||||
```
|
||||
make
|
||||
```
|
||||
or
|
||||
```sh
|
||||
make IBEX_CONFIG=small
|
||||
```
|
||||
|
||||
## Build the test application
|
||||
the same test app, regardless of IBEX_CONFIG, hence:
|
||||
```sh
|
||||
make test-program
|
||||
## build test app
|
||||
* **gcc** toolchain
|
||||
```
|
||||
## Run the simulation
|
||||
make clean-test test-app
|
||||
```
|
||||
* **llvm** toolchain
|
||||
```
|
||||
make clean-test test-app COMPILER=llvm
|
||||
```
|
||||
## execute test
|
||||
```
|
||||
make run-test
|
||||
```
|
||||
Output should be similar to this
|
||||
```
|
||||
Performance Counters
|
||||
====================
|
||||
Cycles: 375
|
||||
Instructions Retired: 223
|
||||
|
||||
ibex_simple_system.log
|
||||
======================
|
||||
Hello test instr
|
||||
exit()
|
||||
======
|
||||
```
|
||||
alternatively to run with *small* simulation
|
||||
|
||||
```sh
|
||||
make IBEX_CONFIG=small run-test
|
||||
```
|
||||
## Clean
|
||||
```sh
|
||||
make IBEX_CONFIG=small clean
|
||||
```
|
||||
|
||||
---
|
||||
---
|
||||
# Ibex Simple System
|
||||
|
|
|
@ -38,6 +38,8 @@ idvli_next
|
|||
idvli_state
|
||||
read_ptr
|
||||
vlen_instr_words
|
||||
instr_rdata_std
|
||||
instr_rdata_alu_std
|
||||
isolde_decoder_enable_i
|
||||
isolde_decoder_busy_o
|
||||
isolde_decoder_illegal_instr_o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue