On Mon, Jul 11, 2011 at 12:52 PM, Øyvind Harboe <oyvind.har...@zylin.com> wrote:
> On Mon, Jul 11, 2011 at 12:45 PM, Drasko DRASKOVIC
> <drasko.drasko...@gmail.com> wrote:
>> On Mon, Jul 11, 2011 at 11:53 AM, Øyvind Harboe <oyvind.har...@zylin.com> 
>> wrote:
>>> I think there is a fundamental misunderstanding about JTAG
>>> and OpenOCD.
>>>
>>> Let me try to clarify:
>>>
>>> JTAG clocks in and out bits, not bytes, so the concept of
>>> "big/small-endian" does not enter the picture at the JTAG level.
>>
>> Sat that we have 0x12345678 at addr 0x0 on LE host.
>> You will shift out byte 0x78 first, shifting out from LSB upwards.
>
> You're on the wrong track here. Shifting out happens with *bits*.
When I said LSB I meant Least Significant *Bit*, not *Byte*.

>
> So the situation is:
>
> - you have a host word. 8, 16, 32 or 64 bit wide.
> - that word must be copied over to an array of bytes to be shifted out.
> At this point any memory of host representation is gone.
> - the jtag layer now shifts out the bits, starting with bit 0 in byte 0.
What is byte 0 for you ?

I'd say, on a BE host it lives at addr 0x3. On LE host it lives at addr 0x0.

When you start shifting out LSB (bit) from the BE host, will you start
shifting out contents of address 0x3, or the address 0x0 ? In my
opinion, it will be content of the addr 0x3 that will be shifted out
first (as it holds bits 0:7 for on the BE host).

> - the target receives the bits in order completely oblivious to how you
> put them on the wire.

Yes - it receives LSB (bit) first.

BR,
Drasko
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to