utils: image builder: Major update
Most important effect of this change: rfnoc_image_builder is now required to build bitfiles, 'make' alone won't suffice any longer! This is a huge changeset to the image builder that combines multiple new features: - There no longer is a separate edge file for the static router. The static routes are generated as a Verilog parameter directly into the rfnoc_core_kernel (which is also modified). - image_builder.py is split up into several smaller files. Code is moved into yaml_utils.py, and the new files grc.py, builder_config.py - Generic module support is added. Aside from noc blocks and stream endpoints, we can now instantiate arbitrary modules (they also require a YAML description file). - To enable such modules, resets are now also tracked the same way that clock domains are. - The ImageBuilderConfig config object now more closes matches the original YAML file. The attributes 'clk_domain_con' and 'block_con' are removed. Instead, the attributes 'connections' and 'clk_domains' are sanitized and amended with extra annotations. The templates are updated to reflect this change. - IO ports can now carry parameters, e.g., to have variable wire widths based on the configuration. - Many Pylint warnings were resolved. - Add inheritance support for image core YAML files. This allows image core files to (recursively) inherit from other image core files. To do so, simply put an 'inherit' entry at the top of the file: ```yaml inherit: 'x410_radio_base.yml' ``` - The inheritance feature is used as part of the image core files. - Image core and DTS files are now generated as a build artefact into the build directory. This requires the usage of rfnoc_image_builder to build images. As a consequence, it is no longer required to check in image core Verilog files. - As another consequence, rfnoc_image_builder is required to build bitfiles! - Image flavours are no longer defined through Makefiles, but purely from the image core YAML files. - Remove all image core YAML files that do not generate a shipping image. Because of the inheritance feature and the requirement to use the image builder, it is trivial to add new YAML files. - Add support for transport adapters through the YAML files. Before, transport adapters were inferred from the make target (e.g., X410_X4_200 would have four 10GbE links based on the 'X4' substring). Now, transport adapters are defined via the image core YAML. - This feature is currently only used (or can be used) by the X4xx series. Older devices may or may not be ported to allow custom transport adapters in the future. - Add parameters to the BSP YAMLs and the devices itself. This allows setting global parameters in the image core files. For example, the X4x0 devices use this to decide if they instantiate DRAM channels. - DTS includes and constraint files can now be requested by blocks/transport adapter through their YAML files. They do no longer need to be listed in the Makefile. - Support for secure image cores. These are image cores that allow incorporating RFNoC blocks that require license keys and thus can't live in an open-source environment. This solution adds the option for secure image cores without touching the open source feature set. - Add --reuse option to allow manual editing of generated artefacts - Allow IO signatures from any module: until now IO signatures had to be defined in a single file (io_signatures). This file will persist. In addition each module can add its own IO signature as with the same format the core IO signatures placed under the top level key `io_signatures`. IO signatures are still maintained in a global dictionary. The consequence is that they can be shared among independent modules as well as they have to have a globally unique name. The image builder will warn about detected name clashes for the signatures. - As a consequence, some less commonly used IO signatures were moved to their corresponding module YAML files. Co-authored-by: Wade Fife <wade.fife@ni.com> Co-authored-by: Lars Amsel <lars.amsel@ni.com> Original-commit: a98ce2621e2a2dc25535fc700b49bfcb00b8eb59
This commit is contained in:
committed by
Joerg Hofrichter
co-authored by
Wade Fife
Lars Amsel
parent
77d07a9714
commit
8669c68048
+2
-3
@@ -38,11 +38,10 @@ endif
|
||||
TOP ?= e31x
|
||||
|
||||
DEFAULT_IMAGE_CORE_FILE_E31X=e310_rfnoc_image_core.v
|
||||
DEFAULT_EDGE_FILE_E31X=$(abspath e310_static_router.hex)
|
||||
|
||||
# vivado_build($1=Device, $2=Definitions)
|
||||
vivado_build = make -f Makefile.e31x.inc $(TARGET) NAME=$@ ARCH=$(XIL_ARCH_$1) PART_ID=$(XIL_PART_ID_$1) $2 TOP_MODULE=$(TOP) EXTRA_DEFS="$2" DEFAULT_RFNOC_IMAGE_CORE_FILE=$(DEFAULT_IMAGE_CORE_FILE_E31X) DEFAULT_EDGE_FILE=$(DEFAULT_EDGE_FILE_E31X)
|
||||
vivado_ip = make -f Makefile.e31x.inc viv_ip NAME=$@ ARCH=$(XIL_ARCH_$1) PART_ID=$(XIL_PART_ID_$1) $2 TOP_MODULE=$(TOP) EXTRA_DEFS="$2" DEFAULT_RFNOC_IMAGE_CORE_FILE=$(DEFAULT_IMAGE_CORE_FILE_E31X) DEFAULT_EDGE_FILE=$(DEFAULT_EDGE_FILE_E31X)
|
||||
vivado_build = make -f Makefile.e31x.inc $(TARGET) NAME=$@ ARCH=$(XIL_ARCH_$1) PART_ID=$(XIL_PART_ID_$1) $2 TOP_MODULE=$(TOP) EXTRA_DEFS="$2" DEFAULT_RFNOC_IMAGE_CORE_FILE=$(DEFAULT_IMAGE_CORE_FILE_E31X)
|
||||
vivado_ip = make -f Makefile.e31x.inc viv_ip NAME=$@ ARCH=$(XIL_ARCH_$1) PART_ID=$(XIL_PART_ID_$1) $2 TOP_MODULE=$(TOP) EXTRA_DEFS="$2" DEFAULT_RFNOC_IMAGE_CORE_FILE=$(DEFAULT_IMAGE_CORE_FILE_E31X)
|
||||
|
||||
# post_build($1=Device, $2=Option)
|
||||
ifeq ($(TARGET),bin)
|
||||
|
||||
@@ -48,7 +48,6 @@ include $(LIB_DIR)/rfnoc/blocks/rfnoc_block_axi_ram_fifo/Makefile.srcs
|
||||
-include $(RFNOC_OOT_MAKEFILE_SRCS)
|
||||
|
||||
IMAGE_CORE ?= $(DEFAULT_RFNOC_IMAGE_CORE_FILE)
|
||||
EDGE_FILE ?= $(DEFAULT_EDGE_FILE)
|
||||
|
||||
##################################################
|
||||
# Sources
|
||||
@@ -64,7 +63,7 @@ TOP_SRCS += e31x.v
|
||||
TOP_SRCS += e31x_core.v
|
||||
TOP_SRCS += e31x_dram.v
|
||||
TOP_SRCS += e310_io.v
|
||||
TOP_SRCS += $(EDGE_FILE) $(IMAGE_CORE)
|
||||
TOP_SRCS += $(IMAGE_CORE)
|
||||
MB_XDC = \
|
||||
e31x_pins.xdc \
|
||||
e31x_timing.xdc
|
||||
@@ -108,7 +107,6 @@ $(RFNOC_BLOCK_REPLAY_SRCS) \
|
||||
$(RFNOC_BLOCK_EXAMPLE_SRCS) \
|
||||
$(abspath $(MB_XDC))
|
||||
|
||||
EDGE_TBL_DEF="RFNOC_EDGE_TBL_FILE=$(call RESOLVE_PATH,$(EDGE_FILE))"
|
||||
IMAGE_CORE_DEF="RFNOC_IMAGE_CORE_HDR=$(call RESOLVE_PATH,$(IMAGE_CORE:.v=.vh))"
|
||||
|
||||
##################################################
|
||||
@@ -116,7 +114,7 @@ IMAGE_CORE_DEF="RFNOC_IMAGE_CORE_HDR=$(call RESOLVE_PATH,$(IMAGE_CORE:.v=.vh))"
|
||||
##################################################
|
||||
.SECONDEXPANSION:
|
||||
|
||||
VERILOG_DEFS=$(EXTRA_DEFS) $(CUSTOM_DEFS) $(GIT_HASH_VERILOG_DEF) $(EDGE_TBL_DEF) $(IMAGE_CORE_DEF)
|
||||
VERILOG_DEFS=$(EXTRA_DEFS) $(CUSTOM_DEFS) $(GIT_HASH_VERILOG_DEF) $(IMAGE_CORE_DEF)
|
||||
|
||||
# DESIGN_SRCS and VERILOG_DEFS must be defined
|
||||
bin: .prereqs
|
||||
|
||||
@@ -39,27 +39,27 @@ module rfnoc_image_core #(
|
||||
// IO ports /////////////////////////
|
||||
|
||||
// ctrlport
|
||||
output wire [ 0:0] m_ctrlport_req_wr,
|
||||
output wire [ 0:0] m_ctrlport_req_rd,
|
||||
output wire m_ctrlport_req_wr,
|
||||
output wire m_ctrlport_req_rd,
|
||||
output wire [ 19:0] m_ctrlport_req_addr,
|
||||
output wire [ 31:0] m_ctrlport_req_data,
|
||||
output wire [ 3:0] m_ctrlport_req_byte_en,
|
||||
output wire [ 0:0] m_ctrlport_req_has_time,
|
||||
output wire m_ctrlport_req_has_time,
|
||||
output wire [ 63:0] m_ctrlport_req_time,
|
||||
input wire [ 0:0] m_ctrlport_resp_ack,
|
||||
input wire m_ctrlport_resp_ack,
|
||||
input wire [ 1:0] m_ctrlport_resp_status,
|
||||
input wire [ 31:0] m_ctrlport_resp_data,
|
||||
// time
|
||||
input wire [ 63:0] radio_time,
|
||||
// radio
|
||||
input wire [1023:0] radio_rx_data,
|
||||
input wire [ 31:0] radio_rx_stb,
|
||||
output wire [ 31:0] radio_rx_running,
|
||||
output wire [1023:0] radio_tx_data,
|
||||
input wire [ 31:0] radio_tx_stb,
|
||||
output wire [ 31:0] radio_tx_running,
|
||||
input wire [ 63:0] radio_rx_data,
|
||||
input wire [ 1:0] radio_rx_stb,
|
||||
output wire [ 1:0] radio_rx_running,
|
||||
output wire [ 63:0] radio_tx_data,
|
||||
input wire [ 1:0] radio_tx_stb,
|
||||
output wire [ 1:0] radio_tx_running,
|
||||
// dram
|
||||
input wire [ 0:0] axi_rst,
|
||||
input wire axi_rst,
|
||||
output wire [ 7:0] m_axi_awid,
|
||||
output wire [ 383:0] m_axi_awaddr,
|
||||
output wire [ 63:0] m_axi_awlen,
|
||||
@@ -118,7 +118,6 @@ module rfnoc_image_core #(
|
||||
input wire m_dma_tready
|
||||
);
|
||||
|
||||
localparam EDGE_TBL_FILE = `"`RFNOC_EDGE_TBL_FILE`";
|
||||
localparam BLOCK_CHDR_W = 64;
|
||||
localparam BYTE_MTU = MTU + $clog2(CHDR_W/8);
|
||||
localparam BLOCK_MTU = BYTE_MTU - $clog2(BLOCK_CHDR_W/8);
|
||||
@@ -386,7 +385,12 @@ module rfnoc_image_core #(
|
||||
.NUM_TRANSPORTS (1),
|
||||
.NUM_EDGES (4),
|
||||
.CHDR_XBAR_PRESENT (1),
|
||||
.EDGE_TBL_FILE (EDGE_TBL_FILE)
|
||||
.EDGE_TBL ({
|
||||
{10'd03, 6'd01, 10'd02, 6'd00},
|
||||
{10'd02, 6'd00, 10'd03, 6'd01},
|
||||
{10'd03, 6'd00, 10'd01, 6'd00},
|
||||
{10'd01, 6'd00, 10'd03, 6'd00}
|
||||
})
|
||||
) core_kernel_i (
|
||||
.chdr_aclk (chdr_aclk),
|
||||
.chdr_aclk_locked (1'b1),
|
||||
@@ -430,31 +434,31 @@ module rfnoc_image_core #(
|
||||
wire m_radio0_out_1_tready, m_radio0_out_0_tready;
|
||||
|
||||
// ctrlport
|
||||
wire [ 0:0] radio0_m_ctrlport_req_wr;
|
||||
wire [ 0:0] radio0_m_ctrlport_req_rd;
|
||||
wire radio0_m_ctrlport_req_wr;
|
||||
wire radio0_m_ctrlport_req_rd;
|
||||
wire [ 19:0] radio0_m_ctrlport_req_addr;
|
||||
wire [ 31:0] radio0_m_ctrlport_req_data;
|
||||
wire [ 3:0] radio0_m_ctrlport_req_byte_en;
|
||||
wire [ 0:0] radio0_m_ctrlport_req_has_time;
|
||||
wire radio0_m_ctrlport_req_has_time;
|
||||
wire [ 63:0] radio0_m_ctrlport_req_time;
|
||||
wire [ 0:0] radio0_m_ctrlport_resp_ack;
|
||||
wire radio0_m_ctrlport_resp_ack;
|
||||
wire [ 1:0] radio0_m_ctrlport_resp_status;
|
||||
wire [ 31:0] radio0_m_ctrlport_resp_data;
|
||||
// time
|
||||
wire [ 63:0] radio0_radio_time;
|
||||
// radio
|
||||
wire [1023:0] radio0_radio_rx_data;
|
||||
wire [ 31:0] radio0_radio_rx_stb;
|
||||
wire [ 31:0] radio0_radio_rx_running;
|
||||
wire [1023:0] radio0_radio_tx_data;
|
||||
wire [ 31:0] radio0_radio_tx_stb;
|
||||
wire [ 31:0] radio0_radio_tx_running;
|
||||
wire [32*RADIO_NIPC*2-1:0] radio0_radio_rx_data;
|
||||
wire [ 1:0] radio0_radio_rx_stb;
|
||||
wire [ 1:0] radio0_radio_rx_running;
|
||||
wire [32*RADIO_NIPC*2-1:0] radio0_radio_tx_data;
|
||||
wire [ 1:0] radio0_radio_tx_stb;
|
||||
wire [ 1:0] radio0_radio_tx_running;
|
||||
|
||||
rfnoc_block_radio #(
|
||||
.THIS_PORTID (2),
|
||||
.CHDR_W (BLOCK_CHDR_W),
|
||||
.NUM_PORTS (2),
|
||||
.NIPC (1),
|
||||
.NIPC (RADIO_NIPC),
|
||||
.ITEM_W (32),
|
||||
.MTU (BLOCK_MTU)
|
||||
) b_radio0_0 (
|
||||
@@ -488,12 +492,12 @@ module rfnoc_image_core #(
|
||||
.m_rfnoc_chdr_tlast ({m_radio0_out_1_tlast , m_radio0_out_0_tlast }),
|
||||
.m_rfnoc_chdr_tvalid ({m_radio0_out_1_tvalid, m_radio0_out_0_tvalid}),
|
||||
.m_rfnoc_chdr_tready ({m_radio0_out_1_tready, m_radio0_out_0_tready}),
|
||||
.s_rfnoc_ctrl_tdata (s_radio0_ctrl_tdata),
|
||||
.s_rfnoc_ctrl_tlast (s_radio0_ctrl_tlast),
|
||||
.s_rfnoc_ctrl_tdata (s_radio0_ctrl_tdata ),
|
||||
.s_rfnoc_ctrl_tlast (s_radio0_ctrl_tlast ),
|
||||
.s_rfnoc_ctrl_tvalid (s_radio0_ctrl_tvalid),
|
||||
.s_rfnoc_ctrl_tready (s_radio0_ctrl_tready),
|
||||
.m_rfnoc_ctrl_tdata (m_radio0_ctrl_tdata),
|
||||
.m_rfnoc_ctrl_tlast (m_radio0_ctrl_tlast),
|
||||
.m_rfnoc_ctrl_tdata (m_radio0_ctrl_tdata ),
|
||||
.m_rfnoc_ctrl_tlast (m_radio0_ctrl_tlast ),
|
||||
.m_rfnoc_ctrl_tvalid (m_radio0_ctrl_tvalid),
|
||||
.m_rfnoc_ctrl_tready (m_radio0_ctrl_tready)
|
||||
);
|
||||
@@ -530,7 +534,7 @@ module rfnoc_image_core #(
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Clock Domains
|
||||
// Clock Domains and Resets
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
assign radio0_radio_clk = radio_clk;
|
||||
|
||||
@@ -30,6 +30,7 @@ noc_blocks:
|
||||
block_desc: 'radio.yml' # Block device descriptor
|
||||
parameters:
|
||||
NUM_PORTS: 2
|
||||
NIPC: RADIO_NIPC
|
||||
|
||||
# A list of all static connections in design
|
||||
# ------------------------------------------
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
00000004
|
||||
004000c0
|
||||
00c00040
|
||||
008000c1
|
||||
00c10080
|
||||
Reference in New Issue
Block a user