aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv
diff options
context:
space:
mode:
Diffstat (limited to 'fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv')
-rw-r--r--fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv13
1 files changed, 13 insertions, 0 deletions
diff --git a/fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv b/fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv
index 6d6dd9a5b..725888272 100644
--- a/fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv
+++ b/fpga/usrp3/sim/rfnoc/PkgChdrIfaceBfm.sv
@@ -24,6 +24,19 @@ package PkgChdrIfaceBfm;
} packet_info_t;
+ // Return 1 if the packet info is equivalent, 0 otherwise.
+ function automatic bit packet_info_equal(const ref packet_info_t a, b);
+ // If there's no time then the timestamp value doesn't matter, so make them
+ // the same for comparison.
+ if (!a.has_time) begin
+ packet_info_t a_copy = a;
+ a_copy.timestamp = b.timestamp;
+ return a_copy == b;
+ end
+ return a == b;
+ endfunction : packet_info_equal
+
+
class ChdrIfaceBfm #(CHDR_W = 64, ITEM_W = 32) extends ChdrBfm #(CHDR_W);
// Redefine the ChdrPacket_t and chdr_word_t data types from ChdrBfm due to