aboutsummaryrefslogtreecommitdiffstats
path: root/fpga
diff options
context:
space:
mode:
authorWade Fife <wade.fife@ettus.com>2021-06-14 16:29:19 -0500
committerWade Fife <wade.fife@ettus.com>2021-06-17 08:16:59 -0500
commit2615547a82bc4e06ff5fcb79c5c1efed76b058c7 (patch)
tree51a276e5ef2e43e62be0932b6b3ad7a52e4556d1 /fpga
parentc0f9496d59947f8c9411b28d63d0c8e6244102a0 (diff)
downloaduhd-2615547a82bc4e06ff5fcb79c5c1efed76b058c7.tar.gz
uhd-2615547a82bc4e06ff5fcb79c5c1efed76b058c7.tar.bz2
uhd-2615547a82bc4e06ff5fcb79c5c1efed76b058c7.zip
fpga: sim: Check for empty packet in clear_unused_bytes
Diffstat (limited to 'fpga')
-rw-r--r--fpga/usrp3/sim/rfnoc/PkgEthernet.sv4
1 files changed, 4 insertions, 0 deletions
diff --git a/fpga/usrp3/sim/rfnoc/PkgEthernet.sv b/fpga/usrp3/sim/rfnoc/PkgEthernet.sv
index f5dda046a..6005ffe1f 100644
--- a/fpga/usrp3/sim/rfnoc/PkgEthernet.sv
+++ b/fpga/usrp3/sim/rfnoc/PkgEthernet.sv
@@ -557,6 +557,10 @@ package PkgEthernet;
// clear bytes that aren't marked as valid by keep
function void clear_unused_bytes();
keep_t last_tkeep;
+
+ // check for empty packet, in which case there's nothing to clear
+ if (this.data.size() == 0) return;
+
last_tkeep = this.keep[$];
// check that the last user is the same as the last keep
assert (this.keep[$] == calc_last_tkeep(this.user[$])) else