fpga: Align build process for all targets
- All RFNoC capable targets now require rfnoc_image_builder to be built - `make help` is updated for all targets to provide more useful and up-to-date information - The FPGA manual is also updated - All checked-in build artifacts are now removed from git - axi_ram_fifo.yml is updated to provide include path information (required for building N3xx BIST images, which use this) Original-commit: 28b994406d4c9547b1e2add62781b6a8162fdb74
This commit is contained in:
committed by
Joerg Hofrichter
parent
ba5e431c5c
commit
6ef3795e42
+52
-56
@@ -9,6 +9,14 @@
|
||||
##USRP X4xx FPGA Help
|
||||
##-------------------
|
||||
##Usage:
|
||||
## rfnoc_image_builder -y <image core file>
|
||||
##
|
||||
## NOTE: For building X4x0 bitfiles, do not run make directly! Instead, use
|
||||
## rfnoc_image_builder. It will create all intermediate files, set up a Vivado
|
||||
## environment, and run Vivado to build a bitfile.
|
||||
##
|
||||
## There exist some special make targets which can be called directly like this:
|
||||
##
|
||||
## make <Targets> <Options>
|
||||
##
|
||||
##Output:
|
||||
@@ -16,7 +24,6 @@
|
||||
## $(BUILD_OUTPUT_DIR)/usrp_<product>_fpga_<image_type>.dts: Device tree source file
|
||||
## $(BUILD_OUTPUT_DIR)/usrp_<product>_fpga_<image_type>.rpt: Build report (includes utilization and timing summary)
|
||||
|
||||
|
||||
# Base output directory for all builds.
|
||||
BUILD_BASE_DIR ?= .
|
||||
# Base directory for the build outputs.
|
||||
@@ -30,7 +37,6 @@ X440_IP: DEFS += QSFP0_0=2 RF_BW=400
|
||||
# exclude it. Note that some targets exclude it regardless of this setting.
|
||||
DRAM ?= 1
|
||||
|
||||
IMAGE_CORE_NAME ?= usrp_fpga
|
||||
DEFS += $(OPTIONS)
|
||||
|
||||
# Initialize a build seed. This can be changed to randomly affect build results.
|
||||
@@ -57,10 +63,6 @@ ifndef TARGET
|
||||
endif
|
||||
TOP ?= x4xx
|
||||
|
||||
ifdef ARTIFACT_DIR
|
||||
BUILD_DIR = $(ARTIFACT_DIR)
|
||||
endif
|
||||
|
||||
# vivado_build($1=Device (X410 or X440), $2=Definitions)
|
||||
vivado_build = make -f Makefile.x4xx.inc $(TARGET) NAME=$@ ARCH=$(XIL_ARCH_$1) PART_ID=$(XIL_PART_ID_$1) EXTRA_DEFS="$2" TOP_MODULE=$(TOP) $2 INCR_BUILD=$(INCR_BUILD)
|
||||
vivado_ip = make -f Makefile.x4xx.inc viv_ip NAME=$@ ARCH=$(XIL_ARCH_$1) PART_ID=$(XIL_PART_ID_$1) EXTRA_DEFS="$2" TOP_MODULE=$(TOP) $2
|
||||
@@ -70,99 +72,93 @@ ifeq ($(TARGET),bin)
|
||||
post_build = @\
|
||||
mkdir -p $(BUILD_OUTPUT_DIR); \
|
||||
echo "Exporting bitstream file..."; \
|
||||
cp $(ARTIFACT_DIR)/x4xx.bit $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).bit; \
|
||||
cp $(BUILD_DIR)/x4xx.bit $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).bit; \
|
||||
echo "Exporting build report..."; \
|
||||
cp $(ARTIFACT_DIR)/build.rpt $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).rpt; \
|
||||
cp $(BUILD_DIR)/build.rpt $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).rpt; \
|
||||
echo "Build DONE ... $(IMAGE_CORE_NAME)";
|
||||
else
|
||||
post_build = @echo "Skipping bitfile export."
|
||||
endif
|
||||
|
||||
##
|
||||
##Available Targets
|
||||
##Available Targets:
|
||||
##
|
||||
##Reminder: Targets are built by calling
|
||||
##
|
||||
## $ rfnoc_image_builder -y <image core file.yml>
|
||||
##
|
||||
##The following default image core files are provided:
|
||||
##
|
||||
##-----------------------------------|-----------|----|-----------------|-----------------|------------
|
||||
##Image core name | Bandwidth | Ch | QSFP0 | QSFP1 | DRAM
|
||||
##-----------------------------------|-----------|----|-----------------|-----------------|------------
|
||||
##x410_CG_400_rfnoc_image_core.yml | 400 MHz | 4 | 100 GbE | 100 GbE | Unused
|
||||
##x410_UC_200_rfnoc_image_core.yml | 200 MHz | 4 | Unused | 100 GbE | 64b x 4 Ch
|
||||
##x410_X4_200_rfnoc_image_core.yml | 200 MHz | 4 | 4 x 10 GbE | Unused | 64b x 4 Ch
|
||||
##x410_XG_200_rfnoc_image_core.yml | 200 MHz | 4 | 10 GbE (Lane 0) | 10 GbE (Lane 0) | 64b x 4 Ch
|
||||
##x440_CG_400_rfnoc_image_core.yml | 400 MHz | 8 | 100 GbE | 100 GbE | Unused
|
||||
##x440_CG_1600_rfnoc_image_core.yml | 1.6 GHz | 2 | 100 GbE | 100 GbE | Unused
|
||||
##x440_X4_200_rfnoc_image_core.yml | 200 MHz | 8 | 4 x 10 GbE | Unused | Unused
|
||||
##x440_X4_400_rfnoc_image_core.yml | 400 MHz | 8 | 4 x 10 GbE | Unused | 128b x 8 Ch
|
||||
##x440_X4_1600_rfnoc_image_core.yml | 1.6 GHz | 2 | 4 x 10 GbE | Unused | 512b x 2 Ch
|
||||
##
|
||||
##Of course, a custom YAML file may be used.
|
||||
##
|
||||
check-variables:
|
||||
ifndef IMAGE_CORE_NAME
|
||||
$(error IMAGE_CORE_NAME is not set! Use rfnoc_image_builder to create valid make commands)
|
||||
endif
|
||||
ifndef BUILD_DIR
|
||||
$(error BUILD_DIR is not set! Use rfnoc_image_builder to create valid make commands)
|
||||
endif
|
||||
|
||||
|
||||
##-------------|-----------|----|-----------------|-----------------|------------
|
||||
##Target | Bandwidth | Ch | QSFP0 | QSFP1 | DRAM
|
||||
##-------------|-----------|----|-----------------|-----------------|------------
|
||||
##X410_X1_100 | 100 MHz | 4 | 10 GbE (Lane 0) | Unused | 64b x 4 Ch
|
||||
##X410_XG_100 | 100 MHz | 4 | 10 GbE (Lane 0) | 10 GbE (Lane 0) | 64b x 4 Ch
|
||||
##X410_X4_100 | 100 MHz | 4 | 4 x 10 GbE | Unused | 64b x 4 Ch
|
||||
##X410_X4C_100 | 100 MHz | 4 | 4 x 10 GbE | 100 GbE | Unused
|
||||
##X410_C1_100 | 100 MHz | 4 | 100 GbE | Unused | 64b x 4 Ch
|
||||
##X410_UC_100 | 100 MHz | 4 | Unused | 100 GbE | 64b x 4 Ch
|
||||
##X410_X1_200 | 200 MHz | 4 | 10 GbE (Lane 0) | Unused | 64b x 4 Ch
|
||||
##X410_XG_200 | 200 MHz | 4 | 10 GbE (Lane 0) | 10 GbE (Lane 0) | 64b x 4 Ch
|
||||
##X410_X4_200 | 200 MHz | 4 | 4 x 10 GbE | Unused | 64b x 4 Ch
|
||||
##X410_X4C_200 | 200 MHz | 4 | 4 x 10 GbE | 100 GbE | Unused
|
||||
##X410_C1_200 | 200 MHz | 4 | 100 GbE | Unused | 64b x 4 Ch
|
||||
##X410_UC_200 | 200 MHz | 4 | Unused | 100 GbE | 64b x 4 Ch
|
||||
##X410_X1_400 | 400 MHz | 4 | 10 GbE (Lane 0) | Unused | 128b x 4 Ch
|
||||
##X410_XG_400 | 400 MHz | 4 | 10 GbE (Lane 0) | 10 GbE (Lane 0) | 128b x 4 ch
|
||||
##X410_X4_400 | 400 MHz | 4 | 4 x 10 GbE | Unused | 128b x 4 Ch
|
||||
##X410_C1_400 | 400 MHz | 4 | 100 GbE | Unused | Unused
|
||||
##X410_UC_400 | 400 MHz | 4 | Unused | 100 GbE | Unused
|
||||
##X410_CG_400 | 400 MHz | 4 | 100 GbE | 100 GbE | Unused
|
||||
##X440_X1_400 | 400 MHz | 8 | 10 GbE (Lane 0) | Unused | 128b x 8 Ch
|
||||
##X440_X4_400 | 400 MHz | 8 | 4 x 10 GbE | Unused | 128b x 8 Ch
|
||||
##X440_C1_400 | 400 MHz | 8 | 100 GbE | Unused | Unused
|
||||
##X440_CG_400 | 400 MHz | 8 | 100 GbE | 100 GbE | Unused
|
||||
##X440_X1_1600 | 1.6 GHz | 2 | 10 GbE (Lane 0) | Unused | 512b x 2 Ch
|
||||
##X440_X4_1600 | 1.6 GHz | 2 | 4 x 10 GbE | Unused | 512b x 2 Ch
|
||||
##X440_C1_1600 | 1.6 GHz | 2 | 100 GbE | Unused | Unused
|
||||
##X440_CG_1600 | 1.6 GHz | 2 | 100 GbE | 100 GbE | Unused
|
||||
##* Note: Not all targets are shipped with UHD
|
||||
##* Note: Some YAML configurations might not use all available DRAM channels.
|
||||
|
||||
X410: X410_IP build/$(IMAGE_CORE_NAME).dts
|
||||
X410: check-variables X410_IP $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts
|
||||
$(call vivado_build,X410,$(DEFS) X410=1)
|
||||
$(call post_build,X410)
|
||||
X440: X440_IP build/$(IMAGE_CORE_NAME).dts
|
||||
X440: check-variables X440_IP $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts
|
||||
$(call vivado_build,X440,$(DEFS) X440=1)
|
||||
$(call post_build,X440)
|
||||
|
||||
|
||||
##
|
||||
##Other Make Targets
|
||||
##------------------
|
||||
##Other Make Targets (these should be called directly)
|
||||
##----------------------------------------------------
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
all: X410_IP
|
||||
|
||||
X410_IP: ##Build X410 IP only.
|
||||
X410_IP: ##Build X410 IP only. Use the -j option to build multiple IP blocks simultaneously.
|
||||
+$(call vivado_ip,X410,$(DEFS) X410=1)
|
||||
|
||||
X440_IP: ##Build X440 IP only.
|
||||
X440_IP: ##Build X440 IP only. Use the -j option to build multiple IP blocks simultaneously.
|
||||
+$(call vivado_ip,X440,$(DEFS) X440=1)
|
||||
|
||||
$(BUILD_OUTPUT_DIR)/usrp_x410%.dts: dts/*.dts dts/*.dtsi
|
||||
$(BUILD_OUTPUT_DIR)/usrp_x410%.dts: dts/*.dts dts/*.dtsi $(BUILD_DIR)/device_tree.dts
|
||||
-mkdir -p $(BUILD_OUTPUT_DIR)
|
||||
tools/parse_versions_for_dts.py \
|
||||
--input regmap/x410/versioning_regs_regmap_utils.vh \
|
||||
--output dts/x410-version-info.dtsi \
|
||||
--components fpga,cpld_ifc,db_gpio_ifc,rf_core_100m,rf_core_400m
|
||||
${CC} -o $@ -C -E -I dts -nostdinc -undef -x assembler-with-cpp -D__DTS__ \
|
||||
$(ARTIFACT_DIR)/device_tree.dts
|
||||
$(BUILD_DIR)/device_tree.dts
|
||||
|
||||
$(BUILD_OUTPUT_DIR)/usrp_x440%.dts: dts/*.dts dts/*.dtsi
|
||||
$(BUILD_OUTPUT_DIR)/usrp_x440%.dts: dts/*.dts dts/*.dtsi $(BUILD_DIR)/device_tree.dts
|
||||
-mkdir -p $(BUILD_OUTPUT_DIR)
|
||||
tools/parse_versions_for_dts.py \
|
||||
--input regmap/x440/versioning_regs_regmap_utils.vh \
|
||||
--output dts/x440-version-info.dtsi \
|
||||
--components fpga,cpld_ifc,db_gpio_ifc,rf_core_full
|
||||
${CC} -o $@ -C -E -I dts -nostdinc -undef -x assembler-with-cpp -D__DTS__ \
|
||||
$(ARTIFACT_DIR)/device_tree.dts
|
||||
$(BUILD_DIR)/device_tree.dts
|
||||
|
||||
clean: ##Clean up all target build outputs.
|
||||
@echo "Cleaning targets..."
|
||||
@rm -rf $(BUILD_BASE_DIR)/build-X* $(BUILD_BASE_DIR)/build-x*
|
||||
@rm -rf $(BUILD_BASE_DIR)/build-X* $(BUILD_BASE_DIR)/build-x* $(BUILD_DIR)
|
||||
@rm -rf $(BUILD_OUTPUT_DIR)
|
||||
|
||||
cleanall: ##Clean up all target and IP build outputs.
|
||||
@echo "Cleaning targets and IP..."
|
||||
@rm -rf build-ip
|
||||
@rm -rf $(BUILD_BASE_DIR)/build-*
|
||||
@rm -rf $(BUILD_BASE_DIR)/build-* $(BUILD_DIR)
|
||||
@rm -rf $(BUILD_OUTPUT_DIR)
|
||||
|
||||
help: ##Show this help message.
|
||||
|
||||
@@ -46,9 +46,9 @@ include $(LIB_DIR)/rfnoc/xport_sv/Makefile.srcs
|
||||
# Those files need to amend the RFNOC_OOT_SRCS variable with a list of actual
|
||||
# source files.
|
||||
-include $(RFNOC_OOT_MAKEFILE_SRCS)
|
||||
|
||||
ifdef ARTIFACT_DIR
|
||||
include $(ARTIFACT_DIR)/Makefile.inc
|
||||
# Now include everything that falls out of the image builder
|
||||
ifdef BUILD_DIR
|
||||
include $(BUILD_DIR)/Makefile.inc
|
||||
endif
|
||||
|
||||
##################################################
|
||||
@@ -162,7 +162,7 @@ $(RFNOC_IMAGE_CORE_SRCS) \
|
||||
|
||||
# Pass the image core header files required by RFNoC
|
||||
# to Vivado as Verilog definitions.
|
||||
IMAGE_CORE_HEADER_DEF="RFNOC_IMAGE_CORE_HDR=$(ARTIFACT_DIR)/rfnoc_image_core.vh"
|
||||
IMAGE_CORE_HEADER_DEF="RFNOC_IMAGE_CORE_HDR=$(BUILD_DIR)/rfnoc_image_core.vh"
|
||||
|
||||
##################################################
|
||||
# Dependency Targets
|
||||
@@ -175,7 +175,7 @@ VERILOG_DEFS=$(EXTRA_DEFS) $(CUSTOM_DEFS) $(GIT_HASH_VERILOG_DEF) $(IMAGE_CORE_H
|
||||
bin: .prereqs
|
||||
@echo "Build directory:: $(BUILD_DIR)"
|
||||
@echo "Printing MB_XDC:: $(MB_XDC)"
|
||||
@echo "Printing EXTRA_DEFS:: $(EXTRA_DEFS) $(RFNOC_IMAGE_CORE_DEFS)"
|
||||
@echo "Printing VERILOG_DEFS:: $(VERILOG_DEFS)"
|
||||
$(call BUILD_VIVADO_DESIGN,$(abspath ./build_x4xx.tcl),$(TOP_MODULE),$(ARCH),$(PART_ID))
|
||||
|
||||
synth: .prereqs
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
# General parameters
|
||||
# -----------------------------------------
|
||||
schema: rfnoc_imagebuilder_args # Identifier for the schema used to validate this file
|
||||
copyright: >- # Copyright information used in file headers
|
||||
Copyright 2023 Ettus Research, a National Instruments Brand
|
||||
license: >- # License information used in file headers
|
||||
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
version: '1.0' # File version
|
||||
chdr_width: 128 # Bit width of the CHDR bus for this image
|
||||
device: 'x410' # USRP type
|
||||
image_core_name: 'usrp_x410_fpga_X4_400'# Name to use for the RFNoC Image Core files
|
||||
default_target: 'X410' # Default make target
|
||||
inherit:
|
||||
- 'yaml_include/x410_radio_base.yml'
|
||||
- 'yaml_include/x4xx_x4_base.yml'
|
||||
|
||||
parameters:
|
||||
RF_BW: 400
|
||||
ENABLE_DRAM: True
|
||||
NUM_DRAM_BANKS: 1
|
||||
NUM_DRAM_CHANS: 4
|
||||
DRAM_WIDTH: 128
|
||||
|
||||
# A list of all stream endpoints in design
|
||||
# ----------------------------------------
|
||||
stream_endpoints:
|
||||
ep0: # Stream endpoint name
|
||||
ctrl: True # Endpoint passes control traffic
|
||||
data: True # Endpoint passes data traffic
|
||||
buff_size_bytes: 32768 # Stream endpoint buffer size
|
||||
ep1:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
ep2:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
ep3:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
ep4:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
ep5:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
ep6:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
ep7:
|
||||
ctrl: False
|
||||
data: True
|
||||
buff_size_bytes: 32768
|
||||
|
||||
# A list of all NoC blocks in design
|
||||
# ----------------------------------
|
||||
noc_blocks:
|
||||
radio0:
|
||||
block_desc: 'radio.yml'
|
||||
parameters:
|
||||
NUM_PORTS: 2
|
||||
radio1:
|
||||
block_desc: 'radio.yml'
|
||||
parameters:
|
||||
NUM_PORTS: 2
|
||||
replay0:
|
||||
block_desc: 'replay.yml'
|
||||
parameters:
|
||||
NUM_PORTS: 2
|
||||
MEM_DATA_W: 128
|
||||
MEM_ADDR_W: 32
|
||||
replay1:
|
||||
block_desc: 'replay.yml'
|
||||
parameters:
|
||||
NUM_PORTS: 2
|
||||
MEM_DATA_W: 128
|
||||
MEM_ADDR_W: 32
|
||||
|
||||
# A list of all static connections in design
|
||||
# ------------------------------------------
|
||||
# Format: A list of connection maps (list of key-value pairs) with the following keys
|
||||
# - srcblk = Source block to connect
|
||||
# - srcport = Port on the source block to connect
|
||||
# - dstblk = Destination block to connect
|
||||
# - dstport = Port on the destination block to connect
|
||||
connections:
|
||||
# RF A:0 TX
|
||||
- { srcblk: ep0, srcport: out0, dstblk: radio0, dstport: in_0 }
|
||||
# RF A:0 RX
|
||||
- { srcblk: radio0, srcport: out_0, dstblk: ep0, dstport: in0 }
|
||||
# RF A:1 TX
|
||||
- { srcblk: ep1, srcport: out0, dstblk: radio0, dstport: in_1 }
|
||||
# RF A:1 RX
|
||||
- { srcblk: radio0, srcport: out_1, dstblk: ep1, dstport: in0 }
|
||||
#
|
||||
# RF B:0 TX
|
||||
- { srcblk: ep2, srcport: out0, dstblk: radio1, dstport: in_0 }
|
||||
# RF B:0 RX
|
||||
- { srcblk: radio1, srcport: out_0, dstblk: ep2, dstport: in0 }
|
||||
# RF B:1 TX
|
||||
- { srcblk: ep3, srcport: out0, dstblk: radio1, dstport: in_1 }
|
||||
# RF B:1 RX
|
||||
- { srcblk: radio1, srcport: out_1, dstblk: ep3, dstport: in0 }
|
||||
#
|
||||
# Replay Connections
|
||||
- { srcblk: ep4, srcport: out0, dstblk: replay0, dstport: in_0 }
|
||||
- { srcblk: replay0, srcport: out_0, dstblk: ep4, dstport: in0 }
|
||||
- { srcblk: ep5, srcport: out0, dstblk: replay0, dstport: in_1 }
|
||||
- { srcblk: replay0, srcport: out_1, dstblk: ep5, dstport: in0 }
|
||||
- { srcblk: ep6, srcport: out0, dstblk: replay1, dstport: in_0 }
|
||||
- { srcblk: replay1, srcport: out_0, dstblk: ep6, dstport: in0 }
|
||||
- { srcblk: ep7, srcport: out0, dstblk: replay1, dstport: in_1 }
|
||||
- { srcblk: replay1, srcport: out_1, dstblk: ep7, dstport: in0 }
|
||||
#
|
||||
# BSP Connections
|
||||
- { srcblk: radio0, srcport: ctrlport, dstblk: _device_, dstport: ctrlport_radio0 }
|
||||
- { srcblk: radio1, srcport: ctrlport, dstblk: _device_, dstport: ctrlport_radio1 }
|
||||
- { srcblk: _device_, srcport: radio0, dstblk: radio0, dstport: radio }
|
||||
- { srcblk: _device_, srcport: radio1, dstblk: radio1, dstport: radio }
|
||||
- { srcblk: _device_, srcport: time, dstblk: radio0, dstport: time }
|
||||
- { srcblk: _device_, srcport: time, dstblk: radio1, dstport: time }
|
||||
- { srcblk: replay0, srcport: axi_ram, dstblk: _device_, dstport: dram0 }
|
||||
- { srcblk: replay1, srcport: axi_ram, dstblk: _device_, dstport: dram1 }
|
||||
|
||||
# A list of all clock domain connections in design
|
||||
# ------------------------------------------------
|
||||
# Format: A list of connection maps (list of key-value pairs) with the following keys
|
||||
# - srcblk = Source block to connect (Always "_device_")
|
||||
# - srcport = Clock domain on the source block to connect
|
||||
# - dstblk = Destination block to connect
|
||||
# - dstport = Clock domain on the destination block to connect
|
||||
clk_domains:
|
||||
- { srcblk: _device_, srcport: radio, dstblk: radio0, dstport: radio }
|
||||
- { srcblk: _device_, srcport: radio, dstblk: radio1, dstport: radio }
|
||||
- { srcblk: _device_, srcport: dram, dstblk: replay0, dstport: mem }
|
||||
- { srcblk: _device_, srcport: dram, dstblk: replay1, dstport: mem }
|
||||
Reference in New Issue
Block a user