fpga: rfnoc: Add support for 512-bit CHDR widths
This fixes the rfnoc_null_src_sink, chdr_crossbar_nxn, and chdr_stream_endpoint blocks so that wider CHDR widths are properly supported. It also updates PkgChdrBfm to able to properly test these blocks. The testbenches have been updated to test both 64 and 512-bit widths. Original-commit: 3af8dcaacfa4bf36dcae3bdbf0b353385b7063c6
This commit is contained in:
@@ -34,9 +34,10 @@ $(RFNOC_CORE_SRCS) \
|
||||
# Testbench Specific
|
||||
#-------------------------------------------------
|
||||
# Define only one toplevel module
|
||||
SIM_TOP = chdr_crossbar_nxn_tb
|
||||
SIM_TOP = chdr_crossbar_nxn_all_tb
|
||||
|
||||
SIM_SRCS = \
|
||||
$(abspath chdr_crossbar_nxn_all_tb.sv) \
|
||||
$(abspath chdr_crossbar_nxn_tb.sv) \
|
||||
$(abspath ../crossbar_tb.sv) \
|
||||
$(abspath ../chdr_traffic_source_sim.sv) \
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Copyright 2020 Ettus Research, a National Instruments Brand
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
//
|
||||
// Module: chdr_crossbar_nxn
|
||||
//
|
||||
// Description: Testbench for chdr_crossbar_nxn that runs multiple widths
|
||||
//
|
||||
|
||||
module chdr_crossbar_nxn_all_tb#(
|
||||
/* no PARAM */
|
||||
)(
|
||||
/* no IO */
|
||||
);
|
||||
|
||||
chdr_crossbar_nxn_tb #(.TEST_NAME("64B"),.CHDR_W(64)) CHDR64 ();
|
||||
chdr_crossbar_nxn_tb #(.TEST_NAME("512B"),.CHDR_W(512)) CHDR512 ();
|
||||
|
||||
// Wait for all done
|
||||
bit clk,rst;
|
||||
sim_clock_gen #(100.0) clk_gen (clk, rst);
|
||||
always_ff@(posedge clk)
|
||||
if (CHDR64.impl.done && CHDR512.impl.done) $finish(1);
|
||||
|
||||
endmodule
|
||||
@@ -6,12 +6,17 @@
|
||||
|
||||
`timescale 1ns/1ps
|
||||
|
||||
module chdr_crossbar_nxn_tb();
|
||||
module chdr_crossbar_nxn_tb#(
|
||||
parameter TEST_NAME = "chdr_crossbar_nxn_tb",
|
||||
parameter CHDR_W = 64
|
||||
)(
|
||||
/* no IO */
|
||||
);
|
||||
crossbar_tb #(
|
||||
.TEST_NAME ("chdr_crossbar_nxn_tb"),
|
||||
.TEST_NAME (TEST_NAME ),
|
||||
.ROUTER_IMPL ("chdr_crossbar_nxn" ), // Router implementation
|
||||
.ROUTER_PORTS (10 ), // Number of ports
|
||||
.ROUTER_DWIDTH (64 ), // Router datapath width
|
||||
.ROUTER_DWIDTH (CHDR_W ), // Router datapath width
|
||||
.MTU_LOG2 (7 ), // log2 of max packet size for router
|
||||
.NUM_MASTERS (10 ), // Number of data generators in test
|
||||
.TEST_MAX_PACKETS (100 ), // How many packets to stream per test case?
|
||||
|
||||
Reference in New Issue
Block a user