Skip to content

Commit

Permalink
fpga: Adapted flow to new directory
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilKoe committed Dec 11, 2023
1 parent 84a6048 commit b0212ba
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ workspace:

export_include_dirs:
- hw/spm_interface/include
- hw/occamy

sources:
# future
Expand All @@ -46,6 +47,7 @@ sources:
# snitch_read_only_cache
- hw/snitch_read_only_cache/src/snitch_axi_to_cache.sv
- hw/snitch_read_only_cache/src/snitch_read_only_cache.sv

- target: test
files:
- hw/snitch_read_only_cache/test/snitch_read_only_cache_tb.sv
Expand Down
6 changes: 3 additions & 3 deletions target/fpga/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ EXT_JTAG ?= 0
VCU ?= 01
FPGA_ID := 091847100576A
HW_SERVER := bordcomputer:3231
BENDER ?= bender
VIVADO ?= vitis-2020.2 vivado

# Select VCU128-02
ifeq ($(VCU),02)
Expand All @@ -34,8 +36,6 @@ DTB = bootrom/occamy.dtb
default: all
all: occamy_vcu128

include $(ROOT)/util/Makefrag

vivado_ips/occamy_xilinx:
${MAKE} -C vivado_ips occamy_xilinx

Expand All @@ -46,7 +46,7 @@ occamy_vcu128: vivado_ips/occamy_xilinx bootrom/bootrom-spl.coe define_defines_i
${VIVADO} -mode batch -source occamy_vcu128.tcl -tclargs $(DEBUG) $(EXT_JTAG) $(NPROC) ${MKFILE_DIR}/bootrom/bootrom-spl.coe

define_defines_includes_no_simset.tcl: $(BENDER_FILES)
${BENDER} script vivado -t cv64a6_imafdc_sv39 --only-defines --only-includes --no-simset > $@
${BENDER} script vivado -t occamy -t cv64a6_imafdc_sv39 --only-defines --only-includes --no-simset > $@

program:
${VIVADO} -mode batch -source occamy_vcu128_program.tcl -tclargs ${VCU}
Expand Down
6 changes: 2 additions & 4 deletions target/fpga/bootrom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MKFILE_DIR := $(dir $(MKFILE_PATH))
ROOT := ${MKFILE_DIR}../../../../..

include $(ROOT)/util/Makefrag

CVA6_SDK ?= $(ROOT)/../cva6-sdk
UBOOT_SPL_BIN ?= $(CVA6_SDK)/u-boot/spl/u-boot-spl.bin

Expand All @@ -28,7 +26,7 @@ CFLAGS = -Os -g -Werror -ffreestanding -fno-strict-aliasing
CFLAGS += -static -nostartfiles -nostartfiles
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-protector
CFLAGS += -mno-save-restore -mstrict-align
CFLAGS += -mabi=lp64d -march=rv64imafd
CFLAGS += -mabi=lp64d -march=rv64imafd_zifencei
CFLAGS += -mcmodel=medany

GIT_SHA := $(shell git describe --match=NeVeRmAtCh --always --abbrev=10 --dirty)
Expand Down Expand Up @@ -67,4 +65,4 @@ clean:
%.tcl: %.bin
@echo "TCL <= $<"
@$(call BINRAY_SIZE_CHECK,$<,1000000)
@$(BIN2JTAG) -c32 -b 0 -d hw_axi_1 $< > $@
bin2jtag -c32 -b 0 -d hw_axi_1 $< > $@
9 changes: 3 additions & 6 deletions target/fpga/vivado_ips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ MKFILE_DIR := $(dir $(MKFILE_PATH))
ROOT := ${MKFILE_DIR}../../../../..
DEBUG ?= 0

VIVADO ?= vivado
BENDER ?= bender
BENDER ?= bender
VIVADO ?= vitis-2020.2 vivado

BENDER_TARGETS += -t cv64a6_imafdc_sv39
BENDER_TARGETS += -t cv64a6_imafdc_sv39 -t occamy
ifeq ($(EXT_JTAG), 0)
BENDER_TARGETS += -t bscane
endif

include $(ROOT)/util/Makefrag

occamy_xilinx: define-sources.tcl
$(MAKE) -C ../../ update-source
${VIVADO} -mode batch -source occamy_xilinx.tcl -tclargs $(DEBUG) $(EXT_JTAG)

define-sources.tcl:
Expand Down
2 changes: 1 addition & 1 deletion target/fpga/vivado_ips/occamy_xilinx.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ ipx::create_xgui_files [ipx::current_core]
ipx::update_checksums [ipx::current_core]
ipx::save_core [ipx::current_core]
ipx::check_integrity [ipx::current_core]
ipx::save_core [ipx::current_core]
ipx::save_core [ipx::current_core]

0 comments on commit b0212ba

Please sign in to comment.