Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VCU118 Support to mp/pulp-v1-os-fpga Branch #362

Closed
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ CXX = g++
endif

# We need a recent LLVM to compile Verilator
CLANG_CC ?= clang
CLANG_CXX ?= clang++
CLANG_CC ?= clang-14
CLANG_CXX ?= clang++-14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop this change, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I’ll need to apply it on my end. I will bring it back in a new commit.

ifneq (${CLANG_PATH},)
CLANG_CXXFLAGS := "-nostdinc++ -isystem $(CLANG_PATH)/include/c++/v1"
CLANG_LDFLAGS := "-L $(CLANG_PATH)/lib -Wl,-rpath,$(CLANG_PATH)/lib -lc++ -nostdlib++"
Expand Down
24 changes: 14 additions & 10 deletions cheshire/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# Author: Moritz Imfeld <[email protected]>
# Author: Matteo Perotti <[email protected]>
#
# Modifier : Mojtaba Rostami <[email protected]>

# Chshire root reposiotry
# Cheshire root repository
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
ARA_ROOT := $(MAKEFILE_DIR)/..
BACKREF_CHS_ROOT ?= $(realpath ../../../../..)
Expand All @@ -20,18 +20,21 @@ VIVADO ?= 'vitis-2020.2 vivado'
# default configuration for Cheshire + Ara is 2_lanes
ARA_CONFIGURATION ?= 2_lanes
include $(ARA_ROOT)/config/$(ARA_CONFIGURATION).mk
BOARD := vcu128

# Default to VCU128 if no BOARD is specified, but allow overriding.
BOARD ?= vcu128
VLOG_ARGS ?= -suppress 2583 -suppress 13314
COMMON_CUSTOM_TARGETS := -t cv64a6_imafdcv_sv39 -t cva6 --define ARA --define NR_LANES=$(nr_lanes) --define VLEN=$(vlen)
CUSTOM_SIM_BENDER_TARGETS := $(COMMON_CUSTOM_TARGETS) -t sim -t test -t rtl --vlog-arg="$(VLOG_ARGS)"
CUSTOM_XIL_BENDER_TARGETS := $(COMMON_CUSTOM_TARGETS) -t fpga -t $(BOARD)
CUSTOM_XIL_BENDER_TARGETS := $(COMMON_CUSTOM_TARGETS) -t fpga -t $(BOARD)

.PHONY: ara-chs-xilinx-$(BOARD) ara-chs-flash-$(BOARD) apply-patches update_xilinx_src clean
.PHONY: ara-chs-xilinx ara-chs-flash apply-patches update_xilinx_src clean

ara-chs-xilinx-$(BOARD): update_xilinx_src
# Combine the xilinx and flash targets to be flexible for different boards.
ara-chs-xilinx: update_xilinx_src
make -C $(BACKREF_CHS_ROOT) chs-xilinx-$(BOARD)

ara-chs-flash-$(BOARD):
ara-chs-flash:
make -C $(BACKREF_CHS_ROOT) chs-xilinx-flash-$(BOARD) VIVADO=$(VIVADO)

apply-patches:
Expand All @@ -40,13 +43,14 @@ apply-patches:

update_xilinx_src:
cd $(BACKREF_CHS_ROOT) && \
bender script vivado $(CUSTOM_XIL_BENDER_TARGETS) > $(BACKREF_CHS_XIL_SCRIPTS)/add_sources.vcu128.tcl
bender script vivado $(CUSTOM_XIL_BENDER_TARGETS) > $(BACKREF_CHS_XIL_SCRIPTS)/add_sources.$(BOARD).tcl

update_vsim_src:
cd $(BACKREF_CHS_ROOT) && \
bender script vsim $(CUSTOM_SIM_BENDER_TARGETS) > $(BACKREF_CHS_SIM_SCRIPTS)/compile.cheshire_soc.tcl
echo 'vlog "$(realpath $(BACKREF_CHS_ROOT))/target/sim/src/elfloader.cpp" -ccflags "-std=c++11"' >> $(BACKREF_CHS_SIM_SCRIPTS)/compile.cheshire_soc.tcl

clean:
rm $(BACKREF_CHS_XIL_SCRIPTS)/add_sources.vcu128.tcl
rm $(MAKEFILE_DIR)/add_sources.vcu128.tcl
rm -f $(BACKREF_CHS_XIL_SCRIPTS)/add_sources.$(BOARD).tcl
rm -f $(MAKEFILE_DIR)/add_sources.$(BOARD).tcl

Loading