aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/python/uhd/imgbuilder/templates/modules/device_transport.v.mako16
-rw-r--r--host/python/uhd/imgbuilder/templates/rfnoc_image_core.v.mako11
2 files changed, 17 insertions, 10 deletions
diff --git a/host/python/uhd/imgbuilder/templates/modules/device_transport.v.mako b/host/python/uhd/imgbuilder/templates/modules/device_transport.v.mako
index 252917189..0bd2c15e7 100644
--- a/host/python/uhd/imgbuilder/templates/modules/device_transport.v.mako
+++ b/host/python/uhd/imgbuilder/templates/modules/device_transport.v.mako
@@ -3,12 +3,12 @@
%for i, transport in enumerate(transports):
// Transport ${i} (${transport["name"]})
- input wire [${"%4d" % (transport["width"]-1)}:0] s_${transport["name"]}_tdata,
- input wire s_${transport["name"]}_tlast,
- input wire s_${transport["name"]}_tvalid,
- output wire s_${transport["name"]}_tready,
- output wire [${"%4d" % (transport["width"]-1)}:0] m_${transport["name"]}_tdata,
- output wire m_${transport["name"]}_tlast,
- output wire m_${transport["name"]}_tvalid,
- input wire m_${transport["name"]}_tready${"," if i < len(transports) - 1 else ""}
+ input wire [CHDR_W-1:0] s_${transport["name"]}_tdata,
+ input wire s_${transport["name"]}_tlast,
+ input wire s_${transport["name"]}_tvalid,
+ output wire s_${transport["name"]}_tready,
+ output wire [CHDR_W-1:0] m_${transport["name"]}_tdata,
+ output wire m_${transport["name"]}_tlast,
+ output wire m_${transport["name"]}_tvalid,
+ input wire m_${transport["name"]}_tready${"," if i < len(transports) - 1 else ""}
%endfor
diff --git a/host/python/uhd/imgbuilder/templates/rfnoc_image_core.v.mako b/host/python/uhd/imgbuilder/templates/rfnoc_image_core.v.mako
index c83ddf5f5..549a469ee 100644
--- a/host/python/uhd/imgbuilder/templates/rfnoc_image_core.v.mako
+++ b/host/python/uhd/imgbuilder/templates/rfnoc_image_core.v.mako
@@ -26,8 +26,12 @@
`default_nettype none
+`include "${config.device.type}_rfnoc_image_core.vh"
+
module rfnoc_image_core #(
+ parameter CHDR_W = `CHDR_WIDTH,
+ parameter MTU = 10,
parameter [15:0] PROTOVER = {8'd1, 8'd0}
) (
// Clocks
@@ -44,13 +48,16 @@ module rfnoc_image_core #(
<%include file="/modules/device_transport.v.mako" args="transports=config.device.transports"/>\
);
- localparam CHDR_W = 64;
- localparam MTU = 10;
localparam EDGE_TBL_FILE = `"`RFNOC_EDGE_TBL_FILE`";
wire rfnoc_chdr_clk, rfnoc_chdr_rst;
wire rfnoc_ctrl_clk, rfnoc_ctrl_rst;
+ // Check that CHDR_W parameter matches value used by RFNoC Image Builder
+ if (CHDR_W != `CHDR_WIDTH) begin
+ ERROR_CHDR_W_values_do_not_match();
+ end
+
//---------------------------------------------------------------------------
// CHDR Crossbar