Hi all,
is it possibile to get the orginal bit array before making the shuffle?
bit [5:0] vector;
vector = 11010;
vector.shuffle();
Is it possibile to revert the shuffle?
Thanks guys
Hi all,
is it possibile to get the orginal bit array before making the shuffle?
bit [5:0] vector;
vector = 11010;
vector.shuffle();
Is it possibile to revert the shuffle?
Thanks guys
In reply to alexkidd84:
Array odering methods only works on unpacked array . Please refer to LRM section 7.12.2
In reply to alexkidd84:
Hi,
As stated above, shuffle() only applies to unpacked arrays.
In your example code, if you have used the below, you can use shuffle() (which is what I think you meant)
bit vector[5:0];
I don’t think there is a way to reverse the shuffle(). It makes no sense for such a feature as the user can simply duplicate the array before shuffling if he is interested in retaining the original bit array. Duplicating an array isn’t much of a performance hit either.
Good ol’ unshuffle(), it’s very similar to Kryten’s uncrop feature.
In reply to warnerrs:
Holy Crop! They did an Uncrop :D