# Axistream Byte order

**URL:** <https://forum.uvvm.org/t/axistream-byte-order/250>\
**Category:** Bitvis VIP AXI-Stream\
**Tags:** question\
**Created:** [December 14, 2021, 6:23am UTC](https://forum.uvvm.org/t/axistream-byte-order/250 "2021-12-14T06:23:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Eric](https://forum.uvvm.org/u/Eric)\
**Post date:** [December 14, 2021, 6:23am UTC](https://forum.uvvm.org/t/axistream-byte-order/250/1 "2021-12-14T06:23:41Z")

</div>

Is it possible to swap the bytes in a UVVM axi-stream transmit?  
And if so, how

What I mean: if write a single value 0x"CAFEBABE" like this:  
`axistream_transmit(AXISTREAM_VVCT, 0, x"CAFEBABE", "sending", C_SCOPE);`

that then the tdata(31:0) would also be  
`x"CAFEBABE"`  
and not  
`x"BEBAFECA"`

Or in other words, is there a config flag for big-endian or little-endian?

Rgds,  
Eric

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [December 16, 2021, 12:43pm UTC](https://forum.uvvm.org/t/axistream-byte-order/250/2 "2021-12-16T12:43:56Z")

</div>

Hi Eric,

There is a byte order in the BFM configuration you should be able to use (byte\_endianness). Please see page 3 in the BFM QR.

Br,  
Marius

---

<div class="post-metadata">

**Author:** ![Eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Eric](https://forum.uvvm.org/u/Eric)\
**Post date:** [December 16, 2021, 7:00pm UTC](https://forum.uvvm.org/t/axistream-byte-order/250/3 "2021-12-16T19:00:46Z")

</div>

Hi Marius,

I found it.  
Apparently the default changed, w.r.t. to the documentation.  
Documentation says FIRST\_BYTE\_LEFT, while the code shows LOWER\_BYTE\_LEFT.  
And these are apparently defined in uvvm\_util\src\types\_pkg.vhd

Anyway, this does the trick:  
`shared_axi_stream_vvc_config(1).bfm_config.byte_endianness := FIRST_BYTE_RIGHT;`  
Rgds,  
Eric
