Hello! On Sat, Feb 6, 2010 at 2:00 AM, Jie Zhang <[email protected]> wrote: >>> I prefer to "SHIFT_ORDER_STANDARD" and "SHIFT_ORDER_REVERSED". Or >>> "SHIFT_LSB_FIRST" and "SHIFT_MSB_FIRST". >> >> i dont see any practical difference between "big endian" and "MSB" and >> "little >> endian" and "LSB", but i dont care too much here. >> >> i can call the fields "bit_order" instead of "endian" use the defines >> URJ_BIT_ORDER_LSB / URJ_BIT_ORDER_MSB. > > No. LSB is not an order name. It's a specific bit, Least Significant > Bit. As for the order, we have the one defined in the standard (SHIFT > LSB FIRST out) and reversed one (SHIFT MSB FIRST out).
I think Jie's "SHIFT_LSB_FIRST" and "SHIFT_MSB_FIRST" is more clear, correct and self-explainable in this case. Endianness regards shifting out the byte order, not the bit order, so the difference is essential. Here goes an example sentence from ARM documentation: "The 16-bit JTAG-to-SWD select sequence is defined to be 0111100111100111, MSB first. This can be represented as 16'h79E7 transmitted MSB first or 16'hE79E when transmitted LSB first." Mike, if you choose Big Endian then it goes 79E7h, if you choose Little Endian it goes E779h, but no direction it clearly stated of the bitstream, so the user will get confised. "MSB first" is like SHL or << operation, "LSB first" is like SHR or >> operation, so the order of the bitstream is clear. I hope I did not mess the directions heheh - to be sure please take a look at http://en.wikipedia.org/wiki/Logical_shift Best regards! :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
