hdlbits-Vector2
Vector2
A 32-bit vector can be viewed as containing 4 bytes (bits [31:24], [23:16], etc.). Build a circuit that will reverse the byte ordering of the 4-byte word.
AaaaaaaaBbbbbbbbCcccccccDddddddd => DdddddddCcccccccBbbbbbbbAaaaaaaa
This operation is often used when the endianness of a piece of data needs to be swapped, for example between little-endian x86 systems and the big-endian formats used in many Internet protocols.
Hint
Part-select can be used on both the left side and right side of an assignment.
solution
1 |
|
hdlbits-Vector2
http://456-xiao.github.io/2024/08/03/hdlbits-Vector2/