From 259506c4993834d9ef8ccb48635623552b075237 Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Wed, 29 Apr 2020 16:57:27 -0500 Subject: fpga: sim: Don't affect packet arguments in chdr_to_axis This updates the chdr_to_axis method so that it doesn't change the input chdr_packet object. This is useful in case there are other references to that object in use. Not modifying the object means that you don't always have to copy the object before passing it to this method. --- fpga/usrp3/sim/rfnoc/PkgChdrBfm.sv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fpga/usrp3') diff --git a/fpga/usrp3/sim/rfnoc/PkgChdrBfm.sv b/fpga/usrp3/sim/rfnoc/PkgChdrBfm.sv index a485eca59..96bfbd3a7 100644 --- a/fpga/usrp3/sim/rfnoc/PkgChdrBfm.sv +++ b/fpga/usrp3/sim/rfnoc/PkgChdrBfm.sv @@ -789,14 +789,14 @@ package PkgChdrBfm; end // Insert metadata - while (chdr_packet.metadata.size() > 0) begin - bus_word = chdr_packet.metadata.pop_front(); + foreach (chdr_packet.metadata[i]) begin + bus_word = chdr_packet.metadata[i]; axis_packet.data.push_back(bus_word); end // Insert payload - while (chdr_packet.data.size() > 0) begin - bus_word = chdr_packet.data.pop_front(); + foreach (chdr_packet.data[i]) begin + bus_word = chdr_packet.data[i]; axis_packet.data.push_back(bus_word); end -- cgit v1.2.3