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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user