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.


Original-commit: 259506c4993834d9ef8ccb48635623552b075237
This commit is contained in:
Wade Fife
2020-05-04 23:40:25 -05:00
parent 1563d0e5af
commit 1de388c61b
+4 -4
View File
@@ -789,14 +789,14 @@ package PkgChdrBfm;
end end
// Insert metadata // Insert metadata
while (chdr_packet.metadata.size() > 0) begin foreach (chdr_packet.metadata[i]) begin
bus_word = chdr_packet.metadata.pop_front(); bus_word = chdr_packet.metadata[i];
axis_packet.data.push_back(bus_word); axis_packet.data.push_back(bus_word);
end end
// Insert payload // Insert payload
while (chdr_packet.data.size() > 0) begin foreach (chdr_packet.data[i]) begin
bus_word = chdr_packet.data.pop_front(); bus_word = chdr_packet.data[i];
axis_packet.data.push_back(bus_word); axis_packet.data.push_back(bus_word);
end end